]> git.baikalelectronics.ru Git - uboot.git/commit
x86: tsc: Read all ratio bits from MSR_PLATFORM_INFO
authorBin Meng <bmeng.cn@gmail.com>
Wed, 26 Jul 2017 03:12:00 +0000 (20:12 -0700)
committerBin Meng <bmeng.cn@gmail.com>
Tue, 1 Aug 2017 12:17:02 +0000 (20:17 +0800)
commit61278a7326d9771a3aa7eb87d47e957c60767920
tree2fbcd69bd34711643eae8e3360fd004d6524b419
parent9aac5752674f409aee214c3e200abb46abe26d13
x86: tsc: Read all ratio bits from MSR_PLATFORM_INFO

Currently we read the tsc radio like this:

ratio = (MSR_PLATFORM_INFO >> 8) & 0x1f;

Thus we get bit 8-12 of MSR_PLATFORM_INFO, however according to the
Intel manual, the ratio bits are bit 8-15.

Fix this problem by masking 0xff instead.

This keeps in sync with Linux kernel commit:
  886123f: x86/tsc: Read all ratio bits from MSR_PLATFORM_INFO

Signed-off-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
drivers/timer/tsc_timer.c