summaryrefslogtreecommitdiffstats
path: root/arch/ppc64/kernel/rtc.c
diff options
context:
space:
mode:
authorDavid S. Miller <davem@sunset.davemloft.net>2005-05-25 14:58:04 -0700
committerDavid S. Miller <davem@sunset.davemloft.net>2005-05-25 14:58:04 -0700
commit4b463f785837f73bdd88ae3821bb7b69599010c9 (patch)
tree80dc0a7e3e33596ff3ece410d9ff9e6b63e45b87 /arch/ppc64/kernel/rtc.c
parent6df16d0c35b9c0d3627f30c106e6142d3d12662b (diff)
parent384f1fcd2db8bc5a15f20f10793d8e1c82acd6c5 (diff)
downloadop-kernel-dev-4b463f785837f73bdd88ae3821bb7b69599010c9.zip
op-kernel-dev-4b463f785837f73bdd88ae3821bb7b69599010c9.tar.gz
Merge of /home/davem/src/GIT/linux-2.6/.git/
Diffstat (limited to 'arch/ppc64/kernel/rtc.c')
-rw-r--r--arch/ppc64/kernel/rtc.c39
1 files changed, 1 insertions, 38 deletions
diff --git a/arch/ppc64/kernel/rtc.c b/arch/ppc64/kernel/rtc.c
index 3e70b91..6798905 100644
--- a/arch/ppc64/kernel/rtc.c
+++ b/arch/ppc64/kernel/rtc.c
@@ -292,47 +292,10 @@ int iSeries_set_rtc_time(struct rtc_time *tm)
void iSeries_get_boot_time(struct rtc_time *tm)
{
- unsigned long time;
- static unsigned long lastsec = 1;
-
- u32 dataWord1 = *((u32 *)(&xSpCommArea.xBcdTimeAtIplStart));
- u32 dataWord2 = *(((u32 *)&(xSpCommArea.xBcdTimeAtIplStart)) + 1);
- int year = 1970;
- int year1 = ( dataWord1 >> 24 ) & 0x000000FF;
- int year2 = ( dataWord1 >> 16 ) & 0x000000FF;
- int sec = ( dataWord1 >> 8 ) & 0x000000FF;
- int min = dataWord1 & 0x000000FF;
- int hour = ( dataWord2 >> 24 ) & 0x000000FF;
- int day = ( dataWord2 >> 8 ) & 0x000000FF;
- int mon = dataWord2 & 0x000000FF;
-
if ( piranha_simulator )
return;
- BCD_TO_BIN(sec);
- BCD_TO_BIN(min);
- BCD_TO_BIN(hour);
- BCD_TO_BIN(day);
- BCD_TO_BIN(mon);
- BCD_TO_BIN(year1);
- BCD_TO_BIN(year2);
- year = year1 * 100 + year2;
-
- time = mktime(year, mon, day, hour, min, sec);
- time += ( jiffies / HZ );
-
- /* Now THIS is a nasty hack!
- * It ensures that the first two calls get different answers.
- * That way the loop in init_time (time.c) will not think
- * the clock is stuck.
- */
- if ( lastsec ) {
- time -= lastsec;
- --lastsec;
- }
-
- to_tm(time, tm);
- tm->tm_year -= 1900;
+ mf_get_boot_rtc(tm);
tm->tm_mon -= 1;
}
#endif
OpenPOWER on IntegriCloud