From: Willy Tarreau <w@1wt.eu>
To: Ingo Molnar <mingo@elte.hu>
Cc: Arnd Hannemann <hannemann@i4.informatik.rwth-aachen.de>,
Jordan Crouse <jordan.crouse@amd.com>, Lars Heete <hel@admin.de>,
Andres Salomon <dilinger@queued.net>,
Linux Kernel Mailing List <linux-kernel@vger.kernel.org>,
Thomas Gleixner <tglx@linutronix.de>,
"H. Peter Anvin" <hpa@zytor.com>,
Andrew Morton <akpm@linux-foundation.org>,
Linus Torvalds <torvalds@linux-foundation.org>
Subject: [PATCH 1/2] x86: GEODE fix MFGPT input clock value
Date: Wed, 23 Jan 2008 22:18:59 +0100 [thread overview]
Message-ID: <20080123211859.GA3081@1wt.eu> (raw)
In-Reply-To: <20080123211746.GA2969@1wt.eu>
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: Willy Tarreau <w@1wt.eu>
---
arch/x86/kernel/mfgpt_32.c | 24 ++++++++++++------------
1 files changed, 12 insertions(+), 12 deletions(-)
diff --git a/arch/x86/kernel/mfgpt_32.c b/arch/x86/kernel/mfgpt_32.c
index 3960ab7..5519091 100644
--- a/arch/x86/kernel/mfgpt_32.c
+++ b/arch/x86/kernel/mfgpt_32.c
@@ -12,21 +12,21 @@
*/
/*
- * We are using the 32Khz input clock - its the only one that has the
+ * We are using the 32.768Khz input clock - its the only one that has the
* ranges we find desirable. The following table lists the suitable
* divisors and the associated hz, minimum interval
* and the maximum interval:
*
- * Divisor Hz Min Delta (S) Max Delta (S)
- * 1 32000 .0005 2.048
- * 2 16000 .001 4.096
- * 4 8000 .002 8.192
- * 8 4000 .004 16.384
- * 16 2000 .008 32.768
- * 32 1000 .016 65.536
- * 64 500 .032 131.072
- * 128 250 .064 262.144
- * 256 125 .128 524.288
+ * Divisor Hz Min Delta (S) Max Delta (S)
+ * 1 32768 .00048828125 2.000
+ * 2 16384 .0009765625 4.000
+ * 4 8192 .001953125 8.000
+ * 8 4096 .00390625 16.000
+ * 16 2048 .0078125 32.000
+ * 32 1024 .015625 64.000
+ * 64 512 .03125 128.000
+ * 128 256 .0625 256.000
+ * 256 128 .125 512.000
*/
#include <linux/kernel.h>
@@ -45,7 +45,7 @@ static struct mfgpt_timer_t {
#define MFGPT_DIVISOR 16
#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)
#ifdef CONFIG_GEODE_MFGPT_TIMER
--
1.5.3.4
next prev parent reply other threads:[~2008-01-23 21:49 UTC|newest]
Thread overview: 52+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-01-16 17:44 2.6.24-rc8 hangs at mfgpt-timer Arnd Hannemann
2008-01-16 21:19 ` Andres Salomon
2008-01-16 21:56 ` Andres Salomon
2008-01-17 9:54 ` Arnd Hannemann
2008-01-17 18:40 ` Andres Salomon
2008-01-17 19:53 ` Arnd Hannemann
2008-01-17 20:42 ` Andres Salomon
2008-01-17 21:19 ` Jordan Crouse
2008-01-17 21:50 ` Arnd Hannemann
2008-01-17 22:36 ` Jordan Crouse
2008-01-17 22:52 ` Arnd Hannemann
2008-01-17 22:57 ` Jordan Crouse
2008-01-17 23:39 ` Arnd Hannemann
2008-01-18 0:40 ` Jordan Crouse
2008-01-21 23:27 ` Jordan Crouse
2008-01-21 23:32 ` Willy Tarreau
2008-01-22 20:15 ` Willy Tarreau
2008-01-22 21:08 ` Jordan Crouse
2008-01-22 21:15 ` Willy Tarreau
2008-01-23 16:36 ` Jordan Crouse
2008-01-23 16:10 ` Willy Tarreau
2008-01-22 9:03 ` Arnd Hannemann
2008-01-22 10:11 ` Lars Heete
2008-01-22 11:18 ` Arnd Hannemann
2008-01-22 18:15 ` Jordan Crouse
2008-01-22 19:27 ` Jordan Crouse
2008-01-22 20:54 ` Arnd Hannemann
2008-01-22 21:10 ` Ingo Molnar
2008-01-22 21:20 ` Willy Tarreau
2008-01-22 21:53 ` [git pull] was: " Thomas Gleixner
2008-01-23 21:17 ` [PATCH 0/2] Was: " Willy Tarreau
2008-01-23 21:18 ` Willy Tarreau [this message]
2008-01-23 21:59 ` [PATCH 1/2] x86: GEODE fix MFGPT input clock value H. Peter Anvin
2008-01-23 22:11 ` Willy Tarreau
2008-01-23 22:22 ` H. Peter Anvin
2008-01-23 22:10 ` Willy Tarreau
2008-01-23 22:38 ` Jordan Crouse
2008-01-23 23:17 ` Arnd Hannemann
2008-01-23 21:19 ` [PATCH 2/2] x86: GEODE add the "mfgptfix" boot time option to fix MFGPT timers Willy Tarreau
2008-01-19 1:06 ` [GEODE] Geode GX/LX watchdog timer (was 2.6.24-rc8 hangs at mfgpt-timer) Jordan Crouse
2008-01-19 6:36 ` Willy Tarreau
2008-01-20 13:22 ` Arnd Hannemann
2008-01-20 16:34 ` Jordan Crouse
2008-01-21 17:07 ` Geode GX/LX watchdog timer (RESEND) Jordan Crouse
2008-01-21 18:37 ` Arnd Hannemann
2008-02-17 14:14 ` Iain Paton
2008-02-17 14:46 ` Arnd Hannemann
2008-02-17 14:54 ` Adrian Bunk
2008-02-17 16:10 ` Iain Paton
2008-02-17 17:32 ` Andres Salomon
2008-02-17 19:46 ` Arnd Hannemann
2008-01-20 20:16 ` [GEODE] Geode GX/LX watchdog timer (was 2.6.24-rc8 hangs at mfgpt-timer) Lennart Sorensen
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20080123211859.GA3081@1wt.eu \
--to=w@1wt.eu \
--cc=akpm@linux-foundation.org \
--cc=dilinger@queued.net \
--cc=hannemann@i4.informatik.rwth-aachen.de \
--cc=hel@admin.de \
--cc=hpa@zytor.com \
--cc=jordan.crouse@amd.com \
--cc=linux-kernel@vger.kernel.org \
--cc=mingo@elte.hu \
--cc=tglx@linutronix.de \
--cc=torvalds@linux-foundation.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.