[PATCH 11/12] ARM: sa1100: Remove LATCH and CLOCK_TICK_RATE dependency

Deepak Saxena dsaxena at linaro.org
Thu Aug 4 09:53:42 EDT 2011


As part of work to remove the global CLOCK_TICK_RATE symbol,
this patch defines a sub-arch local value for use by the
sa1100 code.  Once all LATCH and CLOCK_TICK_RATE references
are removed, we will remove all the definitions across
sub-arches.

Signed-off-by: Deepak Saxena <dsaxena at linaro.org>
---
 arch/arm/mach-sa1100/time.c |    5 ++++-
 1 files changed, 4 insertions(+), 1 deletions(-)

diff --git a/arch/arm/mach-sa1100/time.c b/arch/arm/mach-sa1100/time.c
index fa66024..d4de620 100644
--- a/arch/arm/mach-sa1100/time.c
+++ b/arch/arm/mach-sa1100/time.c
@@ -127,6 +127,9 @@ static void __init sa1100_timer_init(void)
 }
 
 #ifdef CONFIG_PM
+#define SA1100_TICK_RATE	3686400
+#define SA1100_TIMER_LATCH	((CLOCK_TICK_RATE + HZ/2) / HZ)	/* For divider */
+
 unsigned long osmr[4], oier;
 
 static void sa1100_timer_suspend(void)
@@ -150,7 +153,7 @@ static void sa1100_timer_resume(void)
 	/*
 	 * OSMR0 is the system timer: make sure OSCR is sufficiently behind
 	 */
-	OSCR = OSMR0 - LATCH;
+	OSCR = OSMR0 - SA1100_TIMER_LATCH;
 }
 #else
 #define sa1100_timer_suspend NULL
-- 
1.7.4.1




More information about the linux-arm-kernel mailing list