Commit 36445cf3 authored by Willy Tarreau's avatar Willy Tarreau Committed by Thomas Gleixner

x86: GEODE fix MFGPT input clock value

The GEODE MFGPT code assumed that 32kHz was 32000 Hz while the boards
run on a 32.768 kHz digital watch crystal. In practise, it will not
change the timer's frequency as the skew was only 2.4%, but it
should provide more accurate intervals.
Signed-off-by: default avatarWilly Tarreau <w@1wt.eu>
Signed-off-by: default avatarAndres Salomon <dilinger@debian.org>
Signed-off-by: default avatarJordan Crouse <jordan.crouse@amd.com>
Signed-off-by: default avatarIngo Molnar <mingo@elte.hu>
Signed-off-by: default avatarThomas Gleixner <tglx@linutronix.de>
parent e78a77c3
...@@ -12,21 +12,20 @@ ...@@ -12,21 +12,20 @@
*/ */
/* /*
* We are using the 32Khz input clock - its the only one that has the * We are using the 32.768kHz input clock - it's the only one that has the
* ranges we find desirable. The following table lists the suitable * ranges we find desirable. The following table lists the suitable
* divisors and the associated hz, minimum interval * divisors and the associated Hz, minimum interval and the maximum interval:
* and the maximum interval:
* *
* Divisor Hz Min Delta (S) Max Delta (S) * Divisor Hz Min Delta (s) Max Delta (s)
* 1 32000 .0005 2.048 * 1 32768 .00048828125 2.000
* 2 16000 .001 4.096 * 2 16384 .0009765625 4.000
* 4 8000 .002 8.192 * 4 8192 .001953125 8.000
* 8 4000 .004 16.384 * 8 4096 .00390625 16.000
* 16 2000 .008 32.768 * 16 2048 .0078125 32.000
* 32 1000 .016 65.536 * 32 1024 .015625 64.000
* 64 500 .032 131.072 * 64 512 .03125 128.000
* 128 250 .064 262.144 * 128 256 .0625 256.000
* 256 125 .128 524.288 * 256 128 .125 512.000
*/ */
#include <linux/kernel.h> #include <linux/kernel.h>
...@@ -45,7 +44,7 @@ static struct mfgpt_timer_t { ...@@ -45,7 +44,7 @@ static struct mfgpt_timer_t {
#define MFGPT_DIVISOR 16 #define MFGPT_DIVISOR 16
#define MFGPT_SCALE 4 /* divisor = 2^(scale) */ #define MFGPT_SCALE 4 /* divisor = 2^(scale) */
#define MFGPT_HZ (32000 / MFGPT_DIVISOR) #define MFGPT_HZ (32768 / MFGPT_DIVISOR)
#define MFGPT_PERIODIC (MFGPT_HZ / HZ) #define MFGPT_PERIODIC (MFGPT_HZ / HZ)
#ifdef CONFIG_GEODE_MFGPT_TIMER #ifdef CONFIG_GEODE_MFGPT_TIMER
......
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