diff options
author | Lennert Buytenhek <buytenh@wantstofly.org> | 2006-06-22 05:30:53 -0400 |
---|---|---|
committer | Russell King <rmk+kernel@arm.linux.org.uk> | 2006-06-22 05:30:53 -0400 |
commit | f869afab8f36c5f8561557f74b4b9846719092da (patch) | |
tree | 6a23d7981a3b06b9cd40ad99c1543d22f6a1d528 /arch/arm/mach-ixp23xx | |
parent | 84b61f6d3ad8a5761e61d83076588f64a289a574 (diff) |
[ARM] 3616/1: fix timer handler wrap logic for a number of platforms
Patch from Lennert Buytenhek
A couple of platforms aren't using the right comparison type in their
timer interrupt handlers (as we're comparing two wrapping timestamps,
we need a bmi/bpl-type comparison, not an unsigned comparison) -- this
patch fixes them up.
Signed-off-by: Lennert Buytenhek <buytenh@wantstofly.org>
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
Diffstat (limited to 'arch/arm/mach-ixp23xx')
-rw-r--r-- | arch/arm/mach-ixp23xx/core.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/arch/arm/mach-ixp23xx/core.c b/arch/arm/mach-ixp23xx/core.c index affd1d5d7440..e2aad734080e 100644 --- a/arch/arm/mach-ixp23xx/core.c +++ b/arch/arm/mach-ixp23xx/core.c | |||
@@ -334,7 +334,7 @@ void __init ixp23xx_init_irq(void) | |||
334 | /************************************************************************* | 334 | /************************************************************************* |
335 | * Timer-tick functions for IXP23xx | 335 | * Timer-tick functions for IXP23xx |
336 | *************************************************************************/ | 336 | *************************************************************************/ |
337 | #define CLOCK_TICKS_PER_USEC CLOCK_TICK_RATE / (USEC_PER_SEC) | 337 | #define CLOCK_TICKS_PER_USEC (CLOCK_TICK_RATE / USEC_PER_SEC) |
338 | 338 | ||
339 | static unsigned long next_jiffy_time; | 339 | static unsigned long next_jiffy_time; |
340 | 340 | ||
@@ -353,7 +353,7 @@ ixp23xx_timer_interrupt(int irq, void *dev_id, struct pt_regs *regs) | |||
353 | { | 353 | { |
354 | /* Clear Pending Interrupt by writing '1' to it */ | 354 | /* Clear Pending Interrupt by writing '1' to it */ |
355 | *IXP23XX_TIMER_STATUS = IXP23XX_TIMER1_INT_PEND; | 355 | *IXP23XX_TIMER_STATUS = IXP23XX_TIMER1_INT_PEND; |
356 | while ((*IXP23XX_TIMER_CONT - next_jiffy_time) > LATCH) { | 356 | while ((signed long)(*IXP23XX_TIMER_CONT - next_jiffy_time) >= LATCH) { |
357 | timer_tick(regs); | 357 | timer_tick(regs); |
358 | next_jiffy_time += LATCH; | 358 | next_jiffy_time += LATCH; |
359 | } | 359 | } |