diff options
Diffstat (limited to 'arch/arm/mach-omap1/time.c')
-rw-r--r-- | arch/arm/mach-omap1/time.c | 17 |
1 files changed, 3 insertions, 14 deletions
diff --git a/arch/arm/mach-omap1/time.c b/arch/arm/mach-omap1/time.c index 4d4816fd6fc9..726ec23d29c7 100644 --- a/arch/arm/mach-omap1/time.c +++ b/arch/arm/mach-omap1/time.c | |||
@@ -145,7 +145,6 @@ static void omap_mpu_set_mode(enum clock_event_mode mode, | |||
145 | static struct clock_event_device clockevent_mpu_timer1 = { | 145 | static struct clock_event_device clockevent_mpu_timer1 = { |
146 | .name = "mpu_timer1", | 146 | .name = "mpu_timer1", |
147 | .features = CLOCK_EVT_FEAT_PERIODIC | CLOCK_EVT_FEAT_ONESHOT, | 147 | .features = CLOCK_EVT_FEAT_PERIODIC | CLOCK_EVT_FEAT_ONESHOT, |
148 | .shift = 32, | ||
149 | .set_next_event = omap_mpu_set_next_event, | 148 | .set_next_event = omap_mpu_set_next_event, |
150 | .set_mode = omap_mpu_set_mode, | 149 | .set_mode = omap_mpu_set_mode, |
151 | }; | 150 | }; |
@@ -170,15 +169,9 @@ static __init void omap_init_mpu_timer(unsigned long rate) | |||
170 | setup_irq(INT_TIMER1, &omap_mpu_timer1_irq); | 169 | setup_irq(INT_TIMER1, &omap_mpu_timer1_irq); |
171 | omap_mpu_timer_start(0, (rate / HZ) - 1, 1); | 170 | omap_mpu_timer_start(0, (rate / HZ) - 1, 1); |
172 | 171 | ||
173 | clockevent_mpu_timer1.mult = div_sc(rate, NSEC_PER_SEC, | ||
174 | clockevent_mpu_timer1.shift); | ||
175 | clockevent_mpu_timer1.max_delta_ns = | ||
176 | clockevent_delta2ns(-1, &clockevent_mpu_timer1); | ||
177 | clockevent_mpu_timer1.min_delta_ns = | ||
178 | clockevent_delta2ns(1, &clockevent_mpu_timer1); | ||
179 | |||
180 | clockevent_mpu_timer1.cpumask = cpumask_of(0); | 172 | clockevent_mpu_timer1.cpumask = cpumask_of(0); |
181 | clockevents_register_device(&clockevent_mpu_timer1); | 173 | clockevents_config_and_register(&clockevent_mpu_timer1, rate, |
174 | 1, -1); | ||
182 | } | 175 | } |
183 | 176 | ||
184 | 177 | ||
@@ -236,12 +229,8 @@ static inline void omap_mpu_timer_init(void) | |||
236 | * Timer initialization | 229 | * Timer initialization |
237 | * --------------------------------------------------------------------------- | 230 | * --------------------------------------------------------------------------- |
238 | */ | 231 | */ |
239 | static void __init omap1_timer_init(void) | 232 | void __init omap1_timer_init(void) |
240 | { | 233 | { |
241 | if (omap_32k_timer_init() != 0) | 234 | if (omap_32k_timer_init() != 0) |
242 | omap_mpu_timer_init(); | 235 | omap_mpu_timer_init(); |
243 | } | 236 | } |
244 | |||
245 | struct sys_timer omap1_timer = { | ||
246 | .init = omap1_timer_init, | ||
247 | }; | ||