aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJim Cromie <jim.cromie@gmail.com>2006-10-04 05:15:35 -0400
committerLinus Torvalds <torvalds@g5.osdl.org>2006-10-04 10:55:14 -0400
commit856fe98f168e5b80b053979769af2514aab96d6b (patch)
treebd166c91b9b27cf48f69533f67026a2330d41cc1
parent9bded00bf62090ebc9d6e8be640cdb69e8497db6 (diff)
[PATCH] scx200_hrt: fix precedence bug manifesting as 27x clock in 1 MHz mode
Fix paren-placement / precedence bug breaking initialization for 1 MHz clock mode. Also fix comment spelling error, and fence-post (off-by-one) error on symbol used in request_region. Addresses http://bugzilla.kernel.org/show_bug.cgi?id=7242 Thanks alexander.krause@erazor-zone.de, dzpost@dedekind.net, for the reports and patch test, and phelps@mantara.com for the independent patch and verification. Signed-off-by: Jim Cromie <jim.cromie@gmail.com> Cc: <alexander.krause@erazor-zone.de> Cc: <dzpost@dedekind.net> Cc: <phelps@mantara.com> Acked-by: John Stultz <johnstul@us.ibm.com> Cc: <stable@kernel.org> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
-rw-r--r--drivers/clocksource/scx200_hrt.c4
-rw-r--r--include/linux/scx200.h2
2 files changed, 3 insertions, 3 deletions
diff --git a/drivers/clocksource/scx200_hrt.c b/drivers/clocksource/scx200_hrt.c
index d418b8297211..22915cc46ba7 100644
--- a/drivers/clocksource/scx200_hrt.c
+++ b/drivers/clocksource/scx200_hrt.c
@@ -63,7 +63,7 @@ static struct clocksource cs_hrt = {
63 63
64static int __init init_hrt_clocksource(void) 64static int __init init_hrt_clocksource(void)
65{ 65{
66 /* Make sure scx200 has initializedd the configuration block */ 66 /* Make sure scx200 has initialized the configuration block */
67 if (!scx200_cb_present()) 67 if (!scx200_cb_present())
68 return -ENODEV; 68 return -ENODEV;
69 69
@@ -76,7 +76,7 @@ static int __init init_hrt_clocksource(void)
76 } 76 }
77 77
78 /* write timer config */ 78 /* write timer config */
79 outb(HR_TMEN | (mhz27) ? HR_TMCLKSEL : 0, 79 outb(HR_TMEN | (mhz27 ? HR_TMCLKSEL : 0),
80 scx200_cb_base + SCx200_TMCNFG_OFFSET); 80 scx200_cb_base + SCx200_TMCNFG_OFFSET);
81 81
82 if (mhz27) { 82 if (mhz27) {
diff --git a/include/linux/scx200.h b/include/linux/scx200.h
index 693c0557e70b..de466e11e271 100644
--- a/include/linux/scx200.h
+++ b/include/linux/scx200.h
@@ -32,7 +32,7 @@ extern unsigned scx200_cb_base;
32 32
33/* High Resolution Timer */ 33/* High Resolution Timer */
34#define SCx200_TIMER_OFFSET 0x08 34#define SCx200_TIMER_OFFSET 0x08
35#define SCx200_TIMER_SIZE 0x05 35#define SCx200_TIMER_SIZE 0x06
36 36
37/* Clock Generators */ 37/* Clock Generators */
38#define SCx200_CLOCKGEN_OFFSET 0x10 38#define SCx200_CLOCKGEN_OFFSET 0x10