aboutsummaryrefslogtreecommitdiffstats
path: root/arch/arm/mach-netx/time.c
diff options
context:
space:
mode:
Diffstat (limited to 'arch/arm/mach-netx/time.c')
-rw-r--r--arch/arm/mach-netx/time.c16
1 files changed, 2 insertions, 14 deletions
diff --git a/arch/arm/mach-netx/time.c b/arch/arm/mach-netx/time.c
index f12f22d09b6c..e24c141ba489 100644
--- a/arch/arm/mach-netx/time.c
+++ b/arch/arm/mach-netx/time.c
@@ -104,19 +104,6 @@ static struct irqaction netx_timer_irq = {
104 .handler = netx_timer_interrupt, 104 .handler = netx_timer_interrupt,
105}; 105};
106 106
107cycle_t netx_get_cycles(struct clocksource *cs)
108{
109 return readl(NETX_GPIO_COUNTER_CURRENT(TIMER_CLOCKSOURCE));
110}
111
112static struct clocksource clocksource_netx = {
113 .name = "netx_timer",
114 .rating = 200,
115 .read = netx_get_cycles,
116 .mask = CLOCKSOURCE_MASK(32),
117 .flags = CLOCK_SOURCE_IS_CONTINUOUS,
118};
119
120/* 107/*
121 * Set up timer interrupt 108 * Set up timer interrupt
122 */ 109 */
@@ -150,7 +137,8 @@ static void __init netx_timer_init(void)
150 writel(NETX_GPIO_COUNTER_CTRL_RUN, 137 writel(NETX_GPIO_COUNTER_CTRL_RUN,
151 NETX_GPIO_COUNTER_CTRL(TIMER_CLOCKSOURCE)); 138 NETX_GPIO_COUNTER_CTRL(TIMER_CLOCKSOURCE));
152 139
153 clocksource_register_hz(&clocksource_netx, CLOCK_TICK_RATE); 140 clocksource_mmio_init(NETX_GPIO_COUNTER_CURRENT(TIMER_CLOCKSOURCE),
141 "netx_timer", CLOCK_TICK_RATE, 200, 32, clocksource_mmio_readl_up);
154 142
155 netx_clockevent.mult = div_sc(CLOCK_TICK_RATE, NSEC_PER_SEC, 143 netx_clockevent.mult = div_sc(CLOCK_TICK_RATE, NSEC_PER_SEC,
156 netx_clockevent.shift); 144 netx_clockevent.shift);