linux-arm-kernel.lists.infradead.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] arm: fix use of clock disable on idle for AT91x40 devices
@ 2010-09-21 10:39 Greg Ungerer
  2010-09-23 11:19 ` Jean-Christophe PLAGNIOL-VILLARD
  0 siblings, 1 reply; 2+ messages in thread
From: Greg Ungerer @ 2010-09-21 10:39 UTC (permalink / raw)
  To: linux-arm-kernel

The simpler AT91x40 processors do not have the same power management
controller as the new AT91 devices. They do have a simpler power
controller module that we can use to disable the CPU clock at idle
time. Add code to support that.

Signed-off-by: Greg Ungerer <gerg@uclinux.org>
---
 arch/arm/mach-at91/include/mach/at91x40.h |    6 ++++++
 arch/arm/mach-at91/include/mach/system.h  |    4 ++++
 2 files changed, 10 insertions(+), 0 deletions(-)

diff --git a/arch/arm/mach-at91/include/mach/at91x40.h b/arch/arm/mach-at91/include/mach/at91x40.h
index d34cdb8..063ac44 100644
--- a/arch/arm/mach-at91/include/mach/at91x40.h
+++ b/arch/arm/mach-at91/include/mach/at91x40.h
@@ -52,4 +52,10 @@
 #define AT91_DBGU_CIDR	(AT91_SF + 0)	/* CIDR in PS segment */
 #define AT91_DBGU_EXID	(AT91_SF + 4)	/* EXID in PS segment */
 
+/*
+ * Support defines for the simple Power Controller module.
+ */
+#define	AT91_PS_CR	(AT91_PS + 0)	/* PS Control register */
+#define	AT91_PS_CR_CPU	(1 << 0)	/* CPU clock disable bit */
+
 #endif /* AT91X40_H */
diff --git a/arch/arm/mach-at91/include/mach/system.h b/arch/arm/mach-at91/include/mach/system.h
index c80e090..bfbb612 100644
--- a/arch/arm/mach-at91/include/mach/system.h
+++ b/arch/arm/mach-at91/include/mach/system.h
@@ -33,7 +33,11 @@ static inline void arch_idle(void)
 	 * Disable the processor clock.  The processor will be automatically
 	 * re-enabled by an interrupt or by a reset.
 	 */
+#ifdef AT91_PS
+	at91_sys_write(AT91_PS_CR, AT91_PS_CR_CPU);
+#else
 	at91_sys_write(AT91_PMC_SCDR, AT91_PMC_PCK);
+#endif
 #else
 	/*
 	 * Set the processor (CP15) into 'Wait for Interrupt' mode.

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

* [PATCH] arm: fix use of clock disable on idle for AT91x40 devices
  2010-09-21 10:39 [PATCH] arm: fix use of clock disable on idle for AT91x40 devices Greg Ungerer
@ 2010-09-23 11:19 ` Jean-Christophe PLAGNIOL-VILLARD
  0 siblings, 0 replies; 2+ messages in thread
From: Jean-Christophe PLAGNIOL-VILLARD @ 2010-09-23 11:19 UTC (permalink / raw)
  To: linux-arm-kernel

On 20:39 Tue 21 Sep     , Greg Ungerer wrote:
> The simpler AT91x40 processors do not have the same power management
> controller as the new AT91 devices. They do have a simpler power
> controller module that we can use to disable the CPU clock at idle
> time. Add code to support that.
> 
> Signed-off-by: Greg Ungerer <gerg@uclinux.org>
Acked-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>

Best Regards,
J.

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

end of thread, other threads:[~2010-09-23 11:19 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-09-21 10:39 [PATCH] arm: fix use of clock disable on idle for AT91x40 devices Greg Ungerer
2010-09-23 11:19 ` Jean-Christophe PLAGNIOL-VILLARD

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