rtc: remove CONFIG_CMD_DATE dependency

The EFI subsystem accesses the real time clock and is enabled by default.
So we should drop any CONFIG_CMD_DATE dependency from the real time clock
drivers.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>
diff --git a/drivers/rtc/at91sam9_rtt.c b/drivers/rtc/at91sam9_rtt.c
index da5bb3e..6f92660 100644
--- a/drivers/rtc/at91sam9_rtt.c
+++ b/drivers/rtc/at91sam9_rtt.c
@@ -27,8 +27,6 @@
 #include <asm/arch/at91_rtt.h>
 #include <asm/arch/at91_gpbr.h>
 
-#if defined(CONFIG_CMD_DATE)
-
 int rtc_get (struct rtc_time *tmp)
 {
 	at91_rtt_t *rtt = (at91_rtt_t *) ATMEL_BASE_RTT;
@@ -78,5 +76,3 @@
 	while (readl(&rtt->vr) != 0)
 		;
 }
-
-#endif
diff --git a/drivers/rtc/davinci.c b/drivers/rtc/davinci.c
index f03dc56..b6930bd 100644
--- a/drivers/rtc/davinci.c
+++ b/drivers/rtc/davinci.c
@@ -9,7 +9,6 @@
 #include <asm/io.h>
 #include <asm/davinci_rtc.h>
 
-#if defined(CONFIG_CMD_DATE)
 int rtc_get(struct rtc_time *tmp)
 {
 	struct davinci_rtc *rtc = (struct davinci_rtc *)DAVINCI_RTC_BASE;
@@ -79,4 +78,3 @@
 	/* run RTC counter */
 	writel(0x01, &rtc->ctrl);
 }
-#endif
diff --git a/drivers/rtc/ds1302.c b/drivers/rtc/ds1302.c
index 87ddd01..b94163f 100644
--- a/drivers/rtc/ds1302.c
+++ b/drivers/rtc/ds1302.c
@@ -9,8 +9,6 @@
 #include <command.h>
 #include <rtc.h>
 
-#if defined(CONFIG_CMD_DATE)
-
 /* GPP Pins */
 #define DATA		0x200
 #define SCLK		0x400
@@ -328,5 +326,3 @@
 
 	return 0;
 }
-
-#endif
diff --git a/drivers/rtc/ds1306.c b/drivers/rtc/ds1306.c
index bd1e084..02d617e 100644
--- a/drivers/rtc/ds1306.c
+++ b/drivers/rtc/ds1306.c
@@ -19,8 +19,6 @@
 #include <rtc.h>
 #include <spi.h>
 
-#if defined(CONFIG_CMD_DATE)
-
 #define	RTC_SECONDS		0x00
 #define	RTC_MINUTES		0x01
 #define	RTC_HOURS		0x02
@@ -437,5 +435,3 @@
 }
 
 #endif /* end of code exclusion (see #ifdef CONFIG_SXNI855T above) */
-
-#endif
diff --git a/drivers/rtc/ds1307.c b/drivers/rtc/ds1307.c
index cdb088c..48220b4 100644
--- a/drivers/rtc/ds1307.c
+++ b/drivers/rtc/ds1307.c
@@ -51,8 +51,6 @@
 
 #ifndef CONFIG_DM_RTC
 
-#if defined(CONFIG_CMD_DATE)
-
 /*---------------------------------------------------------------------*/
 #undef DEBUG_RTC
 
@@ -204,8 +202,6 @@
 	i2c_reg_write (CONFIG_SYS_I2C_RTC_ADDR, reg, val);
 }
 
-#endif /* CONFIG_CMD_DATE*/
-
 #endif /* !CONFIG_DM_RTC */
 
 #ifdef CONFIG_DM_RTC
diff --git a/drivers/rtc/ds1337.c b/drivers/rtc/ds1337.c
index 9a0a214..9b31048 100644
--- a/drivers/rtc/ds1337.c
+++ b/drivers/rtc/ds1337.c
@@ -15,8 +15,6 @@
 #include <rtc.h>
 #include <i2c.h>
 
-#if defined(CONFIG_CMD_DATE)
-
 /*
  * RTC register addresses
  */
@@ -190,5 +188,3 @@
 {
 	i2c_reg_write (CONFIG_SYS_I2C_RTC_ADDR, reg, val);
 }
-
-#endif
diff --git a/drivers/rtc/ds1374.c b/drivers/rtc/ds1374.c
index bc27f61..5a2060f 100644
--- a/drivers/rtc/ds1374.c
+++ b/drivers/rtc/ds1374.c
@@ -18,8 +18,6 @@
 #include <rtc.h>
 #include <i2c.h>
 
-#if defined(CONFIG_CMD_DATE)
-
 /*---------------------------------------------------------------------*/
 #undef DEBUG_RTC
 #define DEBUG_RTC
@@ -214,4 +212,3 @@
 {
 		i2c_reg_write (CONFIG_SYS_I2C_RTC_ADDR, reg, val);
 }
-#endif
diff --git a/drivers/rtc/ds164x.c b/drivers/rtc/ds164x.c
index 7ee6214..f870789 100644
--- a/drivers/rtc/ds164x.c
+++ b/drivers/rtc/ds164x.c
@@ -20,8 +20,6 @@
 #include <rtc.h>
 
 
-#if defined(CONFIG_CMD_DATE)
-
 static uchar    rtc_read(unsigned int addr );
 static void     rtc_write(unsigned int addr, uchar val);
 
@@ -171,5 +169,3 @@
 #endif
 	*(volatile unsigned char*)(addr) = val;
 }
-
-#endif
diff --git a/drivers/rtc/ds174x.c b/drivers/rtc/ds174x.c
index b6daf59..94f943d 100644
--- a/drivers/rtc/ds174x.c
+++ b/drivers/rtc/ds174x.c
@@ -16,8 +16,6 @@
 #include <command.h>
 #include <rtc.h>
 
-#if defined(CONFIG_CMD_DATE)
-
 static uchar rtc_read( unsigned int addr );
 static void  rtc_write( unsigned int addr, uchar val);
 
@@ -172,5 +170,3 @@
 #endif
 	out8( addr, val );
 }
-
-#endif
diff --git a/drivers/rtc/ds3231.c b/drivers/rtc/ds3231.c
index 0e66f6e..9352ff8 100644
--- a/drivers/rtc/ds3231.c
+++ b/drivers/rtc/ds3231.c
@@ -16,8 +16,6 @@
 #include <rtc.h>
 #include <i2c.h>
 
-#if defined(CONFIG_CMD_DATE)
-
 /*
  * RTC register addresses
  */
@@ -166,5 +164,3 @@
 {
 	i2c_reg_write (CONFIG_SYS_I2C_RTC_ADDR, reg, val);
 }
-
-#endif
diff --git a/drivers/rtc/imxdi.c b/drivers/rtc/imxdi.c
index 3c4797f..39920f1 100644
--- a/drivers/rtc/imxdi.c
+++ b/drivers/rtc/imxdi.c
@@ -17,8 +17,6 @@
 #include <linux/compat.h>
 #include <rtc.h>
 
-#if defined(CONFIG_CMD_DATE)
-
 #include <asm/io.h>
 #include <asm/arch/imx-regs.h>
 
@@ -222,5 +220,3 @@
 {
 	di_init();
 }
-
-#endif
diff --git a/drivers/rtc/m41t11.c b/drivers/rtc/m41t11.c
index e997152..960348b 100644
--- a/drivers/rtc/m41t11.c
+++ b/drivers/rtc/m41t11.c
@@ -29,8 +29,6 @@
 #endif
 */
 
-#if defined(CONFIG_SYS_I2C_RTC_ADDR) && defined(CONFIG_CMD_DATE)
-
 /* ------------------------------------------------------------------------- */
 /*
   these are simple defines for the chip local to here so they aren't too
@@ -167,4 +165,3 @@
 	val = val & 0x3F;/*turn off freq test keep calibration*/
 	i2c_write(CONFIG_SYS_I2C_RTC_ADDR, RTC_CONTROL_ADDR, 1, &val, 1);
 }
-#endif
diff --git a/drivers/rtc/m41t60.c b/drivers/rtc/m41t60.c
index 7846193..c84c8e1 100644
--- a/drivers/rtc/m41t60.c
+++ b/drivers/rtc/m41t60.c
@@ -20,8 +20,6 @@
 #include <rtc.h>
 #include <i2c.h>
 
-#if defined(CONFIG_SYS_I2C_RTC_ADDR) && defined(CONFIG_CMD_DATE)
-
 /*
  * Convert between century and "century bits" (CB1 and CB0).  These routines
  * assume years are in the range 1900 - 2299.
@@ -237,4 +235,3 @@
 	}
 	rtc_dump("end reset");
 }
-#endif /* CONFIG_RTC_M41T60 && CONFIG_SYS_I2C_RTC_ADDR && CONFIG_CMD_DATE */
diff --git a/drivers/rtc/m41t62.c b/drivers/rtc/m41t62.c
index d53ef7d..1374383 100644
--- a/drivers/rtc/m41t62.c
+++ b/drivers/rtc/m41t62.c
@@ -18,8 +18,6 @@
 #include <rtc.h>
 #include <i2c.h>
 
-#if defined(CONFIG_CMD_DATE)
-
 #define M41T62_REG_SSEC	0
 #define M41T62_REG_SEC	1
 #define M41T62_REG_MIN	2
@@ -130,5 +128,3 @@
 	val &= ~M41T80_ALHOUR_HT;
 	i2c_write(CONFIG_SYS_I2C_RTC_ADDR, M41T62_REG_ALARM_HOUR, 1, &val, 1);
 }
-
-#endif
diff --git a/drivers/rtc/m48t35ax.c b/drivers/rtc/m48t35ax.c
index 0b035ce..1cc24cc 100644
--- a/drivers/rtc/m48t35ax.c
+++ b/drivers/rtc/m48t35ax.c
@@ -16,8 +16,6 @@
 #include <rtc.h>
 #include <config.h>
 
-#if defined(CONFIG_CMD_DATE)
-
 static uchar rtc_read  (uchar reg);
 static void  rtc_write (uchar reg, uchar val);
 
@@ -135,5 +133,3 @@
 	*(unsigned char *)
 		((CONFIG_SYS_NVRAM_BASE_ADDR + CONFIG_SYS_NVRAM_SIZE - 8) + reg) = val;
 }
-
-#endif
diff --git a/drivers/rtc/max6900.c b/drivers/rtc/max6900.c
index f5c651b..b351865 100644
--- a/drivers/rtc/max6900.c
+++ b/drivers/rtc/max6900.c
@@ -15,8 +15,6 @@
 #include <rtc.h>
 #include <i2c.h>
 
-#if defined(CONFIG_CMD_DATE)
-
 #ifndef	CONFIG_SYS_I2C_RTC_ADDR
 #define	CONFIG_SYS_I2C_RTC_ADDR	0x50
 #endif
@@ -104,5 +102,3 @@
 void rtc_reset (void)
 {
 }
-
-#endif
diff --git a/drivers/rtc/mc146818.c b/drivers/rtc/mc146818.c
index ee29c71..744c0f4 100644
--- a/drivers/rtc/mc146818.c
+++ b/drivers/rtc/mc146818.c
@@ -19,8 +19,6 @@
 #define out8(p, v) outb(v, p)
 #endif
 
-#if defined(CONFIG_CMD_DATE)
-
 /* Set this to 1 to clear the CMOS RAM */
 #define CLEAR_CMOS		0
 
@@ -195,7 +193,6 @@
 	/* Clear any pending interrupts */
 	mc146818_read8(RTC_CONFIG_C);
 }
-#endif /* CONFIG_CMD_DATE */
 
 #ifdef CONFIG_DM_RTC
 
diff --git a/drivers/rtc/mcfrtc.c b/drivers/rtc/mcfrtc.c
index 0ac8e4d..e10638e 100644
--- a/drivers/rtc/mcfrtc.c
+++ b/drivers/rtc/mcfrtc.c
@@ -6,8 +6,6 @@
 
 #include <common.h>
 
-#if defined(CONFIG_CMD_DATE)
-
 #include <command.h>
 #include <rtc.h>
 #include <asm/immap.h>
@@ -104,5 +102,3 @@
 
 	rtc->cr |= RTC_CR_SWR;
 }
-
-#endif				/* CONFIG_MCFRTC && CONFIG_CMD_DATE */
diff --git a/drivers/rtc/mk48t59.c b/drivers/rtc/mk48t59.c
index d29d5ce..8c90a70 100644
--- a/drivers/rtc/mk48t59.c
+++ b/drivers/rtc/mk48t59.c
@@ -70,8 +70,6 @@
 		rtc_write(d++, *s++);
 }
 
-#if defined(CONFIG_CMD_DATE)
-
 /* ------------------------------------------------------------------------- */
 
 int rtc_get (struct rtc_time *tmp)
@@ -175,5 +173,3 @@
 	wd_value = RTC_WDS | ((multi & 0x1F) << 2) | (res & 0x3);
 	rtc_write(RTC_WATCHDOG, wd_value);
 }
-
-#endif
diff --git a/drivers/rtc/pcf8563.c b/drivers/rtc/pcf8563.c
index e2fa6b6..a839d6c 100644
--- a/drivers/rtc/pcf8563.c
+++ b/drivers/rtc/pcf8563.c
@@ -15,8 +15,6 @@
 #include <rtc.h>
 #include <i2c.h>
 
-#if defined(CONFIG_CMD_DATE)
-
 static uchar rtc_read  (uchar reg);
 static void  rtc_write (uchar reg, uchar val);
 
@@ -117,5 +115,3 @@
 {
 	i2c_reg_write (CONFIG_SYS_I2C_RTC_ADDR, reg, val);
 }
-
-#endif
diff --git a/drivers/rtc/rs5c372.c b/drivers/rtc/rs5c372.c
index c815c91..97ec001 100644
--- a/drivers/rtc/rs5c372.c
+++ b/drivers/rtc/rs5c372.c
@@ -24,7 +24,6 @@
 #include <rtc.h>
 #include <i2c.h>
 
-#if defined(CONFIG_CMD_DATE)
 /*
  * Reads are always done starting with register 15, which requires some
  * jumping-through-hoops to access the data correctly.
@@ -255,5 +254,3 @@
 	if (!setup_done)
 		rs5c372_enable();
 }
-
-#endif
diff --git a/drivers/rtc/rx8025.c b/drivers/rtc/rx8025.c
index 1c2b92f..7bd9f8b 100644
--- a/drivers/rtc/rx8025.c
+++ b/drivers/rtc/rx8025.c
@@ -13,8 +13,6 @@
 #include <rtc.h>
 #include <i2c.h>
 
-#if defined(CONFIG_CMD_DATE)
-
 /*---------------------------------------------------------------------*/
 #undef DEBUG_RTC
 
@@ -190,5 +188,3 @@
 		printf("Error writing to RTC\n");
 
 }
-
-#endif /* CONFIG_RTC_RX8025 && CONFIG_CMD_DATE */
diff --git a/drivers/rtc/s3c24x0_rtc.c b/drivers/rtc/s3c24x0_rtc.c
index 1253085..96ea3cf 100644
--- a/drivers/rtc/s3c24x0_rtc.c
+++ b/drivers/rtc/s3c24x0_rtc.c
@@ -11,8 +11,6 @@
 #include <common.h>
 #include <command.h>
 
-#if (defined(CONFIG_CMD_DATE))
-
 #include <asm/arch/s3c24x0_cpu.h>
 
 #include <rtc.h>
@@ -149,5 +147,3 @@
 	writeb((readb(&rtc->rtccon) & ~0x06) | 0x08, &rtc->rtccon);
 	writeb(readb(&rtc->rtccon) & ~(0x08 | 0x01), &rtc->rtccon);
 }
-
-#endif
diff --git a/drivers/rtc/x1205.c b/drivers/rtc/x1205.c
index e9d8390..ed6aaa5 100644
--- a/drivers/rtc/x1205.c
+++ b/drivers/rtc/x1205.c
@@ -22,8 +22,6 @@
 #include <rtc.h>
 #include <i2c.h>
 
-#if defined(CONFIG_CMD_DATE)
-
 #define CCR_SEC			0
 #define CCR_MIN			1
 #define CCR_HOUR		2
@@ -160,5 +158,3 @@
 	 * Nothing to do
 	 */
 }
-
-#endif