summaryrefslogtreecommitdiffstats
path: root/arch/ppc64/kernel/pmac_time.c
diff options
context:
space:
mode:
authorPaul Mackerras2005-10-19 15:11:21 +0200
committerPaul Mackerras2005-10-19 15:11:21 +0200
commit143a1dec7e04e0a9712ff93e779aabfb21dfd97c (patch)
tree3a60a4e630d792fb3cdc6e962ce0ecfd94bb2672 /arch/ppc64/kernel/pmac_time.c
parentppc: Minor smp changes for consistency with ppc64 (diff)
downloadkernel-qcow2-linux-143a1dec7e04e0a9712ff93e779aabfb21dfd97c.tar.gz
kernel-qcow2-linux-143a1dec7e04e0a9712ff93e779aabfb21dfd97c.tar.xz
kernel-qcow2-linux-143a1dec7e04e0a9712ff93e779aabfb21dfd97c.zip
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/ppc64/kernel/pmac_time.c')
-rw-r--r--arch/ppc64/kernel/pmac_time.c21
1 files changed, 6 insertions, 15 deletions
diff --git a/arch/ppc64/kernel/pmac_time.c b/arch/ppc64/kernel/pmac_time.c
index 9d8c97decd32..c89bfefbbecd 100644
--- a/arch/ppc64/kernel/pmac_time.c
+++ b/arch/ppc64/kernel/pmac_time.c
@@ -21,6 +21,7 @@
#include <linux/adb.h>
#include <linux/pmu.h>
#include <linux/interrupt.h>
+#include <linux/rtc.h>
#include <asm/sections.h>
#include <asm/prom.h>
@@ -135,23 +136,13 @@ int pmac_set_rtc_time(struct rtc_time *tm)
}
}
-void __init pmac_get_boot_time(struct rtc_time *tm)
+unsigned long __init pmac_get_boot_time(void)
{
- pmac_get_rtc_time(tm);
+ struct rtc_time tm;
-#ifdef disabled__CONFIG_NVRAM
- s32 delta = 0;
- int dst;
-
- delta = ((s32)pmac_xpram_read(PMAC_XPRAM_MACHINE_LOC + 0x9)) << 16;
- delta |= ((s32)pmac_xpram_read(PMAC_XPRAM_MACHINE_LOC + 0xa)) << 8;
- delta |= pmac_xpram_read(PMAC_XPRAM_MACHINE_LOC + 0xb);
- if (delta & 0x00800000UL)
- delta |= 0xFF000000UL;
- dst = ((pmac_xpram_read(PMAC_XPRAM_MACHINE_LOC + 0x8) & 0x80) != 0);
- printk("GMT Delta read from XPRAM: %d minutes, DST: %s\n", delta/60,
- dst ? "on" : "off");
-#endif
+ pmac_get_rtc_time(&tm);
+ return mktime(tm.tm_year+1900, tm.tm_mon+1, tm.tm_mday,
+ tm.tm_hour, tm.tm_min, tm.tm_sec);
}
/*