aboutsummaryrefslogtreecommitdiffstats
path: root/arch/ppc64/kernel/pmac_time.c
diff options
context:
space:
mode:
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 @@
21#include <linux/adb.h> 21#include <linux/adb.h>
22#include <linux/pmu.h> 22#include <linux/pmu.h>
23#include <linux/interrupt.h> 23#include <linux/interrupt.h>
24#include <linux/rtc.h>
24 25
25#include <asm/sections.h> 26#include <asm/sections.h>
26#include <asm/prom.h> 27#include <asm/prom.h>
@@ -135,23 +136,13 @@ int pmac_set_rtc_time(struct rtc_time *tm)
135 } 136 }
136} 137}
137 138
138void __init pmac_get_boot_time(struct rtc_time *tm) 139unsigned long __init pmac_get_boot_time(void)
139{ 140{
140 pmac_get_rtc_time(tm); 141 struct rtc_time tm;
141 142
142#ifdef disabled__CONFIG_NVRAM 143 pmac_get_rtc_time(&tm);
143 s32 delta = 0; 144 return mktime(tm.tm_year+1900, tm.tm_mon+1, tm.tm_mday,
144 int dst; 145 tm.tm_hour, tm.tm_min, tm.tm_sec);
145
146 delta = ((s32)pmac_xpram_read(PMAC_XPRAM_MACHINE_LOC + 0x9)) << 16;
147 delta |= ((s32)pmac_xpram_read(PMAC_XPRAM_MACHINE_LOC + 0xa)) << 8;
148 delta |= pmac_xpram_read(PMAC_XPRAM_MACHINE_LOC + 0xb);
149 if (delta & 0x00800000UL)
150 delta |= 0xFF000000UL;
151 dst = ((pmac_xpram_read(PMAC_XPRAM_MACHINE_LOC + 0x8) & 0x80) != 0);
152 printk("GMT Delta read from XPRAM: %d minutes, DST: %s\n", delta/60,
153 dst ? "on" : "off");
154#endif
155} 146}
156 147
157/* 148/*