linux-arm-kernel.lists.infradead.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] ARM: smp_scu: Enable standby mode
@ 2014-07-29 17:21 Soren Brinkmann
  2014-07-30  9:43 ` Will Deacon
  0 siblings, 1 reply; 3+ messages in thread
From: Soren Brinkmann @ 2014-07-29 17:21 UTC (permalink / raw)
  To: linux-arm-kernel

Enable the SCU standby mode.
>From documentation:
  When set, SCU CLK is turned off when all processors are in WFI mode,
  there is no pending request on the ACP (if implemented), and there is
  no remaining activity in the SCU.

  When SCU CLK is off, ARREADYS, AWREADYS and WREADYS on the ACP are forced
  LOW. The clock is turned on when any processor leaves WFI mode, or if
  there is a new request on the ACP.

Signed-off-by: Soren Brinkmann <soren.brinkmann@xilinx.com>
---
Hi,

I am working on some PM related patches for Zynq. One of them is
enabling the SCU standby mode. I was wondering whether this is probably
something that I should not do in platform specific code, but rather in
the common code for everybody?

	Thanks,
	S?ren
---
 arch/arm/kernel/smp_scu.c | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)

diff --git a/arch/arm/kernel/smp_scu.c b/arch/arm/kernel/smp_scu.c
index 1aafa0d785eb..82548a76740d 100644
--- a/arch/arm/kernel/smp_scu.c
+++ b/arch/arm/kernel/smp_scu.c
@@ -22,6 +22,9 @@
 #define SCU_INVALIDATE		0x0c
 #define SCU_FPGA_REVISION	0x10
 
+#define SCU_CTRL_ENABLE		BIT(0)
+#define SCU_CTRL_STANDBY_ENABLE	BIT(5)
+
 #ifdef CONFIG_SMP
 /*
  * Get the number of CPU cores from the SCU configuration
@@ -53,7 +56,7 @@ void scu_enable(void __iomem *scu_base)
 	if (scu_ctrl & 1)
 		return;
 
-	scu_ctrl |= 1;
+	scu_ctrl |= SCU_CTRL_ENABLE | SCU_CTRL_STANDBY_ENABLE;
 	writel_relaxed(scu_ctrl, scu_base + SCU_CTRL);
 
 	/*
-- 
2.0.1.1.gfbfc394

^ permalink raw reply related	[flat|nested] 3+ messages in thread

* [PATCH] ARM: smp_scu: Enable standby mode
  2014-07-29 17:21 [PATCH] ARM: smp_scu: Enable standby mode Soren Brinkmann
@ 2014-07-30  9:43 ` Will Deacon
  2014-07-30 15:29   ` Sören Brinkmann
  0 siblings, 1 reply; 3+ messages in thread
From: Will Deacon @ 2014-07-30  9:43 UTC (permalink / raw)
  To: linux-arm-kernel

On Tue, Jul 29, 2014 at 06:21:03PM +0100, Soren Brinkmann wrote:
> Enable the SCU standby mode.
> From documentation:
>   When set, SCU CLK is turned off when all processors are in WFI mode,
>   there is no pending request on the ACP (if implemented), and there is
>   no remaining activity in the SCU.
> 
>   When SCU CLK is off, ARREADYS, AWREADYS and WREADYS on the ACP are forced
>   LOW. The clock is turned on when any processor leaves WFI mode, or if
>   there is a new request on the ACP.
> 
> Signed-off-by: Soren Brinkmann <soren.brinkmann@xilinx.com>
> ---
> Hi,
> 
> I am working on some PM related patches for Zynq. One of them is
> enabling the SCU standby mode. I was wondering whether this is probably
> something that I should not do in platform specific code, but rather in
> the common code for everybody?

Take a look at Shawn's patches for this:

  http://lists.infradead.org/pipermail/linux-arm-kernel/2014-July/275326.html

Will

^ permalink raw reply	[flat|nested] 3+ messages in thread

* [PATCH] ARM: smp_scu: Enable standby mode
  2014-07-30  9:43 ` Will Deacon
@ 2014-07-30 15:29   ` Sören Brinkmann
  0 siblings, 0 replies; 3+ messages in thread
From: Sören Brinkmann @ 2014-07-30 15:29 UTC (permalink / raw)
  To: linux-arm-kernel

On Wed, 2014-07-30 at 10:43AM +0100, Will Deacon wrote:
> On Tue, Jul 29, 2014 at 06:21:03PM +0100, Soren Brinkmann wrote:
> > Enable the SCU standby mode.
> > From documentation:
> >   When set, SCU CLK is turned off when all processors are in WFI mode,
> >   there is no pending request on the ACP (if implemented), and there is
> >   no remaining activity in the SCU.
> > 
> >   When SCU CLK is off, ARREADYS, AWREADYS and WREADYS on the ACP are forced
> >   LOW. The clock is turned on when any processor leaves WFI mode, or if
> >   there is a new request on the ACP.
> > 
> > Signed-off-by: Soren Brinkmann <soren.brinkmann@xilinx.com>
> > ---
> > Hi,
> > 
> > I am working on some PM related patches for Zynq. One of them is
> > enabling the SCU standby mode. I was wondering whether this is probably
> > something that I should not do in platform specific code, but rather in
> > the common code for everybody?
> 
> Take a look at Shawn's patches for this:
> 
>   http://lists.infradead.org/pipermail/linux-arm-kernel/2014-July/275326.html

Great, so that is already coming. Is that patch already applied
somewhere?

	Thanks,
	S?ren

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2014-07-30 15:29 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2014-07-29 17:21 [PATCH] ARM: smp_scu: Enable standby mode Soren Brinkmann
2014-07-30  9:43 ` Will Deacon
2014-07-30 15:29   ` Sören Brinkmann

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).