Commit 34099716 authored by Venkatesh Pallipadi's avatar Venkatesh Pallipadi Committed by Linus Torvalds

[PATCH] x86: HPET setup, duplicate HPET_T0_CMP needed for some platforms

This patch fixes the issue with HPET on some platforms.

According to Vojtech Pavlik:

The first write after writing TN_SETVAL to the config register sets the
counter value, the second write sets the threshold.

When you only do the first write you never set the threshold and interrupts
won't be generated properly.

Thanks to John Stultz and Andrew Walrond for reporting, root causing the
issue and verifying this fix.
Signed-off-by: default avatarVenkatesh Pallipadi <venkatesh.pallipadi@intel.com>
Signed-off-by: default avatarAndrew Morton <akpm@osdl.org>
Signed-off-by: default avatarLinus Torvalds <torvalds@osdl.org>
parent 106f6442
...@@ -81,6 +81,11 @@ static int hpet_timer_stop_set_go(unsigned long tick) ...@@ -81,6 +81,11 @@ static int hpet_timer_stop_set_go(unsigned long tick)
cfg |= HPET_TN_ENABLE | HPET_TN_PERIODIC | cfg |= HPET_TN_ENABLE | HPET_TN_PERIODIC |
HPET_TN_SETVAL | HPET_TN_32BIT; HPET_TN_SETVAL | HPET_TN_32BIT;
hpet_writel(cfg, HPET_T0_CFG); hpet_writel(cfg, HPET_T0_CFG);
/*
* Some systems seems to need two writes to HPET_T0_CMP,
* to get interrupts working
*/
hpet_writel(tick, HPET_T0_CMP);
hpet_writel(tick, HPET_T0_CMP); hpet_writel(tick, HPET_T0_CMP);
/* /*
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment