Skip to contentSkip to conversation

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

PATCH RESEND Superseded Joshua Kinard 2 participants 3 messages Dec 12, 2014 – Dec 31, 2014 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(-)
 delete mode 100644 arch/mips/include/asm/mach-ip32/mc146818rtc.h

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

Acked-by on v1 2/2
#1 lore raw
Quoted 13 lines · Joshua Kinard

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(-)
 delete mode 100644 arch/mips/include/asm/mach-ip32/mc146818rtc.h
Quoted 6 lines

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!

Alessandro,

I don't think there is much of a chance of this patch conflicting with others so feel free to funnel this through the RTC tree. Or I carry both patches - I don't care which way.

Cheers,

Ralf

#2 lore raw
Quoted 26 lines · Ralf Baechle
Quoted 13 lines · Joshua Kinard

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(-)
 delete mode 100644 arch/mips/include/asm/mach-ip32/mc146818rtc.h
Quoted 6 lines

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!

Alessandro,

Quoted 7 lines

I don't think there is much of a chance of this patch conflicting with others so feel free to funnel this through the RTC tree. Or I carry both patches - I don't care which way.

Cheers,

Ralf

I haven't seen any reaction or feedback from Alessandro or the rtc-linux upstream yet. What are the odds these two patches can go in under the MIPS tree? If so, would it be queued for 3.20 or 3.21?

Thanks!,

Signature · 4 lines
Joshua Kinard
Gentoo/MIPS
[email protected]
4096R/D25D95E3 2011-03-28