]> pilppa.com Git - linux-2.6-omap-h63xx.git/commitdiff
[POWERPC] 40x decrementer fixes
authorJosh Boyer <jwboyer@linux.vnet.ibm.com>
Mon, 20 Aug 2007 12:29:11 +0000 (07:29 -0500)
committerJosh Boyer <jwboyer@linux.vnet.ibm.com>
Mon, 20 Aug 2007 12:29:11 +0000 (07:29 -0500)
Allow generic_calibrate_decr to work for 40x platforms.  Given that the hardware
behavior is identical, this also changes the set_dec function to reload the PIT
on 40x to match the behavior 44x currently has.

Signed-off-by: Josh Boyer <jwboyer@linux.vnet.ibm.com>
arch/powerpc/kernel/time.c
include/asm-powerpc/time.h

index c85d9b0d90420c53927b5b8e622a32ce146bf4e5..b5944d8e3802b5c7a31ef642856e4ac19887e300 100644 (file)
@@ -866,7 +866,7 @@ void __init generic_calibrate_decr(void)
                                "(not found)\n");
        }
 
-#ifdef CONFIG_BOOKE
+#if defined(CONFIG_BOOKE) || defined(CONFIG_40x)
        /* Set the time base to zero */
        mtspr(SPRN_TBWL, 0);
        mtspr(SPRN_TBWU, 0);
index d7f5ddfbaac77f5f69c32643a6ef1691bb6e7820..fdc271ebe41c8e62aab50ebfebd4fb80dcbfaa48 100644 (file)
@@ -174,7 +174,7 @@ static inline unsigned int get_dec(void)
 static inline void set_dec(int val)
 {
 #if defined(CONFIG_40x)
-       return;         /* Have to let it auto-reload */
+       mtspr(SPRN_PIT, val);
 #elif defined(CONFIG_8xx_CPU6)
        set_dec_cpu6(val);
 #else