|
@@ -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);
|