From 36ee8787927ed53bf058727a7355b7a7684e922d Mon Sep 17 00:00:00 2001 From: Jordan Crouse Date: Tue, 22 Jan 2008 23:30:16 +0100 Subject: [PATCH] --- yaml --- r: 75638 b: refs/heads/master c: 667984d9e481e43a930a478c588dced98cb61fea h: refs/heads/master v: v3 --- [refs] | 2 +- trunk/arch/x86/kernel/mfgpt_32.c | 15 ++++++++------- 2 files changed, 9 insertions(+), 8 deletions(-) diff --git a/[refs] b/[refs] index ba6616a8a2d9..4cc30746e7a9 100644 --- a/[refs] +++ b/[refs] @@ -1,2 +1,2 @@ --- -refs/heads/master: 889c94a14e38e749c8060f597ee7825ea0764229 +refs/heads/master: 667984d9e481e43a930a478c588dced98cb61fea diff --git a/trunk/arch/x86/kernel/mfgpt_32.c b/trunk/arch/x86/kernel/mfgpt_32.c index 0ab680f2d9db..3960ab7e1497 100644 --- a/trunk/arch/x86/kernel/mfgpt_32.c +++ b/trunk/arch/x86/kernel/mfgpt_32.c @@ -278,12 +278,12 @@ static int mfgpt_next_event(unsigned long delta, struct clock_event_device *evt) static irqreturn_t mfgpt_tick(int irq, void *dev_id) { + /* Turn off the clock (and clear the event) */ + mfgpt_disable_timer(mfgpt_event_clock); + if (mfgpt_tick_mode == CLOCK_EVT_MODE_SHUTDOWN) return IRQ_HANDLED; - /* Turn off the clock */ - mfgpt_disable_timer(mfgpt_event_clock); - /* Clear the counter */ geode_mfgpt_write(mfgpt_event_clock, MFGPT_REG_COUNTER, 0); @@ -319,10 +319,6 @@ static int __init mfgpt_timer_setup(void) } mfgpt_event_clock = timer; - /* Set the clock scale and enable the event mode for CMP2 */ - val = MFGPT_SCALE | (3 << 8); - - geode_mfgpt_write(mfgpt_event_clock, MFGPT_REG_SETUP, val); /* Set up the IRQ on the MFGPT side */ if (geode_mfgpt_setup_irq(mfgpt_event_clock, MFGPT_CMP2, irq)) { @@ -339,6 +335,11 @@ static int __init mfgpt_timer_setup(void) goto err; } + /* Set the clock scale and enable the event mode for CMP2 */ + val = MFGPT_SCALE | (3 << 8); + + geode_mfgpt_write(mfgpt_event_clock, MFGPT_REG_SETUP, val); + /* Set up the clock event */ mfgpt_clockevent.mult = div_sc(MFGPT_HZ, NSEC_PER_SEC, 32); mfgpt_clockevent.min_delta_ns = clockevent_delta2ns(0xF,