summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorQuinn Jensen <quinn.jensen@freescale.com>2007-10-24 21:23:52 -0600
committerQuinn Jensen <quinn.jensen@freescale.com>2007-10-24 21:23:52 -0600
commit6ebdc11c26d24528a29140f0dda03503e2bad6af (patch)
treec4e7828f61e0cd43134265df55b2534b61f33f96
parent05c071bed3abb9504021a7d9c0f11f022d692db3 (diff)
Fixed a problem where time ran too slow by 4x.
Patch to fix a problem where time ran too slow by 4x. Applies to linux 2.6.22 kernel for MX platforms. Taken from patch sent by GSO. http://www.bitshrine.org/gpp/linux-2.6.22-mx-Fixed-a-problem-where-time-ran-too-slow-by.patch
-rw-r--r--arch/arm/mach-mx27/time.c1
-rw-r--r--arch/arm/plat-mxc/time.c1
2 files changed, 2 insertions, 0 deletions
diff --git a/arch/arm/mach-mx27/time.c b/arch/arm/mach-mx27/time.c
index a8af7ccc55ef..97c56e18ec64 100644
--- a/arch/arm/mach-mx27/time.c
+++ b/arch/arm/mach-mx27/time.c
@@ -192,6 +192,7 @@ void __init mxc_init_time(void)
#ifdef CLOCK_TICK_RATE
div = rate / CLOCK_TICK_RATE;
WARN_ON((div * CLOCK_TICK_RATE) != rate);
+ rate /= div;
#else /* Hopefully CLOCK_TICK_RATE will go away soon */
div = 1;
while (rate > 20000000) {
diff --git a/arch/arm/plat-mxc/time.c b/arch/arm/plat-mxc/time.c
index 1c5fdcd3a720..5ba34425604e 100644
--- a/arch/arm/plat-mxc/time.c
+++ b/arch/arm/plat-mxc/time.c
@@ -253,6 +253,7 @@ void __init mxc_init_time(void)
#ifdef CLOCK_TICK_RATE
div = rate / CLOCK_TICK_RATE;
WARN_ON((div * CLOCK_TICK_RATE) != rate);
+ rate /= div;
#else /* Hopefully CLOCK_TICK_RATE will go away soon */
div = 1;
while (rate > 20000000) {