patch-2.4.22 linux-2.4.22/arch/mips/sibyte/swarm/rtc_xicor1241.c

Next file: linux-2.4.22/arch/mips/sibyte/swarm/setup.c
Previous file: linux-2.4.22/arch/mips/sibyte/swarm/rtc_m41t81.c
Back to the patch index
Back to the overall index

diff -urN linux-2.4.21/arch/mips/sibyte/swarm/rtc_xicor1241.c linux-2.4.22/arch/mips/sibyte/swarm/rtc_xicor1241.c
@@ -181,15 +181,14 @@
 			hour = (hour & 0xf) + 0x12;
 	}
 
-	BCD_TO_BIN(sec);
-	BCD_TO_BIN(min);
-	BCD_TO_BIN(hour);
-
 	day = xicor_read(X1241REG_DT);
 	mon = xicor_read(X1241REG_MO);
 	year = xicor_read(X1241REG_YR);
 	y2k = xicor_read(X1241REG_Y2K);
 
+	BCD_TO_BIN(sec);
+	BCD_TO_BIN(min);
+	BCD_TO_BIN(hour);
 	BCD_TO_BIN(day);
 	BCD_TO_BIN(mon);
 	BCD_TO_BIN(year);
@@ -200,3 +199,7 @@
 	return mktime(year, mon, day, hour, min, sec);
 }
 
+int xicor_probe(void)
+{
+	return (xicor_read(X1241REG_SC) != -1);
+}

FUNET's LINUX-ADM group, linux-adm@nic.funet.fi
TCL-scripts by Sam Shen (who was at: slshen@lbl.gov)