From: shawn.guo@freescale.com (Shawn Guo)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH v2 2/2] ARM: smp_scu: enable SCU standby support
Date: Tue, 29 Jul 2014 20:44:11 +0800 [thread overview]
Message-ID: <20140729124410.GI24750@dragon> (raw)
In-Reply-To: <1406275790-18617-3-git-send-email-shawn.guo@freescale.com>
On Fri, Jul 25, 2014 at 04:09:50PM +0800, 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().
>
> Cortex-A9 earlier than r2p0 has no standby bit in SCU, so we need to
> skip setting the bit for those.
>
> Signed-off-by: Shawn Guo <shawn.guo@freescale.com>
If there is no objection on the patch, I will put it into patch tracker
soon.
Russell,
I know it's late for 3.17 at this point, and I'm fine that you queue it
for 3.18.
Shawn
> ---
> arch/arm/kernel/smp_scu.c | 7 +++++++
> 1 file changed, 7 insertions(+)
>
> diff --git a/arch/arm/kernel/smp_scu.c b/arch/arm/kernel/smp_scu.c
> index c947508f84e6..72f9241ad5db 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
> @@ -55,6 +56,12 @@ void scu_enable(void __iomem *scu_base)
> return;
>
> scu_ctrl |= SCU_ENABLE;
> +
> + /* Cortex-A9 earlier than r2p0 has no standby bit in SCU */
> + if ((read_cpuid_id() & 0xff0ffff0) == 0x410fc090 &&
> + (read_cpuid_id() & 0x00f0000f) >= 0x00200000)
> + scu_ctrl |= SCU_STANDBY_ENABLE;
> +
> writel_relaxed(scu_ctrl, scu_base + SCU_CTRL);
>
> /*
> --
> 1.9.1
>
next prev parent reply other threads:[~2014-07-29 12:44 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-07-25 8:09 [PATCH v2 0/2] Enable SCU standby support at core level Shawn Guo
2014-07-25 8:09 ` [PATCH v2 1/2] ARM: smp_scu: use macro for SCU enable bit Shawn Guo
2014-07-30 15:40 ` Sören Brinkmann
2014-07-25 8:09 ` [PATCH v2 2/2] ARM: smp_scu: enable SCU standby support Shawn Guo
2014-07-29 12:44 ` Shawn Guo [this message]
2014-07-31 1:10 ` 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=20140729124410.GI24750@dragon \
--to=shawn.guo@freescale.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).