Merge branch 'ppc-fixes' of git://git.bocc.de/dbox2 into for-2.6.24
[GitHub/mt8127/android_kernel_alcatel_ttab.git] / include / asm-powerpc / time.h
index d7f5ddfbaac77f5f69c32643a6ef1691bb6e7820..fa331dad97cbeb6d1eab619c1114e605bd00dd72 100644 (file)
@@ -149,6 +149,11 @@ static inline u64 get_tb(void)
 }
 #endif /* !CONFIG_PPC64 */
 
+static inline u64 get_tb_or_rtc(void)
+{
+       return __USE_RTC() ? get_rtc() : get_tb();
+}
+
 static inline void set_tb(unsigned int upper, unsigned int lower)
 {
        mtspr(SPRN_TBWL, 0);
@@ -174,7 +179,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