diff options
Diffstat (limited to 'arch/arm/mach-cns3xxx/core.c')
-rw-r--r-- | arch/arm/mach-cns3xxx/core.c | 21 |
1 files changed, 5 insertions, 16 deletions
diff --git a/arch/arm/mach-cns3xxx/core.c b/arch/arm/mach-cns3xxx/core.c index 031805b1428d..e698f26cc0cb 100644 --- a/arch/arm/mach-cns3xxx/core.c +++ b/arch/arm/mach-cns3xxx/core.c | |||
@@ -12,10 +12,10 @@ | |||
12 | #include <linux/interrupt.h> | 12 | #include <linux/interrupt.h> |
13 | #include <linux/clockchips.h> | 13 | #include <linux/clockchips.h> |
14 | #include <linux/io.h> | 14 | #include <linux/io.h> |
15 | #include <linux/irqchip/arm-gic.h> | ||
15 | #include <asm/mach/map.h> | 16 | #include <asm/mach/map.h> |
16 | #include <asm/mach/time.h> | 17 | #include <asm/mach/time.h> |
17 | #include <asm/mach/irq.h> | 18 | #include <asm/mach/irq.h> |
18 | #include <asm/hardware/gic.h> | ||
19 | #include <asm/hardware/cache-l2x0.h> | 19 | #include <asm/hardware/cache-l2x0.h> |
20 | #include <mach/cns3xxx.h> | 20 | #include <mach/cns3xxx.h> |
21 | #include "core.h" | 21 | #include "core.h" |
@@ -134,7 +134,6 @@ static int cns3xxx_timer_set_next_event(unsigned long evt, | |||
134 | 134 | ||
135 | static struct clock_event_device cns3xxx_tmr1_clockevent = { | 135 | static struct clock_event_device cns3xxx_tmr1_clockevent = { |
136 | .name = "cns3xxx timer1", | 136 | .name = "cns3xxx timer1", |
137 | .shift = 8, | ||
138 | .features = CLOCK_EVT_FEAT_PERIODIC | CLOCK_EVT_FEAT_ONESHOT, | 137 | .features = CLOCK_EVT_FEAT_PERIODIC | CLOCK_EVT_FEAT_ONESHOT, |
139 | .set_mode = cns3xxx_timer_set_mode, | 138 | .set_mode = cns3xxx_timer_set_mode, |
140 | .set_next_event = cns3xxx_timer_set_next_event, | 139 | .set_next_event = cns3xxx_timer_set_next_event, |
@@ -145,15 +144,9 @@ static struct clock_event_device cns3xxx_tmr1_clockevent = { | |||
145 | static void __init cns3xxx_clockevents_init(unsigned int timer_irq) | 144 | static void __init cns3xxx_clockevents_init(unsigned int timer_irq) |
146 | { | 145 | { |
147 | cns3xxx_tmr1_clockevent.irq = timer_irq; | 146 | cns3xxx_tmr1_clockevent.irq = timer_irq; |
148 | cns3xxx_tmr1_clockevent.mult = | 147 | clockevents_config_and_register(&cns3xxx_tmr1_clockevent, |
149 | div_sc((cns3xxx_cpu_clock() >> 3) * 1000000, NSEC_PER_SEC, | 148 | (cns3xxx_cpu_clock() >> 3) * 1000000, |
150 | cns3xxx_tmr1_clockevent.shift); | 149 | 0xf, 0xffffffff); |
151 | cns3xxx_tmr1_clockevent.max_delta_ns = | ||
152 | clockevent_delta2ns(0xffffffff, &cns3xxx_tmr1_clockevent); | ||
153 | cns3xxx_tmr1_clockevent.min_delta_ns = | ||
154 | clockevent_delta2ns(0xf, &cns3xxx_tmr1_clockevent); | ||
155 | |||
156 | clockevents_register_device(&cns3xxx_tmr1_clockevent); | ||
157 | } | 150 | } |
158 | 151 | ||
159 | /* | 152 | /* |
@@ -235,17 +228,13 @@ static void __init __cns3xxx_timer_init(unsigned int timer_irq) | |||
235 | cns3xxx_clockevents_init(timer_irq); | 228 | cns3xxx_clockevents_init(timer_irq); |
236 | } | 229 | } |
237 | 230 | ||
238 | static void __init cns3xxx_timer_init(void) | 231 | void __init cns3xxx_timer_init(void) |
239 | { | 232 | { |
240 | cns3xxx_tmr1 = IOMEM(CNS3XXX_TIMER1_2_3_BASE_VIRT); | 233 | cns3xxx_tmr1 = IOMEM(CNS3XXX_TIMER1_2_3_BASE_VIRT); |
241 | 234 | ||
242 | __cns3xxx_timer_init(IRQ_CNS3XXX_TIMER0); | 235 | __cns3xxx_timer_init(IRQ_CNS3XXX_TIMER0); |
243 | } | 236 | } |
244 | 237 | ||
245 | struct sys_timer cns3xxx_timer = { | ||
246 | .init = cns3xxx_timer_init, | ||
247 | }; | ||
248 | |||
249 | #ifdef CONFIG_CACHE_L2X0 | 238 | #ifdef CONFIG_CACHE_L2X0 |
250 | 239 | ||
251 | void __init cns3xxx_l2x0_init(void) | 240 | void __init cns3xxx_l2x0_init(void) |