Skip to contentSkip to conversation

IP32: add platform device for cmos rtc; remove dead code

PATCH Applied Thomas Bogendoerfer 2 participants 2 messages Sep 22, 2008 – Oct 14, 2008 MIPS

lore
Share & tools
lore

Thomas Bogendoerfer

author maintainer
#0 lore raw

PATCH 1/1 IP32: add platform device for cmos rtc; remove dead code

---

 arch/mips/sgi-ip32/ip32-platform.c |   16 ++++++++++++++++
 arch/mips/sgi-ip32/ip32-setup.c    |    5 -----
 2 files changed, 16 insertions(+), 5 deletions(-)
arch/mips/sgi-ip32/ip32-platform.c +16 -0
index 3d63721..511e9ff 100644
@@ -90,6 +90,22 @@ static __init int sgio2btns_devinit(void)
 
 device_initcall(sgio2btns_devinit);
 
+static struct resource sgio2_cmos_rsrc[] = {
+	{
+		.start = 0x70,
+		.end   = 0x71,
+		.flags = IORESOURCE_IO
+	}
+};
+
+static __init int sgio2_cmos_devinit(void)
+{
+	return IS_ERR(platform_device_register_simple("rtc_cmos", -1,
+						      sgio2_cmos_rsrc, 1));
+}
+
+device_initcall(sgio2_cmos_devinit);
+
 MODULE_AUTHOR("Ralf Baechle <[email protected]>");
 MODULE_LICENSE("GPL");
 MODULE_DESCRIPTION("8250 UART probe driver for SGI IP32 aka O2");
arch/mips/sgi-ip32/ip32-setup.c +0 -5
index 1024bf4..c5a5d4a 100644
@@ -62,11 +62,6 @@ static inline void str2eaddr(unsigned char *ea, unsigned char *str)
 }
 #endif
 
-unsigned long read_persistent_clock(void)
-{
-	return mc146818_get_cmos_time();
-}
-
 /* An arbitrary time; this can be decreased if reliability looks good */
 #define WAIT_MS 10