]> git.baikalelectronics.ru Git - kernel.git/commit
x86: hpet: workaround SB700 BIOS
authorThomas Gleixner <tglx@linutronix.de>
Thu, 14 Aug 2008 10:17:06 +0000 (12:17 +0200)
committerThomas Gleixner <tglx@linutronix.de>
Thu, 14 Aug 2008 11:23:45 +0000 (13:23 +0200)
commitc54833c494b8b7f322f1ef34bd7ef33b4bdf8c2b
tree597cc3ed1c221c4ea76bdb51c327604b8115b85f
parent101cc9d6919c52f4c35f62c4810cab954322dcba
x86: hpet: workaround SB700 BIOS

AMD SB700 based systems with spread spectrum enabled use a SMM based
HPET emulation to provide proper frequency setting. The SMM code is
initialized with the first HPET register access and takes some time to
complete. During this time the config register reads 0xffffffff. We
check for max. 1000 loops whether the config register reads a non
0xffffffff value to make sure that HPET is up and running before we go
further. A counting loop is safe, as the HPET access takes thousands
of CPU cycles. On non SB700 based machines this check is only done
once and has no side effects.

Based on a quirk patch from: crane cai <crane.cai@amd.com>

Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
arch/x86/kernel/hpet.c