summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--drivers/rtc/Makefile50
-rw-r--r--drivers/rtc/bfin_rtc.c2
-rw-r--r--drivers/rtc/ds12887.c2
-rw-r--r--drivers/rtc/ds1302.c2
-rw-r--r--drivers/rtc/ds1306.c2
-rw-r--r--drivers/rtc/ds1307.c3
-rw-r--r--drivers/rtc/ds1337.c2
-rw-r--r--drivers/rtc/ds1374.c2
-rw-r--r--drivers/rtc/ds1556.c3
-rw-r--r--drivers/rtc/ds164x.c2
-rw-r--r--drivers/rtc/ds174x.c2
-rw-r--r--drivers/rtc/ds3231.c2
-rw-r--r--drivers/rtc/m41t11.c2
-rw-r--r--drivers/rtc/m41t60.c3
-rw-r--r--drivers/rtc/m48t35ax.c2
-rw-r--r--drivers/rtc/max6900.c2
-rw-r--r--drivers/rtc/mc146818.c2
-rw-r--r--drivers/rtc/mcfrtc.c2
-rw-r--r--drivers/rtc/mk48t59.c3
-rw-r--r--drivers/rtc/mpc5xxx.c2
-rw-r--r--drivers/rtc/mpc8xx.c2
-rw-r--r--drivers/rtc/pcf8563.c2
-rw-r--r--drivers/rtc/rs5c372.c2
-rw-r--r--drivers/rtc/rx8025.c2
-rw-r--r--drivers/rtc/s3c24x0_rtc.c2
-rw-r--r--drivers/rtc/x1205.c2
26 files changed, 49 insertions, 55 deletions
diff --git a/drivers/rtc/Makefile b/drivers/rtc/Makefile
index 2e0c118..2af3ee5 100644
--- a/drivers/rtc/Makefile
+++ b/drivers/rtc/Makefile
@@ -27,35 +27,35 @@ include $(TOPDIR)/config.mk
LIB = $(obj)librtc.a
-COBJS-y += bfin_rtc.o
+COBJS-$(CONFIG_RTC_BFIN) += bfin_rtc.o
COBJS-y += date.o
-COBJS-y += ds12887.o
-COBJS-y += ds1302.o
-COBJS-y += ds1306.o
-COBJS-y += ds1307.o
-COBJS-y += ds1337.o
-COBJS-y += ds1374.o
-COBJS-y += ds1556.o
-COBJS-y += ds164x.o
-COBJS-y += ds174x.o
-COBJS-y += ds3231.o
+COBJS-$(CONFIG_RTC_DS12887) += ds12887.o
+COBJS-$(CONFIG_RTC_DS1302) += ds1302.o
+COBJS-$(CONFIG_RTC_DS1306) += ds1306.o
+COBJS-$(CONFIG_RTC_DS1307 || CONFIG_RTC_DS1338) += ds1307.o
+COBJS-$(CONFIG_RTC_DS1337) += ds1337.o
+COBJS-$(CONFIG_RTC_DS1374) += ds1374.o
+COBJS-$(CONFIG_RTC_DS1556) += ds1556.o
+COBJS-$(CONFIG_RTC_DS164x) += ds164x.o
+COBJS-$(CONFIG_RTC_DS174x) += ds174x.o
+COBJS-$(CONFIG_RTC_DS3231) += ds3231.o
COBJS-$(CONFIG_RTC_ISL1208) += isl1208.o
-COBJS-y += m41t11.o
-COBJS-y += m41t60.o
+COBJS-$(CONFIG_RTC_M41T11) += m41t11.o
+COBJS-$(CONFIG_RTC_M41T60) += m41t60.o
COBJS-$(CONFIG_RTC_M41T62) += m41t62.o
-COBJS-y += m48t35ax.o
-COBJS-y += max6900.o
+COBJS-$(CONFIG_RTC_M48T35A) += m48t35ax.o
+COBJS-$(CONFIG_RTC_MAX6900) += max6900.o
COBJS-$(CONFIG_RTC_MC13783) += mc13783-rtc.o
-COBJS-y += mc146818.o
-COBJS-y += mcfrtc.o
-COBJS-y += mk48t59.o
-COBJS-y += mpc5xxx.o
-COBJS-y += mpc8xx.o
-COBJS-y += pcf8563.o
-COBJS-y += rs5c372.o
-COBJS-y += rx8025.o
-COBJS-y += s3c24x0_rtc.o
-COBJS-y += x1205.o
+COBJS-$(CONFIG_RTC_MC146818) += mc146818.o
+COBJS-$(CONFIG_MCFRTC) += mcfrtc.o
+COBJS-$(CONFIG_RTC_MK48T59) += mk48t59.o
+COBJS-$(CONFIG_RTC_MPC5200) += mpc5xxx.o
+COBJS-$(CONFIG_RTC_MPC8xx) += mpc8xx.o
+COBJS-$(CONFIG_RTC_PCF8563) += pcf8563.o
+COBJS-$(CONFIG_RTC_RS5C372A) += rs5c372.o
+COBJS-$(CONFIG_RTC_RX8025) += rx8025.o
+COBJS-$(CONFIG_RTC_S3C24X0) += s3c24x0_rtc.o
+COBJS-$(CONFIG_RTC_X1205) += x1205.o
COBJS := $(COBJS-y)
SRCS := $(COBJS:.o=.c)
diff --git a/drivers/rtc/bfin_rtc.c b/drivers/rtc/bfin_rtc.c
index ce4f171..ee8acd3 100644
--- a/drivers/rtc/bfin_rtc.c
+++ b/drivers/rtc/bfin_rtc.c
@@ -11,7 +11,7 @@
#include <command.h>
#include <rtc.h>
-#if defined(CONFIG_RTC_BFIN) && defined(CONFIG_CMD_DATE)
+#if defined(CONFIG_CMD_DATE)
#include <asm/blackfin.h>
#include <asm/mach-common/bits/rtc.h>
diff --git a/drivers/rtc/ds12887.c b/drivers/rtc/ds12887.c
index 990ebba..fb1825b 100644
--- a/drivers/rtc/ds12887.c
+++ b/drivers/rtc/ds12887.c
@@ -28,7 +28,7 @@
#include <config.h>
#include <rtc.h>
-#if defined(CONFIG_RTC_DS12887) && defined(CONFIG_CMD_DATE)
+#if defined(CONFIG_CMD_DATE)
#define RTC_SECONDS 0x00
#define RTC_SECONDS_ALARM 0x01
diff --git a/drivers/rtc/ds1302.c b/drivers/rtc/ds1302.c
index e4e9154..d28a9fd 100644
--- a/drivers/rtc/ds1302.c
+++ b/drivers/rtc/ds1302.c
@@ -9,7 +9,7 @@
#include <command.h>
#include <rtc.h>
-#if defined(CONFIG_RTC_DS1302) && defined(CONFIG_CMD_DATE)
+#if defined(CONFIG_CMD_DATE)
/* GPP Pins */
#define DATA 0x200
diff --git a/drivers/rtc/ds1306.c b/drivers/rtc/ds1306.c
index 29854fc..12528ed 100644
--- a/drivers/rtc/ds1306.c
+++ b/drivers/rtc/ds1306.c
@@ -36,7 +36,7 @@
#include <rtc.h>
#include <spi.h>
-#if defined(CONFIG_RTC_DS1306) && defined(CONFIG_CMD_DATE)
+#if defined(CONFIG_CMD_DATE)
#define RTC_SECONDS 0x00
#define RTC_MINUTES 0x01
diff --git a/drivers/rtc/ds1307.c b/drivers/rtc/ds1307.c
index b20f193..11fc14f 100644
--- a/drivers/rtc/ds1307.c
+++ b/drivers/rtc/ds1307.c
@@ -35,8 +35,7 @@
#include <rtc.h>
#include <i2c.h>
-#if (defined(CONFIG_RTC_DS1307) || defined(CONFIG_RTC_DS1338) ) && \
- defined(CONFIG_CMD_DATE)
+#if defined(CONFIG_CMD_DATE)
/*---------------------------------------------------------------------*/
#undef DEBUG_RTC
diff --git a/drivers/rtc/ds1337.c b/drivers/rtc/ds1337.c
index e908749..df1132a 100644
--- a/drivers/rtc/ds1337.c
+++ b/drivers/rtc/ds1337.c
@@ -32,7 +32,7 @@
#include <rtc.h>
#include <i2c.h>
-#if defined(CONFIG_RTC_DS1337) && defined(CONFIG_CMD_DATE)
+#if defined(CONFIG_CMD_DATE)
/*---------------------------------------------------------------------*/
#undef DEBUG_RTC
diff --git a/drivers/rtc/ds1374.c b/drivers/rtc/ds1374.c
index 1533b60..130588c 100644
--- a/drivers/rtc/ds1374.c
+++ b/drivers/rtc/ds1374.c
@@ -35,7 +35,7 @@
#include <rtc.h>
#include <i2c.h>
-#if (defined(CONFIG_RTC_DS1374)) && defined(CONFIG_CMD_DATE)
+#if defined(CONFIG_CMD_DATE)
/*---------------------------------------------------------------------*/
#undef DEBUG_RTC
diff --git a/drivers/rtc/ds1556.c b/drivers/rtc/ds1556.c
index 2c496f5..f95f28e 100644
--- a/drivers/rtc/ds1556.c
+++ b/drivers/rtc/ds1556.c
@@ -36,8 +36,7 @@
#include <command.h>
#include <rtc.h>
-
-#if defined(CONFIG_RTC_DS1556) && defined(CONFIG_CMD_DATE)
+#if defined(CONFIG_CMD_DATE)
static uchar rtc_read( unsigned int addr );
static void rtc_write( unsigned int addr, uchar val);
diff --git a/drivers/rtc/ds164x.c b/drivers/rtc/ds164x.c
index 5943f87..c621a9e 100644
--- a/drivers/rtc/ds164x.c
+++ b/drivers/rtc/ds164x.c
@@ -37,7 +37,7 @@
#include <rtc.h>
-#if defined(CONFIG_RTC_DS164x) && defined(CONFIG_CMD_DATE)
+#if defined(CONFIG_CMD_DATE)
static uchar rtc_read(unsigned int addr );
static void rtc_write(unsigned int addr, uchar val);
diff --git a/drivers/rtc/ds174x.c b/drivers/rtc/ds174x.c
index eb3ca88..3f486b1 100644
--- a/drivers/rtc/ds174x.c
+++ b/drivers/rtc/ds174x.c
@@ -33,7 +33,7 @@
#include <command.h>
#include <rtc.h>
-#if defined(CONFIG_RTC_DS174x) && defined(CONFIG_CMD_DATE)
+#if defined(CONFIG_CMD_DATE)
static uchar rtc_read( unsigned int addr );
static void rtc_write( unsigned int addr, uchar val);
diff --git a/drivers/rtc/ds3231.c b/drivers/rtc/ds3231.c
index 95cb186..d8cd47d 100644
--- a/drivers/rtc/ds3231.c
+++ b/drivers/rtc/ds3231.c
@@ -33,7 +33,7 @@
#include <rtc.h>
#include <i2c.h>
-#if defined(CONFIG_RTC_DS3231) && defined(CONFIG_CMD_DATE)
+#if defined(CONFIG_CMD_DATE)
/*---------------------------------------------------------------------*/
#undef DEBUG_RTC
diff --git a/drivers/rtc/m41t11.c b/drivers/rtc/m41t11.c
index fce00d9..3727310 100644
--- a/drivers/rtc/m41t11.c
+++ b/drivers/rtc/m41t11.c
@@ -43,7 +43,7 @@
#endif
*/
-#if defined(CONFIG_RTC_M41T11) && defined(CFG_I2C_RTC_ADDR) && defined(CONFIG_CMD_DATE)
+#if defined(CFG_I2C_RTC_ADDR) && defined(CONFIG_CMD_DATE)
static unsigned bcd2bin (uchar n)
{
diff --git a/drivers/rtc/m41t60.c b/drivers/rtc/m41t60.c
index ef135ca..402a8c8 100644
--- a/drivers/rtc/m41t60.c
+++ b/drivers/rtc/m41t60.c
@@ -34,8 +34,7 @@
#include <rtc.h>
#include <i2c.h>
-#if defined(CONFIG_RTC_M41T60) && defined(CFG_I2C_RTC_ADDR) && \
- defined(CONFIG_CMD_DATE)
+#if defined(CFG_I2C_RTC_ADDR) && defined(CONFIG_CMD_DATE)
static unsigned bcd2bin(uchar n)
{
diff --git a/drivers/rtc/m48t35ax.c b/drivers/rtc/m48t35ax.c
index be29279..353a30e 100644
--- a/drivers/rtc/m48t35ax.c
+++ b/drivers/rtc/m48t35ax.c
@@ -33,7 +33,7 @@
#include <rtc.h>
#include <config.h>
-#if defined(CONFIG_RTC_M48T35A) && defined(CONFIG_CMD_DATE)
+#if defined(CONFIG_CMD_DATE)
static uchar rtc_read (uchar reg);
static void rtc_write (uchar reg, uchar val);
diff --git a/drivers/rtc/max6900.c b/drivers/rtc/max6900.c
index e9979f2..4cfc5de 100644
--- a/drivers/rtc/max6900.c
+++ b/drivers/rtc/max6900.c
@@ -32,7 +32,7 @@
#include <rtc.h>
#include <i2c.h>
-#if defined(CONFIG_RTC_MAX6900) && defined(CONFIG_CMD_DATE)
+#if defined(CONFIG_CMD_DATE)
#ifndef CFG_I2C_RTC_ADDR
#define CFG_I2C_RTC_ADDR 0x50
diff --git a/drivers/rtc/mc146818.c b/drivers/rtc/mc146818.c
index 7c4fe36..460a0e6 100644
--- a/drivers/rtc/mc146818.c
+++ b/drivers/rtc/mc146818.c
@@ -31,7 +31,7 @@
#include <command.h>
#include <rtc.h>
-#if defined(CONFIG_RTC_MC146818) && defined(CONFIG_CMD_DATE)
+#if defined(CONFIG_CMD_DATE)
static uchar rtc_read (uchar reg);
static void rtc_write (uchar reg, uchar val);
diff --git a/drivers/rtc/mcfrtc.c b/drivers/rtc/mcfrtc.c
index d235d10..30b2a81 100644
--- a/drivers/rtc/mcfrtc.c
+++ b/drivers/rtc/mcfrtc.c
@@ -23,7 +23,7 @@
#include <common.h>
-#if defined(CONFIG_MCFRTC) && defined(CONFIG_CMD_DATE)
+#if defined(CONFIG_CMD_DATE)
#include <command.h>
#include <rtc.h>
diff --git a/drivers/rtc/mk48t59.c b/drivers/rtc/mk48t59.c
index 5981399..918c291 100644
--- a/drivers/rtc/mk48t59.c
+++ b/drivers/rtc/mk48t59.c
@@ -33,8 +33,6 @@
#include <rtc.h>
#include <mk48t59.h>
-#if defined(CONFIG_RTC_MK48T59)
-
#if defined(CONFIG_BAB7xx)
static uchar rtc_read (short reg)
@@ -236,4 +234,3 @@ void rtc_set_watchdog(short multi, short res)
}
#endif
-#endif /* CONFIG_RTC_MK48T59 */
diff --git a/drivers/rtc/mpc5xxx.c b/drivers/rtc/mpc5xxx.c
index a6555f5..1450649 100644
--- a/drivers/rtc/mpc5xxx.c
+++ b/drivers/rtc/mpc5xxx.c
@@ -32,7 +32,7 @@
#include <command.h>
#include <rtc.h>
-#if defined(CONFIG_RTC_MPC5200) && defined(CONFIG_CMD_DATE)
+#if defined(CONFIG_CMD_DATE)
/*****************************************************************************
* this structure should be defined in mpc5200.h ...
diff --git a/drivers/rtc/mpc8xx.c b/drivers/rtc/mpc8xx.c
index 057547b..9435069 100644
--- a/drivers/rtc/mpc8xx.c
+++ b/drivers/rtc/mpc8xx.c
@@ -31,7 +31,7 @@
#include <command.h>
#include <rtc.h>
-#if defined(CONFIG_RTC_MPC8xx) && defined(CONFIG_CMD_DATE)
+#if defined(CONFIG_CMD_DATE)
/* ------------------------------------------------------------------------- */
diff --git a/drivers/rtc/pcf8563.c b/drivers/rtc/pcf8563.c
index c384975..1274ffa 100644
--- a/drivers/rtc/pcf8563.c
+++ b/drivers/rtc/pcf8563.c
@@ -32,7 +32,7 @@
#include <rtc.h>
#include <i2c.h>
-#if defined(CONFIG_RTC_PCF8563) && defined(CONFIG_CMD_DATE)
+#if defined(CONFIG_CMD_DATE)
static uchar rtc_read (uchar reg);
static void rtc_write (uchar reg, uchar val);
diff --git a/drivers/rtc/rs5c372.c b/drivers/rtc/rs5c372.c
index 1c9b752..38db199 100644
--- a/drivers/rtc/rs5c372.c
+++ b/drivers/rtc/rs5c372.c
@@ -34,7 +34,7 @@
#include <rtc.h>
#include <i2c.h>
-#if defined(CONFIG_RTC_RS5C372A) && defined(CONFIG_CMD_DATE)
+#if defined(CONFIG_CMD_DATE)
/*
* Reads are always done starting with register 15, which requires some
* jumping-through-hoops to access the data correctly.
diff --git a/drivers/rtc/rx8025.c b/drivers/rtc/rx8025.c
index 64eafe5..064138e 100644
--- a/drivers/rtc/rx8025.c
+++ b/drivers/rtc/rx8025.c
@@ -30,7 +30,7 @@
#include <rtc.h>
#include <i2c.h>
-#if defined(CONFIG_RTC_RX8025) && defined(CONFIG_CMD_DATE)
+#if defined(CONFIG_CMD_DATE)
/*---------------------------------------------------------------------*/
#undef DEBUG_RTC
diff --git a/drivers/rtc/s3c24x0_rtc.c b/drivers/rtc/s3c24x0_rtc.c
index 358aef7..13d077b 100644
--- a/drivers/rtc/s3c24x0_rtc.c
+++ b/drivers/rtc/s3c24x0_rtc.c
@@ -28,7 +28,7 @@
#include <common.h>
#include <command.h>
-#if defined(CONFIG_RTC_S3C24X0) && (defined(CONFIG_CMD_DATE))
+#if (defined(CONFIG_CMD_DATE))
#if defined(CONFIG_S3C2400)
#include <s3c2400.h>
diff --git a/drivers/rtc/x1205.c b/drivers/rtc/x1205.c
index 0e18139..7025cf4 100644
--- a/drivers/rtc/x1205.c
+++ b/drivers/rtc/x1205.c
@@ -40,7 +40,7 @@
#include <i2c.h>
#include <bcd.h>
-#if defined(CONFIG_RTC_X1205) && defined(CONFIG_CMD_DATE)
+#if defined(CONFIG_CMD_DATE)
#define CCR_SEC 0
#define CCR_MIN 1