ARM: ixp4xx: stop using <mach/timex.h>
authorUwe Kleine-König <u.kleine-koenig@pengutronix.de>
Tue, 26 Nov 2013 18:25:59 +0000 (19:25 +0100)
committerUwe Kleine-König <u.kleine-koenig@pengutronix.de>
Fri, 20 Dec 2013 10:44:24 +0000 (11:44 +0100)
The only user of symbols defined in ixp4xx's <mach/timex.h> is common.c.
Fix that one up by moving the used #define into common.c directly and
add a local substitute for the global define LATCH which uses
CLOCK_TICK_RATE. This makes ixp4xx not to be a bar to dropping support
for <mach/timex.h>.

Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
arch/arm/mach-ixp4xx/common.c

index 9edaf4734fa84956d27539b2411e581aa1ef76a5..20b62aa30086fc3deb5ec7ce8d1bc53d7d617044 100644 (file)
@@ -23,7 +23,6 @@
 #include <linux/interrupt.h>
 #include <linux/bitops.h>
 #include <linux/time.h>
-#include <linux/timex.h>
 #include <linux/clocksource.h>
 #include <linux/clockchips.h>
 #include <linux/io.h>
@@ -45,6 +44,9 @@
 #include <asm/mach/irq.h>
 #include <asm/mach/time.h>
 
+#define IXP4XX_TIMER_FREQ 66666000
+#define IXP4XX_LATCH DIV_ROUND_CLOSEST(IXP4XX_TIMER_FREQ, HZ)
+
 static void __init ixp4xx_clocksource_init(void);
 static void __init ixp4xx_clockevent_init(void);
 static struct clock_event_device clockevent_ixp4xx;
@@ -520,7 +522,7 @@ static void ixp4xx_set_mode(enum clock_event_mode mode,
 
        switch (mode) {
        case CLOCK_EVT_MODE_PERIODIC:
-               osrt = LATCH & ~IXP4XX_OST_RELOAD_MASK;
+               osrt = IXP4XX_LATCH & ~IXP4XX_OST_RELOAD_MASK;
                opts = IXP4XX_OST_ENABLE;
                break;
        case CLOCK_EVT_MODE_ONESHOT:
This page took 0.030974 seconds and 5 git commands to generate.