[PATCH 08/12] ARM: ks8695: Remove LATCH and CLOCK_TICK_RATE dependency

Deepak Saxena dsaxena at linaro.org
Thu Aug 4 09:52:02 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
ks8695 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-ks8695/time.c |    4 +++-
 1 files changed, 3 insertions(+), 1 deletions(-)

diff --git a/arch/arm/mach-ks8695/time.c b/arch/arm/mach-ks8695/time.c
index 69c072c..cf63499 100644
--- a/arch/arm/mach-ks8695/time.c
+++ b/arch/arm/mach-ks8695/time.c
@@ -33,6 +33,8 @@
 
 #include "generic.h"
 
+#define	KS8695_TIMER_LATCH	((KS8695_TICK_RATE + HZ/2) / HZ)
+
 /*
  * Returns number of ms since last clock interrupt.  Note that interrupts
  * will have been disabled by do_gettimeoffset()
@@ -62,7 +64,7 @@ static unsigned long ks8695_gettimeoffset (void)
 		elapsed += (CLOCK_TICK_RATE / HZ);
 
 	/* Convert ticks to usecs */
-	return (unsigned long)(elapsed * (tick_nsec / 1000)) / LATCH;
+	return (unsigned long)(elapsed * (tick_nsec / 1000)) / KS8695_TIMER_LATCH;
 }
 
 /*
-- 
1.7.4.1




More information about the linux-arm-kernel mailing list