Fixed a problem where time ran too slow by 4x.
authorQuinn Jensen <quinn.jensen@freescale.com>
Thu, 25 Oct 2007 03:23:52 +0000 (21:23 -0600)
committerQuinn Jensen <quinn.jensen@freescale.com>
Thu, 25 Oct 2007 03:23:52 +0000 (21:23 -0600)
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

arch/arm/mach-mx27/time.c
arch/arm/plat-mxc/time.c

index a8af7ccc55efdca4ffe62c87c0ba343433667c5f..97c56e18ec645431c52e7cb1cb987e78f304694b 100644 (file)
@@ -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) {
index 1c5fdcd3a72019588ce6263fcb2c6b5ed0704f2d..5ba34425604e9faad3634efc7167f0021c202ec8 100644 (file)
@@ -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) {