patch-2.1.97 linux/arch/ppc/kernel/chrp_time.c

Next file: linux/arch/ppc/kernel/head.S
Previous file: linux/arch/ppc/kernel/chrp_setup.c
Back to the patch index
Back to the overall index

diff -u --recursive --new-file v2.1.96/linux/arch/ppc/kernel/chrp_time.c linux/arch/ppc/kernel/chrp_time.c
@@ -38,7 +38,7 @@
 	rtcs = find_compatible_devices("rtc", "pnpPNP,b00");
 	if (rtcs == NULL || rtcs->addrs == NULL)
 		return;
-	base = ((int *)rtcs->addrs)[2];
+	base = rtcs->addrs[0].address;
 	nvram_as1 = 0;
 	nvram_as0 = base;
 	nvram_data = base + 1;
@@ -69,7 +69,7 @@
 	unsigned char save_control, save_freq_select;
 	struct rtc_time tm;
 
-	to_tm(nowtime + 10*60*60, &tm);	/* XXX for now */
+	to_tm(nowtime, &tm);
 
 	save_control = chrp_cmos_clock_read(RTC_CONTROL); /* tell the clock it's being set */
 
@@ -146,7 +146,7 @@
 	  }
 	if ((year += 1900) < 1970)
 		year += 100;
-	return mktime(year, mon, day, hour, min, sec) - 10*60*60 /* XXX for now */;
+	return mktime(year, mon, day, hour, min, sec);
 }
 
 
@@ -154,6 +154,9 @@
 {
 	struct device_node *cpu;
 	int freq, *fp, divisor;
+
+	if (via_calibrate_decr())
+		return;
 
 	/*
 	 * The cpu node should have a timebase-frequency property

FUNET's LINUX-ADM group, linux-adm@nic.funet.fi
TCL-scripts by Sam Shen, slshen@lbl.gov