arm: fix use of clock disable on idle for simple AT91 devices
PATCH 1/1 arm: fix use of clock disable on idle for simple AT91 devices
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.
--- arch/arm/mach-at91/include/mach/system.h | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-)
arch/arm/mach-at91/include/mach/system.h +1 -1
@@ -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.
PATCH 1/1 arm: fix use of clock disable on idle for simple AT91 devices
Quoted 14 lines · Greg Ungerer
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 <[email protected]>--- arch/arm/mach-at91/include/mach/system.h | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-)arch/arm/mach-at91/include/mach/system.h +0
-0
arch/arm/mach-at91/include/mach/system.h line 31
Quoted 5 lines
arch/arm/mach-at91/include/mach/system.h +1
-1@@ -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.
PATCH 1/1 arm: fix use of clock disable on idle for simple AT91 devices
Quoted 16 lines · Jean-Christophe PLAGNIOL-VILLARD
Quoted 15 lines · Greg Ungerer
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 <[email protected]>--- arch/arm/mach-at91/include/mach/system.h | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-)arch/arm/mach-at91/include/mach/system.h +0
-0@@ -28,7 +28,7 @@
Quoted 5 lines
arch/arm/mach-at91/include/mach/system.h line 31
Quoted 4 lines
arch/arm/mach-at91/include/mach/system.h +1
-1static 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.
PATCH 1/1 arm: fix use of clock disable on idle for simple AT91 devices
Quoted 17 lines · Jean-Christophe PLAGNIOL-VILLARD
Quoted 16 lines · Jean-Christophe PLAGNIOL-VILLARD
Quoted 15 lines · Greg Ungerer
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<[email protected]>--- arch/arm/mach-at91/include/mach/system.h | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-)arch/arm/mach-at91/include/mach/system.h +0
-0@@ -28,7 +28,7 @@
Quoted 7 lines
Quoted 5 lines
arch/arm/mach-at91/include/mach/system.h
Quoted 4 lines
arch/arm/mach-at91/include/mach/system.h +1
-1static 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