diff options
author | Olof Johansson <olof@lixom.net> | 2013-02-11 12:21:44 -0500 |
---|---|---|
committer | Olof Johansson <olof@lixom.net> | 2013-02-11 12:21:44 -0500 |
commit | 5f48a29f1721736930b7817b430039c1d348dd05 (patch) | |
tree | 69c47c1105d275810123785a947227b9aa8028d6 /arch/arm/mach-cns3xxx | |
parent | 3ad06d1a7dfd99a2e8f3a41e0fa5118551186d3c (diff) | |
parent | f8060f5446b1f2782f0a8ca9be2d870ea4198aee (diff) |
Merge branch 'depends/cleanup' into next/virt
Diffstat (limited to 'arch/arm/mach-cns3xxx')
-rw-r--r-- | arch/arm/mach-cns3xxx/cns3420vb.c | 2 | ||||
-rw-r--r-- | arch/arm/mach-cns3xxx/core.c | 19 | ||||
-rw-r--r-- | arch/arm/mach-cns3xxx/core.h | 2 |
3 files changed, 6 insertions, 17 deletions
diff --git a/arch/arm/mach-cns3xxx/cns3420vb.c b/arch/arm/mach-cns3xxx/cns3420vb.c index 26f36d7efecd..a71867e1d8d6 100644 --- a/arch/arm/mach-cns3xxx/cns3420vb.c +++ b/arch/arm/mach-cns3xxx/cns3420vb.c | |||
@@ -249,7 +249,7 @@ MACHINE_START(CNS3420VB, "Cavium Networks CNS3420 Validation Board") | |||
249 | .atag_offset = 0x100, | 249 | .atag_offset = 0x100, |
250 | .map_io = cns3420_map_io, | 250 | .map_io = cns3420_map_io, |
251 | .init_irq = cns3xxx_init_irq, | 251 | .init_irq = cns3xxx_init_irq, |
252 | .timer = &cns3xxx_timer, | 252 | .init_time = cns3xxx_timer_init, |
253 | .init_machine = cns3420_init, | 253 | .init_machine = cns3420_init, |
254 | .restart = cns3xxx_restart, | 254 | .restart = cns3xxx_restart, |
255 | MACHINE_END | 255 | MACHINE_END |
diff --git a/arch/arm/mach-cns3xxx/core.c b/arch/arm/mach-cns3xxx/core.c index db3806c00f4b..e698f26cc0cb 100644 --- a/arch/arm/mach-cns3xxx/core.c +++ b/arch/arm/mach-cns3xxx/core.c | |||
@@ -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) |
diff --git a/arch/arm/mach-cns3xxx/core.h b/arch/arm/mach-cns3xxx/core.h index 4894b8c17151..b23b17b4da10 100644 --- a/arch/arm/mach-cns3xxx/core.h +++ b/arch/arm/mach-cns3xxx/core.h | |||
@@ -11,7 +11,7 @@ | |||
11 | #ifndef __CNS3XXX_CORE_H | 11 | #ifndef __CNS3XXX_CORE_H |
12 | #define __CNS3XXX_CORE_H | 12 | #define __CNS3XXX_CORE_H |
13 | 13 | ||
14 | extern struct sys_timer cns3xxx_timer; | 14 | extern void cns3xxx_timer_init(void); |
15 | 15 | ||
16 | #ifdef CONFIG_CACHE_L2X0 | 16 | #ifdef CONFIG_CACHE_L2X0 |
17 | void __init cns3xxx_l2x0_init(void); | 17 | void __init cns3xxx_l2x0_init(void); |