From 49e16b7becd6320bde51aa238c11815708f836d9 Mon Sep 17 00:00:00 2001 From: Paul Mackerras Date: Fri, 18 Nov 2005 15:52:38 +1100 Subject: powerpc: time-of-day fixes for 32-bit CHRP systems This makes 32-bit CHRP systems use the RTAS time-of-day routines if available. It fixes a bug in the RTAS time-of-day routines where they were storing a 64-bit timebase value in an unsigned long by making those variables u64. Also, the direct-access time-of-day routines had the wrong convention for the month and year in the struct rtc_time. Signed-off-by: Paul Mackerras --- arch/powerpc/kernel/rtas-rtc.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'arch/powerpc/kernel/rtas-rtc.c') diff --git a/arch/powerpc/kernel/rtas-rtc.c b/arch/powerpc/kernel/rtas-rtc.c index 7b948662704..635d3b9a881 100644 --- a/arch/powerpc/kernel/rtas-rtc.c +++ b/arch/powerpc/kernel/rtas-rtc.c @@ -15,7 +15,7 @@ unsigned long __init rtas_get_boot_time(void) { int ret[8]; int error, wait_time; - unsigned long max_wait_tb; + u64 max_wait_tb; max_wait_tb = get_tb() + tb_ticks_per_usec * 1000 * MAX_RTC_WAIT; do { @@ -45,7 +45,7 @@ void rtas_get_rtc_time(struct rtc_time *rtc_tm) { int ret[8]; int error, wait_time; - unsigned long max_wait_tb; + u64 max_wait_tb; max_wait_tb = get_tb() + tb_ticks_per_usec * 1000 * MAX_RTC_WAIT; do { @@ -80,7 +80,7 @@ void rtas_get_rtc_time(struct rtc_time *rtc_tm) int rtas_set_rtc_time(struct rtc_time *tm) { int error, wait_time; - unsigned long max_wait_tb; + u64 max_wait_tb; max_wait_tb = get_tb() + tb_ticks_per_usec * 1000 * MAX_RTC_WAIT; do { -- cgit v1.2.3