aboutsummaryrefslogtreecommitdiffstats
path: root/arch/x86
diff options
context:
space:
mode:
Diffstat (limited to 'arch/x86')
-rw-r--r--arch/x86/kernel/mfgpt_32.c15
1 files changed, 8 insertions, 7 deletions
diff --git a/arch/x86/kernel/mfgpt_32.c b/arch/x86/kernel/mfgpt_32.c
index 0ab680f2d9db..3960ab7e1497 100644
--- a/arch/x86/kernel/mfgpt_32.c
+++ b/arch/x86/kernel/mfgpt_32.c
@@ -278,12 +278,12 @@ static int mfgpt_next_event(unsigned long delta, struct clock_event_device *evt)
278 278
279static irqreturn_t mfgpt_tick(int irq, void *dev_id) 279static irqreturn_t mfgpt_tick(int irq, void *dev_id)
280{ 280{
281 /* Turn off the clock (and clear the event) */
282 mfgpt_disable_timer(mfgpt_event_clock);
283
281 if (mfgpt_tick_mode == CLOCK_EVT_MODE_SHUTDOWN) 284 if (mfgpt_tick_mode == CLOCK_EVT_MODE_SHUTDOWN)
282 return IRQ_HANDLED; 285 return IRQ_HANDLED;
283 286
284 /* Turn off the clock */
285 mfgpt_disable_timer(mfgpt_event_clock);
286
287 /* Clear the counter */ 287 /* Clear the counter */
288 geode_mfgpt_write(mfgpt_event_clock, MFGPT_REG_COUNTER, 0); 288 geode_mfgpt_write(mfgpt_event_clock, MFGPT_REG_COUNTER, 0);
289 289
@@ -319,10 +319,6 @@ static int __init mfgpt_timer_setup(void)
319 } 319 }
320 320
321 mfgpt_event_clock = timer; 321 mfgpt_event_clock = timer;
322 /* Set the clock scale and enable the event mode for CMP2 */
323 val = MFGPT_SCALE | (3 << 8);
324
325 geode_mfgpt_write(mfgpt_event_clock, MFGPT_REG_SETUP, val);
326 322
327 /* Set up the IRQ on the MFGPT side */ 323 /* Set up the IRQ on the MFGPT side */
328 if (geode_mfgpt_setup_irq(mfgpt_event_clock, MFGPT_CMP2, irq)) { 324 if (geode_mfgpt_setup_irq(mfgpt_event_clock, MFGPT_CMP2, irq)) {
@@ -339,6 +335,11 @@ static int __init mfgpt_timer_setup(void)
339 goto err; 335 goto err;
340 } 336 }
341 337
338 /* Set the clock scale and enable the event mode for CMP2 */
339 val = MFGPT_SCALE | (3 << 8);
340
341 geode_mfgpt_write(mfgpt_event_clock, MFGPT_REG_SETUP, val);
342
342 /* Set up the clock event */ 343 /* Set up the clock event */
343 mfgpt_clockevent.mult = div_sc(MFGPT_HZ, NSEC_PER_SEC, 32); 344 mfgpt_clockevent.mult = div_sc(MFGPT_HZ, NSEC_PER_SEC, 32);
344 mfgpt_clockevent.min_delta_ns = clockevent_delta2ns(0xF, 345 mfgpt_clockevent.min_delta_ns = clockevent_delta2ns(0xF,