* AT91: Fix power-saving in idle-mode on 926T processors
@ 2010-10-07 19:44 Anders Larsen
2010-10-08 12:29 ` Jean-Christophe PLAGNIOL-VILLARD
2011-01-10 15:05 ` Peter Korsgaard
0 siblings, 2 replies; 7+ messages in thread
From: Anders Larsen @ 2010-10-07 19:44 UTC (permalink / raw)
To: linux-arm-kernel
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'.
Signed-off-by: Anders Larsen <al@alarsen.net>
Cc: Andrew Victor <avictor.za@gmail.com>
---
KernelVersion: 2.6.35
arch/arm/mach-at91/include/mach/system.h | 7 +++----
1 files changed, 3 insertions(+), 4 deletions(-)
diff --git a/arch/arm/mach-at91/include/mach/system.h b/arch/arm/mach-at91/include/mach/system.h
index c80e090..ee8db15 100644
--- a/arch/arm/mach-at91/include/mach/system.h
+++ b/arch/arm/mach-at91/include/mach/system.h
@@ -28,17 +28,16 @@
static inline void arch_idle(void)
{
-#ifndef CONFIG_DEBUG_KERNEL
/*
* Disable the processor clock. The processor will be automatically
* re-enabled by an interrupt or by a reset.
*/
at91_sys_write(AT91_PMC_SCDR, AT91_PMC_PCK);
-#else
+#ifndef CONFIG_CPU_ARM920T
/*
* Set the processor (CP15) into 'Wait for Interrupt' mode.
- * Unlike disabling the processor clock via the PMC (above)
- * this allows the processor to be woken via JTAG.
+ * Post-RM9200 processors need this in conjunction with the above
+ * to save power when idle.
*/
cpu_do_idle();
#endif
--
1.7.0.4
^ permalink raw reply related [flat|nested] 7+ messages in thread
* AT91: Fix power-saving in idle-mode on 926T processors
2010-10-07 19:44 AT91: Fix power-saving in idle-mode on 926T processors Anders Larsen
@ 2010-10-08 12:29 ` Jean-Christophe PLAGNIOL-VILLARD
2010-10-08 13:51 ` Nicolas Ferre
2011-01-10 15:05 ` Peter Korsgaard
1 sibling, 1 reply; 7+ messages in thread
From: Jean-Christophe PLAGNIOL-VILLARD @ 2010-10-08 12:29 UTC (permalink / raw)
To: linux-arm-kernel
On 21:44 Thu 07 Oct , Anders Larsen wrote:
> 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'.
>
> Signed-off-by: Anders Larsen <al@alarsen.net>
> Cc: Andrew Victor <avictor.za@gmail.com>
please rebase against this branch
git://github.com/at91linux/linux-2.6-at91.git branch for-rmk
Best Regards,
J.
^ permalink raw reply [flat|nested] 7+ messages in thread
* AT91: Fix power-saving in idle-mode on 926T processors
2010-10-08 12:29 ` Jean-Christophe PLAGNIOL-VILLARD
@ 2010-10-08 13:51 ` Nicolas Ferre
0 siblings, 0 replies; 7+ messages in thread
From: Nicolas Ferre @ 2010-10-08 13:51 UTC (permalink / raw)
To: linux-arm-kernel
Russell,
Le 08/10/2010 14:29, Jean-Christophe PLAGNIOL-VILLARD :
> On 21:44 Thu 07 Oct , Anders Larsen wrote:
>> 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'.
>>
>> Signed-off-by: Anders Larsen <al@alarsen.net>
>> Cc: Andrew Victor <avictor.za@gmail.com>
> please rebase against this branch
>
> git://github.com/at91linux/linux-2.6-at91.git branch for-rmk
This patch seems already in your "master" branch
(5c189208b606a85b4e97109af70d59f10a42fdfd).
Do you want me to rebase this patch or do you mange merging with "AT91:
fix use of clock disable on idle for AT91x40 devices"
(cb809b1a5ebffca8cf0314b788919989e8e4ab5f) ?
already in your "devel" and "devel-stable" branches?
Best regards,
--
Nicolas Ferre
^ permalink raw reply [flat|nested] 7+ messages in thread
* AT91: Fix power-saving in idle-mode on 926T processors
2010-10-07 19:44 AT91: Fix power-saving in idle-mode on 926T processors Anders Larsen
2010-10-08 12:29 ` Jean-Christophe PLAGNIOL-VILLARD
@ 2011-01-10 15:05 ` Peter Korsgaard
2011-01-10 15:32 ` Anders Larsen
1 sibling, 1 reply; 7+ messages in thread
From: Peter Korsgaard @ 2011-01-10 15:05 UTC (permalink / raw)
To: linux-arm-kernel
On Thu, Oct 7, 2010 at 9:44 PM, Anders Larsen <al@alarsen.net> wrote:
> 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'.
>
> Signed-off-by: Anders Larsen <al@alarsen.net>
> Cc: Andrew Victor <avictor.za@gmail.com>
Is there a known interaction with this and the JTAG controller? I
haven't had time to look closer into it yet, but with this applied I
can no longer access an Altera FPGA on a chain shared with a 9G45
through Quartus.
> +++ b/arch/arm/mach-at91/include/mach/system.h
> @@ -28,17 +28,16 @@
>
> ?static inline void arch_idle(void)
> ?{
> -#ifndef CONFIG_DEBUG_KERNEL
> ? ? ? ?/*
> ? ? ? ? * Disable the processor clock. ?The processor will be automatically
> ? ? ? ? * re-enabled by an interrupt or by a reset.
> ? ? ? ? */
> ? ? ? ?at91_sys_write(AT91_PMC_SCDR, AT91_PMC_PCK);
> -#else
> +#ifndef CONFIG_CPU_ARM920T
> ? ? ? ?/*
> ? ? ? ? * Set the processor (CP15) into 'Wait for Interrupt' mode.
> - ? ? ? ?* Unlike disabling the processor clock via the PMC (above)
> - ? ? ? ?* ?this allows the processor to be woken via JTAG.
> + ? ? ? ?* Post-RM9200 processors need this in conjunction with the above
> + ? ? ? ?* to save power when idle.
> ? ? ? ? */
> ? ? ? ?cpu_do_idle();
> ?#endif
--
Bye, Peter Korsgaard
^ permalink raw reply [flat|nested] 7+ messages in thread
* AT91: Fix power-saving in idle-mode on 926T processors
2011-01-10 15:05 ` Peter Korsgaard
@ 2011-01-10 15:32 ` Anders Larsen
2011-01-10 15:43 ` Peter Korsgaard
0 siblings, 1 reply; 7+ messages in thread
From: Anders Larsen @ 2011-01-10 15:32 UTC (permalink / raw)
To: linux-arm-kernel
Hej Peter,
On 2011-01-10 16:05:36, Peter Korsgaard wrote:
> On Thu, Oct 7, 2010 at 9:44 PM, Anders Larsen <al@alarsen.net> wrote:
> > 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).
>
> Is there a known interaction with this and the JTAG controller?
indeed there is - disabling the processor clock blocks JTAG debugging.
> I haven't had time to look closer into it yet, but with this applied
> I can no longer access an Altera FPGA on a chain shared with a 9G45
> through Quartus.
If you boot with the kernel parameter "nohlt", arch_idle() is not called,
and JTAG should work again (but of course power consumption will be
substantially higher).
This was noted by Uwe Kleine-K?nig in https://lkml.org/lkml/2010/5/5/342
Cheers
Anders
^ permalink raw reply [flat|nested] 7+ messages in thread
* AT91: Fix power-saving in idle-mode on 926T processors
2011-01-10 15:32 ` Anders Larsen
@ 2011-01-10 15:43 ` Peter Korsgaard
2011-01-10 19:23 ` Uwe Kleine-König
0 siblings, 1 reply; 7+ messages in thread
From: Peter Korsgaard @ 2011-01-10 15:43 UTC (permalink / raw)
To: linux-arm-kernel
>>>>> "Anders" == Anders Larsen <al@alarsen.net> writes:
Hi,
>> Is there a known interaction with this and the JTAG controller?
Anders> indeed there is - disabling the processor clock blocks JTAG debugging.
Ok - And apparently it completely blocks the JTAG controller, so you
cannot even put it in bypass mode and access other devices on the same
JTAG chain.
>> I haven't had time to look closer into it yet, but with this applied
>> I can no longer access an Altera FPGA on a chain shared with a 9G45
>> through Quartus.
Anders> If you boot with the kernel parameter "nohlt", arch_idle() is
Anders> not called, and JTAG should work again (but of course power
Anders> consumption will be substantially higher).
Anders> This was noted by Uwe Kleine-K?nig in
Anders> https://lkml.org/lkml/2010/5/5/342
Thanks.
--
Bye, Peter Korsgaard
^ permalink raw reply [flat|nested] 7+ messages in thread
* AT91: Fix power-saving in idle-mode on 926T processors
2011-01-10 15:43 ` Peter Korsgaard
@ 2011-01-10 19:23 ` Uwe Kleine-König
0 siblings, 0 replies; 7+ messages in thread
From: Uwe Kleine-König @ 2011-01-10 19:23 UTC (permalink / raw)
To: linux-arm-kernel
On Mon, Jan 10, 2011 at 04:43:07PM +0100, Peter Korsgaard wrote:
> >>>>> "Anders" == Anders Larsen <al@alarsen.net> writes:
>
> Hi,
>
> >> Is there a known interaction with this and the JTAG controller?
>
> Anders> indeed there is - disabling the processor clock blocks JTAG debugging.
>
> Ok - And apparently it completely blocks the JTAG controller, so you
> cannot even put it in bypass mode and access other devices on the same
> JTAG chain.
This is a quite usual violation of ieee-1949.1-2001 (i.e. the jtag
standard (don't know if there is a newer version?)). I really wonder
why it's so hard to get this right. There is the availability of
"compiliance-enable patterns" that allow to say: "My device is only
jtaggable if this input is 1." Why not power the jtag block with such an
input? Software doesn't need (and actually must not) have the ability
to disable the jtag clock. Moreover this way the chip doesn't need any
current to keep jtag on and still a developer needing jtag doesn't need
to change any source code, but only needs a jumper on his devboard.
It could be so easy when all people knew what they do.
sigh
Uwe
--
Pengutronix e.K. | Uwe Kleine-K?nig |
Industrial Linux Solutions | http://www.pengutronix.de/ |
^ permalink raw reply [flat|nested] 7+ messages in thread
end of thread, other threads:[~2011-01-10 19:23 UTC | newest]
Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-10-07 19:44 AT91: Fix power-saving in idle-mode on 926T processors Anders Larsen
2010-10-08 12:29 ` Jean-Christophe PLAGNIOL-VILLARD
2010-10-08 13:51 ` Nicolas Ferre
2011-01-10 15:05 ` Peter Korsgaard
2011-01-10 15:32 ` Anders Larsen
2011-01-10 15:43 ` Peter Korsgaard
2011-01-10 19:23 ` Uwe Kleine-König
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).