From df190cd6a47dabc13176158e02d3b2672c5737fd Mon Sep 17 00:00:00 2001 From: Tony Lindgren Date: Tue, 6 Sep 2005 14:28:42 +0300 Subject: [PATCH] ARM: OMAP: Removed dyn-tick modulo code to be in sync with mainline Removed dyn-tick modulo code to be in sync with mainline --- arch/arm/mach-omap1/time.c | 20 -------------------- arch/arm/plat-omap/Kconfig | 4 +--- 2 files changed, 1 insertion(+), 23 deletions(-) diff --git a/arch/arm/mach-omap1/time.c b/arch/arm/mach-omap1/time.c index e36b58c5052..191a9b1ee9b 100644 --- a/arch/arm/mach-omap1/time.c +++ b/arch/arm/mach-omap1/time.c @@ -247,13 +247,6 @@ unsigned long long sched_clock(void) #define OMAP_32K_TIMER_TCR 0x04 #define OMAP_32K_TICKS_PER_HZ (32768 / HZ) -#if (32768 % HZ) != 0 -/* We cannot ignore modulo. - * Potential error can be as high as several percent. - */ -#define OMAP_32K_TICK_MODULO (32768 % HZ) -static unsigned modulo_count = 0; /* Counts 1/HZ units */ -#endif /* * TRM says 1 / HZ = ( TVR + 1) / 32768, so TRV = (32768 / HZ) - 1 @@ -348,19 +341,6 @@ static irqreturn_t omap_32k_timer_interrupt(int irq, void *dev_id, now = omap_32k_sync_timer_read(); while (now - omap_32k_last_tick >= OMAP_32K_TICKS_PER_HZ) { -#ifdef OMAP_32K_TICK_MODULO - /* Modulo addition may put omap_32k_last_tick ahead of now - * and cause unwanted repetition of the while loop. - */ - if (unlikely(now - omap_32k_last_tick == ~0)) - break; - - modulo_count += OMAP_32K_TICK_MODULO; - if (modulo_count > HZ) { - ++omap_32k_last_tick; - modulo_count -= HZ; - } -#endif omap_32k_last_tick += OMAP_32K_TICKS_PER_HZ; timer_tick(regs); } diff --git a/arch/arm/plat-omap/Kconfig b/arch/arm/plat-omap/Kconfig index ddbba1c0a1b..c8cbba23f7e 100644 --- a/arch/arm/plat-omap/Kconfig +++ b/arch/arm/plat-omap/Kconfig @@ -115,9 +115,7 @@ config OMAP_32K_TIMER_HZ default "128" help Kernel internal timer frequency should be a divisor of 32768, - such as 64 or 128. If ARM Linux default HZ=100 is used, the system - will still work, but the timer interrupt will use less efficient - modulo code. + such as 64 or 128. config OMAP_DM_TIMER bool "Use dual-mode timer" -- 2.41.1