Skip to contentSkip to conversation

arm: fix use of clock disable on idle for simple AT91 devices

PATCH New Greg Ungerer 2 participants 4 messages Sep 8, 2010 – Sep 21, 2010

Subsystems (3)
lore
Share & tools
lore
#0 lore raw

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
index c80e090..0bc497f 100644
@@ -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.
#1 lore raw

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.

---
 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
index c80e090..0bc497f 100644

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.

#2 lore raw

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.

---
 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
index c80e090..0bc497f 100644
@@ -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 -1
 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.

#3 lore raw

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.

---
  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
index c80e090..0bc497f 100644
@@ -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 -1
  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