Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 75638
b: refs/heads/master
c: 667984d
h: refs/heads/master
v: v3
  • Loading branch information
Jordan Crouse authored and Ingo Molnar committed Jan 22, 2008
1 parent a0df2fd commit 36ee878
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 8 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 889c94a14e38e749c8060f597ee7825ea0764229
refs/heads/master: 667984d9e481e43a930a478c588dced98cb61fea
15 changes: 8 additions & 7 deletions trunk/arch/x86/kernel/mfgpt_32.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);

Expand Down Expand Up @@ -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)) {
Expand All @@ -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,
Expand Down

0 comments on commit 36ee878

Please sign in to comment.