linux-arm-kernel.lists.infradead.org archive mirror
 help / color / mirror / Atom feed
From: josephl@nvidia.com (Joseph Lo)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH V3 1/3] ARM: tegra114: Reprogram GIC CPU interface to bypass IRQ on CPU PM entry
Date: Wed, 26 Jun 2013 19:19:27 +0800	[thread overview]
Message-ID: <1372245567.2986.27.camel@jlo-ubuntu-64.nvidia.com> (raw)
In-Reply-To: <51CA2173.7060407@wwwdotorg.org>

On Wed, 2013-06-26 at 07:02 +0800, Stephen Warren wrote:
> On 06/25/2013 03:23 AM, Joseph Lo wrote:
> > There is a difference between GICv1 and v2 when CPU in power management
> > mode (aka CPU power down on Tegra). For GICv1, IRQ/FIQ interrupt lines
> > going to CPU are same lines which are also used for wake-interrupt.
> > Therefore, we cannot disable the GIC CPU interface if we need to use same
> > interrupts for CPU wake purpose. This creates a race condition for CPU
> > power off entry. Also, in GICv1, disabling GICv1 CPU interface puts GICv1
> > into bypass mode such that incoming legacy IRQ/FIQ are sent to CPU, which
> > means disabling GIC CPU interface doesn't really disable IRQ/FIQ to CPU.
> > 
> > GICv2 provides a wake IRQ/FIQ (for wake-event purpose), which are not
> > disabled by GIC CPU interface. This is done by adding a bypass override
> > capability when the interrupts are disabled at the CPU interface. To
> > support this, there are four bits about IRQ/FIQ BypassDisable in CPU
> > interface Control Register. When the IRQ/FIQ not being driver by the
> > CPU interface, each interrupt output signal can be deasserted rather
> > than being driven by the legacy interrupt input.
> > 
> ...
> > diff --git a/arch/arm/mach-tegra/irq.c b/arch/arm/mach-tegra/irq.c
> 
> > +static int tegra_gic_notifier(struct notifier_block *self,
> > +			      unsigned long cmd, void *v)
> > +{
> > +	switch (cmd) {
> > +	case CPU_PM_ENTER:
> > +		writel_relaxed(0x1E0, tegra_gic_cpu_base + GIC_CPU_CTRL);
> 
> I assume that 0x1e0 is the "four bits" for IRQ/FIQ bypass disable that
> are mentioned in the commit description. are there #defines that can be
> used instead of literal 0x1e0 here?

The common "arm-gic.h" didn't have the new define for GICv2 yet. So I
didn't define something like GIC_CPU_{FIQ,IRQ}BypDisGrp{0,1} for Tegra.

Thanks,
Joseph

  reply	other threads:[~2013-06-26 11:19 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-06-25  9:23 [PATCH V3 0/3] ARM: tegra114: cpuidle: add power down state Joseph Lo
2013-06-25  9:23 ` [PATCH V3 1/3] ARM: tegra114: Reprogram GIC CPU interface to bypass IRQ on CPU PM entry Joseph Lo
2013-06-25 23:02   ` Stephen Warren
2013-06-26 11:19     ` Joseph Lo [this message]
2013-06-25  9:24 ` [PATCH V3 2/3] ARM: tegra114: add low level support for CPU idle powered-down mode Joseph Lo
2013-06-25  9:24 ` [PATCH V3 3/3] ARM: tegra114: cpuidle: add powered-down state Joseph Lo
2013-07-01 17:38 ` [PATCH V3 0/3] ARM: tegra114: cpuidle: add power down state Stephen Warren
2013-07-02  0:49   ` Joseph Lo

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1372245567.2986.27.camel@jlo-ubuntu-64.nvidia.com \
    --to=josephl@nvidia.com \
    --cc=linux-arm-kernel@lists.infradead.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).