diff options
-rw-r--r-- | arch/arm/mach-ixp4xx/common.c | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/arch/arm/mach-ixp4xx/common.c b/arch/arm/mach-ixp4xx/common.c index 20b62aa30086..37e6cdac1642 100644 --- a/arch/arm/mach-ixp4xx/common.c +++ b/arch/arm/mach-ixp4xx/common.c @@ -45,7 +45,15 @@ #include <asm/mach/time.h> #define IXP4XX_TIMER_FREQ 66666000 -#define IXP4XX_LATCH DIV_ROUND_CLOSEST(IXP4XX_TIMER_FREQ, HZ) + +/* + * The timer register doesn't allow to specify the two least significant bits of + * the timeout value and assumes them being zero. So make sure IXP4XX_LATCH is + * the best value with the two least significant bits unset. + */ +#define IXP4XX_LATCH DIV_ROUND_CLOSEST(IXP4XX_TIMER_FREQ, \ + (IXP4XX_OST_RELOAD_MASK + 1) * HZ) * \ + (IXP4XX_OST_RELOAD_MASK + 1) static void __init ixp4xx_clocksource_init(void); static void __init ixp4xx_clockevent_init(void); |