aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--arch/powerpc/kernel/time.c2
-rw-r--r--arch/powerpc/platforms/powermac/time.c5
-rw-r--r--include/asm-powerpc/time.h2
3 files changed, 4 insertions, 5 deletions
diff --git a/arch/powerpc/kernel/time.c b/arch/powerpc/kernel/time.c
index 7d406b73a855..3e722370113b 100644
--- a/arch/powerpc/kernel/time.c
+++ b/arch/powerpc/kernel/time.c
@@ -222,7 +222,7 @@ static inline void timer_sync_xtime(unsigned long cur_tb)
222 * between updates. 222 * between updates.
223 */ 223 */
224static inline void update_gtod(u64 new_tb_stamp, u64 new_stamp_xsec, 224static inline void update_gtod(u64 new_tb_stamp, u64 new_stamp_xsec,
225 unsigned int new_tb_to_xs) 225 u64 new_tb_to_xs)
226{ 226{
227 unsigned temp_idx; 227 unsigned temp_idx;
228 struct gettimeofday_vars *temp_varp; 228 struct gettimeofday_vars *temp_varp;
diff --git a/arch/powerpc/platforms/powermac/time.c b/arch/powerpc/platforms/powermac/time.c
index eb9969b52f96..a6d2d231d5a0 100644
--- a/arch/powerpc/platforms/powermac/time.c
+++ b/arch/powerpc/platforms/powermac/time.c
@@ -216,8 +216,8 @@ via_calibrate_decr(void)
216 ; 216 ;
217 dend = get_dec(); 217 dend = get_dec();
218 218
219 ppc_tb_freq = (dstart - dend) * 100 / 6;
219 tb_ticks_per_jiffy = (dstart - dend) / ((6 * HZ)/100); 220 tb_ticks_per_jiffy = (dstart - dend) / ((6 * HZ)/100);
220 tb_to_us = mulhwu_scale_factor(dstart - dend, 60000);
221 221
222 printk(KERN_INFO "via_calibrate_decr: ticks per jiffy = %lu (%u ticks)\n", 222 printk(KERN_INFO "via_calibrate_decr: ticks per jiffy = %lu (%u ticks)\n",
223 tb_ticks_per_jiffy, dstart - dend); 223 tb_ticks_per_jiffy, dstart - dend);
@@ -306,6 +306,5 @@ pmac_calibrate_decr(void)
306 freq = *fp; 306 freq = *fp;
307 printk("time_init: decrementer frequency = %u.%.6u MHz\n", 307 printk("time_init: decrementer frequency = %u.%.6u MHz\n",
308 freq/1000000, freq%1000000); 308 freq/1000000, freq%1000000);
309 tb_ticks_per_jiffy = freq / HZ; 309 ppc_tb_freq = freq;
310 tb_to_us = mulhwu_scale_factor(freq, 1000000);
311} 310}
diff --git a/include/asm-powerpc/time.h b/include/asm-powerpc/time.h
index 4eecc38f7092..f8ef186c81e4 100644
--- a/include/asm-powerpc/time.h
+++ b/include/asm-powerpc/time.h
@@ -75,7 +75,7 @@ struct div_result {
75/* Accessor functions for the timebase (RTC on 601) registers. */ 75/* Accessor functions for the timebase (RTC on 601) registers. */
76/* If one day CONFIG_POWER is added just define __USE_RTC as 1 */ 76/* If one day CONFIG_POWER is added just define __USE_RTC as 1 */
77#ifdef CONFIG_6xx 77#ifdef CONFIG_6xx
78#define __USE_RTC() cpu_has_feature(CPU_FTR_USE_TB) 78#define __USE_RTC() (!cpu_has_feature(CPU_FTR_USE_TB))
79#else 79#else
80#define __USE_RTC() 0 80#define __USE_RTC() 0
81#endif 81#endif