public inbox for linux-arm-kernel@lists.infradead.org 
 help / color / mirror / Atom feed
From: catalin.marinas@arm•com (Catalin Marinas)
To: linux-arm-kernel@lists•infradead.org
Subject: [PATCH 2/3] ARM: smp_scu: enable SCU standby support
Date: Mon, 21 Jul 2014 11:26:38 +0100	[thread overview]
Message-ID: <20140721102638.GE32578@arm.com> (raw)
In-Reply-To: <20140721092703.GL8537@dragon>

On Mon, Jul 21, 2014 at 05:27:04PM +0800, Shawn Guo wrote:
> On Mon, Jul 21, 2014 at 09:51:50AM +0100, Will Deacon wrote:
> > On Mon, Jul 21, 2014 at 08:45:54AM +0100, Shawn Guo wrote:
> > > With SCU standby enabled, SCU CLK will be turned off when all processors
> > > are in WFI mode.  And the clock will be turned on when any processor
> > > leaves WFI mode.
> > > 
> > > This behavior should be preferable in terms of power efficiency of
> > > system idle.  So let's set the SCU standby bit to enable the support in
> > > function scu_enable().
> > > 
> > > Signed-off-by: Shawn Guo <shawn.guo@freescale•com>
> > > ---
> > >  arch/arm/kernel/smp_scu.c | 3 ++-
> > >  1 file changed, 2 insertions(+), 1 deletion(-)
> > > 
> > > diff --git a/arch/arm/kernel/smp_scu.c b/arch/arm/kernel/smp_scu.c
> > > index c947508f84e6..9f29d167d02c 100644
> > > --- a/arch/arm/kernel/smp_scu.c
> > > +++ b/arch/arm/kernel/smp_scu.c
> > > @@ -18,6 +18,7 @@
> > >  
> > >  #define SCU_CTRL		0x00
> > >  #define SCU_ENABLE		(1 << 0)
> > > +#define SCU_STANDBY_ENABLE	(1 << 5)
> > >  #define SCU_CONFIG		0x04
> > >  #define SCU_CPU_STATUS		0x08
> > >  #define SCU_INVALIDATE		0x0c
> > > @@ -54,7 +55,7 @@ void scu_enable(void __iomem *scu_base)
> > >  	if (scu_ctrl & SCU_ENABLE)
> > >  		return;
> > >  
> > > -	scu_ctrl |= SCU_ENABLE;
> > > +	scu_ctrl |= SCU_ENABLE | SCU_STANDBY_ENABLE;
> > 
> > I don't think this bit exists on all revisions of the A9.
> 
> Thanks for the info, Will.  Is there any side-effect to write the
> standby bit on those revisions which do not define the bit?

The usual question - could the firmware enable this bit before Linux
starts? We already do a read/modify/write sequence here and are only
supposed to write the enable bit as the rest are implementation defined.

-- 
Catalin

  parent reply	other threads:[~2014-07-21 10:26 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-07-21  7:45 [PATCH 0/3] Enable SCU standby support at core level Shawn Guo
2014-07-21  7:45 ` [PATCH 1/3] ARM: smp_scu: use macro for SCU enable bit Shawn Guo
2014-07-21  7:45 ` [PATCH 2/3] ARM: smp_scu: enable SCU standby support Shawn Guo
2014-07-21  8:51   ` Will Deacon
2014-07-21  9:27     ` Shawn Guo
2014-07-21  9:44       ` Will Deacon
2014-07-22  1:56         ` Shawn Guo
2014-07-21 10:26       ` Catalin Marinas [this message]
2014-07-22  2:09         ` Shawn Guo
2014-07-22 16:13           ` Catalin Marinas
2014-07-23  4:50             ` Shawn Guo
2014-07-23 16:45               ` Catalin Marinas
2014-07-24  8:49                 ` Shawn Guo
2014-07-21  7:45 ` [PATCH 3/3] ARM: imx: remove SCU standby enable code Shawn Guo

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=20140721102638.GE32578@arm.com \
    --to=catalin.marinas@arm$(echo .)com \
    --cc=linux-arm-kernel@lists$(echo .)infradead.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html
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