aboutsummaryrefslogtreecommitdiffstats
path: root/arch/arm/mach-ixp4xx/common.c
diff options
context:
space:
mode:
authorUwe Kleine-König <u.kleine-koenig@pengutronix.de>2013-11-26 13:25:59 -0500
committerUwe Kleine-König <u.kleine-koenig@pengutronix.de>2013-12-20 05:44:24 -0500
commitf0402f9b47112faea10541b799b61066ae322c36 (patch)
treeac75ce48ed26d7aed05d894b69417fea7e404801 /arch/arm/mach-ixp4xx/common.c
parent3ae1a6b153b099fc7e50f9c74ae208bd72c02c3d (diff)
ARM: ixp4xx: stop using <mach/timex.h>
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>
Diffstat (limited to 'arch/arm/mach-ixp4xx/common.c')
-rw-r--r--arch/arm/mach-ixp4xx/common.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/arch/arm/mach-ixp4xx/common.c b/arch/arm/mach-ixp4xx/common.c
index 9edaf4734fa8..20b62aa30086 100644
--- a/arch/arm/mach-ixp4xx/common.c
+++ b/arch/arm/mach-ixp4xx/common.c
@@ -23,7 +23,6 @@
23#include <linux/interrupt.h> 23#include <linux/interrupt.h>
24#include <linux/bitops.h> 24#include <linux/bitops.h>
25#include <linux/time.h> 25#include <linux/time.h>
26#include <linux/timex.h>
27#include <linux/clocksource.h> 26#include <linux/clocksource.h>
28#include <linux/clockchips.h> 27#include <linux/clockchips.h>
29#include <linux/io.h> 28#include <linux/io.h>
@@ -45,6 +44,9 @@
45#include <asm/mach/irq.h> 44#include <asm/mach/irq.h>
46#include <asm/mach/time.h> 45#include <asm/mach/time.h>
47 46
47#define IXP4XX_TIMER_FREQ 66666000
48#define IXP4XX_LATCH DIV_ROUND_CLOSEST(IXP4XX_TIMER_FREQ, HZ)
49
48static void __init ixp4xx_clocksource_init(void); 50static void __init ixp4xx_clocksource_init(void);
49static void __init ixp4xx_clockevent_init(void); 51static void __init ixp4xx_clockevent_init(void);
50static struct clock_event_device clockevent_ixp4xx; 52static struct clock_event_device clockevent_ixp4xx;
@@ -520,7 +522,7 @@ static void ixp4xx_set_mode(enum clock_event_mode mode,
520 522
521 switch (mode) { 523 switch (mode) {
522 case CLOCK_EVT_MODE_PERIODIC: 524 case CLOCK_EVT_MODE_PERIODIC:
523 osrt = LATCH & ~IXP4XX_OST_RELOAD_MASK; 525 osrt = IXP4XX_LATCH & ~IXP4XX_OST_RELOAD_MASK;
524 opts = IXP4XX_OST_ENABLE; 526 opts = IXP4XX_OST_ENABLE;
525 break; 527 break;
526 case CLOCK_EVT_MODE_ONESHOT: 528 case CLOCK_EVT_MODE_ONESHOT: