Commit 9c00bf6a authored by Christoph Lameter's avatar Christoph Lameter Committed by Linus Torvalds

[PATCH] Support HPET with a single timer for system time

This patch removes the check for the existence of multiple HPET timers.  It
allows the use of HPET with only a single timer for system time if
HPET_EMULATE_RTC is not set.
Signed-off-by: default avatarChristoph Lameter <christoph@lameter.com>
Signed-off-by: default avatarShai Fultheim <Shai@Scalex86.org>
Acked-by: default avatar"Pallipadi, Venkatesh" <venkatesh.pallipadi@intel.com>
Signed-off-by: default avatarAndrew Morton <akpm@osdl.org>
Signed-off-by: default avatarLinus Torvalds <torvalds@osdl.org>
parent 113b500b
......@@ -121,11 +121,16 @@ int __init hpet_enable(void)
id = hpet_readl(HPET_ID);
/*
* We are checking for value '1' or more in number field.
* So, we are OK with HPET_EMULATE_RTC part too, where we need
* to have atleast 2 timers.
* We are checking for value '1' or more in number field if
* CONFIG_HPET_EMULATE_RTC is set because we will need an
* additional timer for RTC emulation.
* However, we can do with one timer otherwise using the
* the single HPET timer for system time.
*/
if (!(id & HPET_ID_NUMBER) ||
if (
#ifdef CONFIG_HPET_EMULATE_RTC
!(id & HPET_ID_NUMBER) ||
#endif
!(id & HPET_ID_LEGSUP))
return -1;
......
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