summaryrefslogtreecommitdiffstats
path: root/arch/powerpc/platforms/iseries/mf.c
diff options
context:
space:
mode:
authorPaul Mackerras <paulus@samba.org>2005-10-19 23:11:21 +1000
committerPaul Mackerras <paulus@samba.org>2005-10-19 23:11:21 +1000
commit143a1dec7e04e0a9712ff93e779aabfb21dfd97c (patch)
tree3a60a4e630d792fb3cdc6e962ce0ecfd94bb2672 /arch/powerpc/platforms/iseries/mf.c
parent7ed476d17f04473f70d796cb6c172bdcfcc9b8e5 (diff)
powerpc: Merge machdep.h
A few things change for consistency between ppc32 and ppc64: idle functions return void; *_get_boot_time functions return unsigned long (i.e. time_t) rather than filling in a struct rtc_time (since that's useful to the callers and easier for pmac to generate); *_get_rtc_time and *_set_rtc_time functions take a struct rtc_time; irq_canonicalize is gone; nvram_sync returns void. Signed-off-by: Paul Mackerras <paulus@samba.org>
Diffstat (limited to 'arch/powerpc/platforms/iseries/mf.c')
-rw-r--r--arch/powerpc/platforms/iseries/mf.c12
1 files changed, 8 insertions, 4 deletions
diff --git a/arch/powerpc/platforms/iseries/mf.c b/arch/powerpc/platforms/iseries/mf.c
index 3f25f7fc79f..e5de31aa001 100644
--- a/arch/powerpc/platforms/iseries/mf.c
+++ b/arch/powerpc/platforms/iseries/mf.c
@@ -32,6 +32,7 @@
#include <linux/delay.h>
#include <linux/dma-mapping.h>
#include <linux/bcd.h>
+#include <linux/rtc.h>
#include <asm/time.h>
#include <asm/uaccess.h>
@@ -1307,11 +1308,14 @@ int iSeries_set_rtc_time(struct rtc_time *tm)
return 0;
}
-void iSeries_get_boot_time(struct rtc_time *tm)
+unsigned long iSeries_get_boot_time(void)
{
+ struct rtc_time tm;
+
if (piranha_simulator)
- return;
+ return 0;
- mf_get_boot_rtc(tm);
- tm->tm_mon -= 1;
+ mf_get_boot_rtc(&tm);
+ return mktime(tm.tm_year + 1900, tm.tm_mon, tm.tm_mday,
+ tm.tm_hour, tm.tm_min, tm.tm_sec);
}