Skip to contentSkip to conversation

drivers: rtc: remove dead drivers

PATCH New Masahiro Yamada 4 participants 6 messages Jul 30, 2014 – Aug 6, 2014 Real time clock (RTC)

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 drivers: rtc: remove dead drivers

The following configs are not defined at all:

- CONFIG_RTC_DS1388
- CONFIG_RTC_ISL1208
- CONFIG_RTC_MX27
- CONFIG_RTC_PL031
- CONFIG_RTC_RS5C372A
- CONFIG_SYS_DS1388_TCR_VAL

---

 README                |   1 -
 drivers/rtc/Makefile  |   5 -
 drivers/rtc/ds1337.c  |  25 -----
 drivers/rtc/isl1208.c | 147 --------------------------
 drivers/rtc/mx27rtc.c |  70 -------------
 drivers/rtc/pl031.c   | 109 --------------------
 drivers/rtc/rs5c372.c | 281 --------------------------------------------------
 7 files changed, 638 deletions(-)
 delete mode 100644 drivers/rtc/isl1208.c
 delete mode 100644 drivers/rtc/mx27rtc.c
 delete mode 100644 drivers/rtc/pl031.c
 delete mode 100644 drivers/rtc/rs5c372.c
README +0 -1
index f704eb3..468a2bf 100644
@@ -1153,7 +1153,6 @@ The following options need to be configured:
 		CONFIG_RTC_DS1337	- use Maxim, Inc. DS1337 RTC
 		CONFIG_RTC_DS1338	- use Maxim, Inc. DS1338 RTC
 		CONFIG_RTC_DS164x	- use Dallas DS164x RTC
-		CONFIG_RTC_ISL1208	- use Intersil ISL1208 RTC
 		CONFIG_RTC_MAX6900	- use Maxim, Inc. MAX6900 RTC
 		CONFIG_SYS_RTC_DS1337_NOOSC	- Turn off the OSC output for DS1337
 		CONFIG_SYS_RV3029_TCR	- enable trickle charger on
drivers/rtc/Makefile +0 -5
index 003d322..a3ce4d4 100644
@@ -18,14 +18,12 @@ obj-$(CONFIG_RTC_DS1307) += ds1307.o
 obj-$(CONFIG_RTC_DS1338) += ds1307.o
 obj-$(CONFIG_RTC_DS1337) += ds1337.o
 obj-$(CONFIG_RTC_DS1374) += ds1374.o
-obj-$(CONFIG_RTC_DS1388) += ds1337.o
 obj-$(CONFIG_RTC_DS1556) += ds1556.o
 obj-$(CONFIG_RTC_DS164x) += ds164x.o
 obj-$(CONFIG_RTC_DS174x) += ds174x.o
 obj-$(CONFIG_RTC_DS3231) += ds3231.o
 obj-$(CONFIG_RTC_FTRTC010) += ftrtc010.o
 obj-$(CONFIG_RTC_IMXDI) += imxdi.o
-obj-$(CONFIG_RTC_ISL1208) += isl1208.o
 obj-$(CONFIG_RTC_M41T11) += m41t11.o
 obj-$(CONFIG_RTC_M41T60) += m41t60.o
 obj-$(CONFIG_RTC_M41T62) += m41t62.o
@@ -39,12 +37,9 @@ obj-$(CONFIG_RTC_MK48T59) += mk48t59.o
 obj-$(CONFIG_RTC_MPC5200) += mpc5xxx.o
 obj-$(CONFIG_RTC_MPC8xx) += mpc8xx.o
 obj-$(CONFIG_RTC_MV) += mvrtc.o
-obj-$(CONFIG_RTC_MX27) += mx27rtc.o
 obj-$(CONFIG_RTC_MXS) += mxsrtc.o
 obj-$(CONFIG_RTC_PCF8563) += pcf8563.o
-obj-$(CONFIG_RTC_PL031) += pl031.o
 obj-$(CONFIG_RTC_PT7C4338) += pt7c4338.o
-obj-$(CONFIG_RTC_RS5C372A) += rs5c372.o
 obj-$(CONFIG_RTC_RTC4543) += rtc4543.o
 obj-$(CONFIG_RTC_RV3029) += rv3029.o
 obj-$(CONFIG_RTC_RX8025) += rx8025.o
drivers/rtc/ds1337.c +0 -25
index dae1b3c..550be90 100644
@@ -21,7 +21,6 @@
 /*
  * RTC register addresses
  */
-#if defined CONFIG_RTC_DS1337
 #define RTC_SEC_REG_ADDR	0x0
 #define RTC_MIN_REG_ADDR	0x1
 #define RTC_HR_REG_ADDR		0x2
@@ -32,18 +31,6 @@
 #define RTC_CTL_REG_ADDR	0x0e
 #define RTC_STAT_REG_ADDR	0x0f
 #define RTC_TC_REG_ADDR		0x10
-#elif defined CONFIG_RTC_DS1388
-#define RTC_SEC_REG_ADDR	0x1
-#define RTC_MIN_REG_ADDR	0x2
-#define RTC_HR_REG_ADDR		0x3
-#define RTC_DAY_REG_ADDR	0x4
-#define RTC_DATE_REG_ADDR	0x5
-#define RTC_MON_REG_ADDR	0x6
-#define RTC_YR_REG_ADDR		0x7
-#define RTC_CTL_REG_ADDR	0x0c
-#define RTC_STAT_REG_ADDR	0x0b
-#define RTC_TC_REG_ADDR		0x0a
-#endif
 
 /*
  * RTC control register bits
@@ -84,11 +71,6 @@ int rtc_get (struct rtc_time *tmp)
 	mon_cent = rtc_read (RTC_MON_REG_ADDR);
 	year = rtc_read (RTC_YR_REG_ADDR);
 
-	/* No century bit, assume year 2000 */
-#ifdef CONFIG_RTC_DS1388
-	mon_cent |= 0x80;
-#endif
-
 	debug("Get RTC year: %02x mon/cent: %02x mday: %02x wday: %02x "
 		"hr: %02x min: %02x sec: %02x control: %02x status: %02x\n",
 		year, mon_cent, mday, wday, hour, min, sec, control, status);
@@ -162,17 +144,10 @@ int rtc_set (struct rtc_time *tmp)
 #endif
 void rtc_reset (void)
 {
-#ifdef CONFIG_SYS_RTC_DS1337
 	rtc_write (RTC_CTL_REG_ADDR, RTC_DS1337_RESET_VAL);
-#elif defined CONFIG_SYS_RTC_DS1388
-	rtc_write(RTC_CTL_REG_ADDR, 0x0); /* hw default */
-#endif
 #ifdef CONFIG_SYS_DS1339_TCR_VAL
 	rtc_write (RTC_TC_REG_ADDR, CONFIG_SYS_DS1339_TCR_VAL);
 #endif
-#ifdef CONFIG_SYS_DS1388_TCR_VAL
-	rtc_write(RTC_TC_REG_ADDR, CONFIG_SYS_DS1388_TCR_VAL);
-#endif
 }
 
 
drivers/rtc/isl1208.c deleted +0 -147

147 lines not on this page · raw message

drivers/rtc/mx27rtc.c deleted +0 -70

70 lines not on this page · raw message

drivers/rtc/pl031.c deleted +0 -109

109 lines not on this page · raw message

drivers/rtc/rs5c372.c deleted +0 -281

281 lines not on this page · raw message

Signature · 1 line
1.9.1
#1 lore raw

PATCH 1/1 drivers: rtc: remove dead drivers

Quoted 10 lines · Masahiro Yamada

The following configs are not defined at all:

- CONFIG_RTC_DS1388
- CONFIG_RTC_ISL1208
- CONFIG_RTC_MX27
- CONFIG_RTC_PL031
- CONFIG_RTC_RS5C372A
- CONFIG_SYS_DS1388_TCR_VAL

I'm inclined to NAK this. I can't speak to MX27 (Stefano?) but in other cases those RTCs can be breadboarded up on other EVMs or otherwise used in things that aren't quite upstream. My long term hope is to be able to enable these drivers when building for am335x_evm or whatever, to get some coverage on them, and to also enable some other RTC drivers which have been posted but I put into RFC or Deferred in patchwork since they didn't have a board using them.

Signature · 8 lines
Tom
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 836 bytes
Desc: Digital signature
URL: <http://lists.denx.de/pipermail/u-boot/attachments/20140804/c0ab3b0c/attachment.pgp>
#2 lore raw

PATCH 1/1 drivers: rtc: remove dead drivers

Hi Tom,

Quoted 13 lines · On Mon, 4 Aug 2014 13:30:10 -0400 Tom Rini <[email protected]> wrote:
Quoted 10 lines · Masahiro Yamada

The following configs are not defined at all:

- CONFIG_RTC_DS1388
- CONFIG_RTC_ISL1208
- CONFIG_RTC_MX27
- CONFIG_RTC_PL031
- CONFIG_RTC_RS5C372A
- CONFIG_SYS_DS1388_TCR_VAL

Quoted 7 lines

I'm inclined to NAK this. I can't speak to MX27 (Stefano?) but in other cases those RTCs can be breadboarded up on other EVMs or otherwise used in things that aren't quite upstream. My long term hope is to be able to enable these drivers when building for am335x_evm or whatever, to get some coverage on them, and to also enable some other RTC drivers which have been posted but I put into RFC or Deferred in patchwork since they didn't have a board using them.

OK.

We will have to create config options in drivers/rtc/Kconfig in our next migration step.
So, my intention was to drop unnecessary macros beforehand. But I do not know which one is really unnecessary and I simply grepped for undefined macros.

It is a good thing you reviewed this patch
and I retract it.

Best Regards
Masahiro Yamada

#3 lore raw

PATCH 1/1 drivers: rtc: remove dead drivers

In reply to Tom Rini

Hi Tom, hi Masahiro,

Quoted 11 lines · Tom Rini
Quoted 9 lines · Masahiro Yamada

The following configs are not defined at all:

- CONFIG_RTC_DS1388
- CONFIG_RTC_ISL1208
- CONFIG_RTC_MX27
- CONFIG_RTC_PL031
- CONFIG_RTC_RS5C372A
- CONFIG_SYS_DS1388_TCR_VAL

Quoted 6 lines
Quoted 1 line

I'm inclined to NAK this. I can't speak to MX27 (Stefano?) but in other
cases those RTCs can be breadboarded up on other EVMs or otherwise used in things that aren't quite upstream.

I agree with Tom. RTC_MX27 was tested and submitted with the armadeus apf27 board, but then another RTC was chosen on this target. The RTC_MX27 remains ready to be used.
It is easy to enable this driver on some other targets - if these kind of drivers are not explicitely broken, I think we should let live in mainline.

Best regards,
Stefano

Signature · 5 lines
=====================================================================
DENX Software Engineering GmbH,     MD: Wolfgang Denk & Detlev Zundel
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: +49-8142-66989-53 Fax: +49-8142-66989-80 Email: sbabic at denx.de
=====================================================================
#4 lore raw

PATCH 1/1 drivers: rtc: remove dead drivers

Hi,

Quoted 21 lines · Stefano Babic

Hi Tom, hi Masahiro,

Quoted 11 lines · Tom Rini
Quoted 9 lines · Masahiro Yamada

The following configs are not defined at all:

- CONFIG_RTC_DS1388
- CONFIG_RTC_ISL1208
- CONFIG_RTC_MX27
- CONFIG_RTC_PL031
- CONFIG_RTC_RS5C372A
- CONFIG_SYS_DS1388_TCR_VAL

Quoted 6 lines
Quoted 1 line

I'm inclined to NAK this. I can't speak to MX27 (Stefano?) but in other
cases those RTCs can be breadboarded up on other EVMs or otherwise used in things that aren't quite upstream.

Quoted 6 lines

I agree with Tom. RTC_MX27 was tested and submitted with the armadeus apf27 board, but then another RTC was chosen on this target. The RTC_MX27 remains ready to be used.
It is easy to enable this driver on some other targets - if these kind of drivers are not explicitely broken, I think we should let live in mainline.

Would it be possible to add a board to use these, just so it is not dead code? Even a fake board?

Regards,
Simon

#5 lore raw

PATCH 1/1 drivers: rtc: remove dead drivers

Hi Simon,

Quoted 9 lines · Simon Glass
Quoted 6 lines

I agree with Tom. RTC_MX27 was tested and submitted with the armadeus apf27 board, but then another RTC was chosen on this target. The RTC_MX27 remains ready to be used.
It is easy to enable this driver on some other targets - if these kind of drivers are not explicitely broken, I think we should let live in mainline.

Would it be possible to add a board to use these, just so it is not dead code? Even a fake board?

We can add it to the apf27 board (without adding a fake board) because the driver was tested only on this board.

Best regards,
Stefano

Signature · 5 lines
=====================================================================
DENX Software Engineering GmbH,     MD: Wolfgang Denk & Detlev Zundel
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: +49-8142-66989-53 Fax: +49-8142-66989-80 Email: sbabic at denx.de
=====================================================================