Commit 5c189208 authored by Anders Larsen's avatar Anders Larsen Committed by Russell King

ARM: 6436/1: AT91: Fix power-saving in idle-mode on 926T processors

According to Atmel, their 926T processors (AT91 post RM9200) requires
'Wait for Interrupt' mode be entered right after disabling the processor clock
in order to minimise current consumption when idle, so do both provided we're
not running on a 920T (an RM9200).

Furthermore, get rid of the #ifndef CONFIG_DEBUG_KERNEL, since arch_idle()
can be turned off completely with the kernel parameter 'nohlt'.

Cc: Andrew Victor <avictor.za@gmail.com>
Signed-off-by: default avatarAnders Larsen <al@alarsen.net>
Signed-off-by: default avatarRussell King <rmk+kernel@arm.linux.org.uk>
parent cdaf9a2f
...@@ -28,17 +28,16 @@ ...@@ -28,17 +28,16 @@
static inline void arch_idle(void) static inline void arch_idle(void)
{ {
#ifndef CONFIG_DEBUG_KERNEL
/* /*
* Disable the processor clock. The processor will be automatically * Disable the processor clock. The processor will be automatically
* re-enabled by an interrupt or by a reset. * re-enabled by an interrupt or by a reset.
*/ */
at91_sys_write(AT91_PMC_SCDR, AT91_PMC_PCK); at91_sys_write(AT91_PMC_SCDR, AT91_PMC_PCK);
#else #ifndef CONFIG_CPU_ARM920T
/* /*
* Set the processor (CP15) into 'Wait for Interrupt' mode. * Set the processor (CP15) into 'Wait for Interrupt' mode.
* Unlike disabling the processor clock via the PMC (above) * Post-RM9200 processors need this in conjunction with the above
* this allows the processor to be woken via JTAG. * to save power when idle.
*/ */
cpu_do_idle(); cpu_do_idle();
#endif #endif
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment