linux-arm-kernel.lists.infradead.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] arm: fix use of clock disable on idle for simple AT91 devices
@ 2010-09-08  1:22 Greg Ungerer
  2010-09-20  8:14 ` Jean-Christophe PLAGNIOL-VILLARD
  0 siblings, 1 reply; 4+ messages in thread
From: Greg Ungerer @ 2010-09-08  1:22 UTC (permalink / raw)
  To: linux-arm-kernel


Not all types of AT91 device have the PMC hardware unit. Don't do a
clock disable at idle on those family members that don't have it.

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

diff --git a/arch/arm/mach-at91/include/mach/system.h b/arch/arm/mach-at91/include/mach/system.h
index c80e090..0bc497f 100644
--- a/arch/arm/mach-at91/include/mach/system.h
+++ b/arch/arm/mach-at91/include/mach/system.h
@@ -28,7 +28,7 @@
 
 static inline void arch_idle(void)
 {
-#ifndef CONFIG_DEBUG_KERNEL
+#if defined(AT91_PMC) && !defined(CONFIG_DEBUG_KERNEL)
 	/*
 	 * Disable the processor clock.  The processor will be automatically
 	 * re-enabled by an interrupt or by a reset.

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

* [PATCH] arm: fix use of clock disable on idle for simple AT91 devices
  2010-09-08  1:22 [PATCH] arm: fix use of clock disable on idle for simple AT91 devices Greg Ungerer
@ 2010-09-20  8:14 ` Jean-Christophe PLAGNIOL-VILLARD
  2010-09-20 15:15   ` Jean-Christophe PLAGNIOL-VILLARD
  0 siblings, 1 reply; 4+ messages in thread
From: Jean-Christophe PLAGNIOL-VILLARD @ 2010-09-20  8:14 UTC (permalink / raw)
  To: linux-arm-kernel

On 11:22 Wed 08 Sep     , Greg Ungerer wrote:
> 
> Not all types of AT91 device have the PMC hardware unit. Don't do a
> clock disable at idle on those family members that don't have it.
> 
> Signed-off-by: Greg Ungerer <gerg@uclinux.org>
> ---
>  arch/arm/mach-at91/include/mach/system.h |    2 +-
>  1 files changed, 1 insertions(+), 1 deletions(-)
> 
> diff --git a/arch/arm/mach-at91/include/mach/system.h b/arch/arm/mach-at91/include/mach/system.h
> index c80e090..0bc497f 100644
> --- a/arch/arm/mach-at91/include/mach/system.h
> +++ b/arch/arm/mach-at91/include/mach/system.h
> @@ -28,7 +28,7 @@
>  
>  static inline void arch_idle(void)
>  {
> -#ifndef CONFIG_DEBUG_KERNEL
> +#if defined(AT91_PMC) && !defined(CONFIG_DEBUG_KERNEL)
we can do this on at91x40 also

Best Regards,
J.

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

* [PATCH] arm: fix use of clock disable on idle for simple AT91 devices
  2010-09-20  8:14 ` Jean-Christophe PLAGNIOL-VILLARD
@ 2010-09-20 15:15   ` Jean-Christophe PLAGNIOL-VILLARD
  2010-09-21 10:38     ` Greg Ungerer
  0 siblings, 1 reply; 4+ messages in thread
From: Jean-Christophe PLAGNIOL-VILLARD @ 2010-09-20 15:15 UTC (permalink / raw)
  To: linux-arm-kernel

On 10:14 Mon 20 Sep     , Jean-Christophe PLAGNIOL-VILLARD wrote:
> On 11:22 Wed 08 Sep     , Greg Ungerer wrote:
> > 
> > Not all types of AT91 device have the PMC hardware unit. Don't do a
> > clock disable at idle on those family members that don't have it.
> > 
> > Signed-off-by: Greg Ungerer <gerg@uclinux.org>
> > ---
> >  arch/arm/mach-at91/include/mach/system.h |    2 +-
> >  1 files changed, 1 insertions(+), 1 deletions(-)
> > 
> > diff --git a/arch/arm/mach-at91/include/mach/system.h b/arch/arm/mach-at91/include/mach/system.h
> > index c80e090..0bc497f 100644
> > --- a/arch/arm/mach-at91/include/mach/system.h
> > +++ b/arch/arm/mach-at91/include/mach/system.h
> > @@ -28,7 +28,7 @@
> >  
> >  static inline void arch_idle(void)
> >  {
> > -#ifndef CONFIG_DEBUG_KERNEL
> > +#if defined(AT91_PMC) && !defined(CONFIG_DEBUG_KERNEL)
> we can do this on at91x40 also
cf PS Control Register
p52 of the datasheet

Best Regards,
J.

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

* [PATCH] arm: fix use of clock disable on idle for simple AT91 devices
  2010-09-20 15:15   ` Jean-Christophe PLAGNIOL-VILLARD
@ 2010-09-21 10:38     ` Greg Ungerer
  0 siblings, 0 replies; 4+ messages in thread
From: Greg Ungerer @ 2010-09-21 10:38 UTC (permalink / raw)
  To: linux-arm-kernel

On 21/09/10 01:15, Jean-Christophe PLAGNIOL-VILLARD wrote:
> On 10:14 Mon 20 Sep     , Jean-Christophe PLAGNIOL-VILLARD wrote:
>> On 11:22 Wed 08 Sep     , Greg Ungerer wrote:
>>>
>>> Not all types of AT91 device have the PMC hardware unit. Don't do a
>>> clock disable at idle on those family members that don't have it.
>>>
>>> Signed-off-by: Greg Ungerer<gerg@uclinux.org>
>>> ---
>>>   arch/arm/mach-at91/include/mach/system.h |    2 +-
>>>   1 files changed, 1 insertions(+), 1 deletions(-)
>>>
>>> diff --git a/arch/arm/mach-at91/include/mach/system.h b/arch/arm/mach-at91/include/mach/system.h
>>> index c80e090..0bc497f 100644
>>> --- a/arch/arm/mach-at91/include/mach/system.h
>>> +++ b/arch/arm/mach-at91/include/mach/system.h
>>> @@ -28,7 +28,7 @@
>>>
>>>   static inline void arch_idle(void)
>>>   {
>>> -#ifndef CONFIG_DEBUG_KERNEL
>>> +#if defined(AT91_PMC)&&  !defined(CONFIG_DEBUG_KERNEL)
>> we can do this on at91x40 also
> cf PS Control Register
> p52 of the datasheet

Personally I see no problem with the old functionality (not using
the clock disable) for the AT91x40 devices. But then I don't run
on real hardware, only emulators.

A patch follows using the PS CPU clock disable bit. I think it
is more ugly than the first patch. Of course I can only test it
in an emulator (skyeye), works on that.

Regards
Greg

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

end of thread, other threads:[~2010-09-21 10:38 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-09-08  1:22 [PATCH] arm: fix use of clock disable on idle for simple AT91 devices Greg Ungerer
2010-09-20  8:14 ` Jean-Christophe PLAGNIOL-VILLARD
2010-09-20 15:15   ` Jean-Christophe PLAGNIOL-VILLARD
2010-09-21 10:38     ` Greg Ungerer

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