Skip to contentSkip to conversation

MIPS: IP32: Add platform data hooks to use DS1685 driver

PATCH RESEND New Joshua Kinard 1 participant 1 message Jan 19, 2015 MIPS

lore
Share & tools
lore
#0 lore raw

PATCH RESEND 2/2 MIPS: IP32: Add platform data hooks to use DS1685 driver

From: Joshua Kinard <[email protected]>

This modifies the IP32 (SGI O2) platform and reset code to utilize the new rtc-ds1685 driver. The old mc146818rtc.h header is removed and ip32_defconfig is updated as well.

---
 arch/mips/configs/ip32_defconfig              |    3
 arch/mips/include/asm/mach-ip32/mc146818rtc.h |   36 ----
 arch/mips/sgi-ip32/ip32-platform.c            |   52 +++++-
 arch/mips/sgi-ip32/ip32-reset.c               |  132 ++++------------
 4 files changed, 85 insertions(+), 138 deletions(-)

Ralf,

Similar to Maciej's DEC/RTC patches from a few months ago, this patch
requires the rtc-ds1685 driver be added upstream first before this can go into into the LMO tree. If you can queue this someplace until that makes it in, that would be great. Thanks!

linux-mips-ip32-use-rtc-ds1685.patch

arch/mips/configs/ip32_defconfig +2 -1
index 70ffe9b..fe48220 100644
@@ -105,7 +105,8 @@ CONFIG_RTC_CLASS=y
 # CONFIG_RTC_HCTOSYS is not set
 # CONFIG_RTC_INTF_SYSFS is not set
 # CONFIG_RTC_INTF_PROC is not set
-CONFIG_RTC_DRV_CMOS=y
+CONFIG_RTC_DRV_DS1685_FAMILY=y
+CONFIG_RTC_DRV_DS1685=y
 CONFIG_EXT2_FS=y
 CONFIG_EXT2_FS_XATTR=y
 CONFIG_EXT2_FS_POSIX_ACL=y
arch/mips/include/asm/mach-ip32/mc146818rtc.h deleted +0 -36
deleted file mode 100644
index 6b6bab4..0000000
@@ -1,36 +0,0 @@
-/*
- * This file is subject to the terms and conditions of the GNU General Public
- * License.  See the file "COPYING" in the main directory of this archive
- * for more details.
- *
- * Copyright (C) 1998, 2001, 03 by Ralf Baechle
- * Copyright (C) 2000 Harald Koerfgen
- *
- * RTC routines for IP32 style attached Dallas chip.
- */
-#ifndef __ASM_MACH_IP32_MC146818RTC_H
-#define __ASM_MACH_IP32_MC146818RTC_H
-
-#include <asm/ip32/mace.h>
-
-#define RTC_PORT(x)	(0x70 + (x))
-
-static unsigned char CMOS_READ(unsigned long addr)
-{
-	return mace->isa.rtc[addr << 8];
-}
-
-static inline void CMOS_WRITE(unsigned char data, unsigned long addr)
-{
-	mace->isa.rtc[addr << 8] = data;
-}
-
-/*
- * FIXME: Do it right. For now just assume that no one lives in 20th century
- * and no O2 user in 22th century ;-)
- */
-#define mc146818_decode_year(year) ((year) + 2000)
-
-#define RTC_ALWAYS_BCD	0
-
-#endif /* __ASM_MACH_IP32_MC146818RTC_H */
arch/mips/sgi-ip32/ip32-platform.c +43 -9

75 lines not on this page · raw message

arch/mips/sgi-ip32/ip32-reset.c +40 -92

189 lines not on this page · raw message