From 871c18dd301752270e1f74328c846c3104be1e2e Mon Sep 17 00:00:00 2001 From: Michal Simek Date: Mon, 14 Jul 2008 19:45:37 +0200 Subject: [PATCH] rtc: Clean drivers/rtc/Makefile Signed-off-by: Michal Simek --- drivers/rtc/Makefile | 50 +++++++++++++++++++-------------------- drivers/rtc/bfin_rtc.c | 2 +- drivers/rtc/ds12887.c | 2 +- drivers/rtc/ds1302.c | 2 +- drivers/rtc/ds1306.c | 2 +- drivers/rtc/ds1307.c | 3 +-- drivers/rtc/ds1337.c | 2 +- drivers/rtc/ds1374.c | 2 +- drivers/rtc/ds1556.c | 3 +-- drivers/rtc/ds164x.c | 2 +- drivers/rtc/ds174x.c | 2 +- drivers/rtc/ds3231.c | 2 +- drivers/rtc/m41t11.c | 2 +- drivers/rtc/m41t60.c | 3 +-- drivers/rtc/m48t35ax.c | 2 +- drivers/rtc/max6900.c | 2 +- drivers/rtc/mc146818.c | 2 +- drivers/rtc/mcfrtc.c | 2 +- drivers/rtc/mk48t59.c | 3 --- drivers/rtc/mpc5xxx.c | 2 +- drivers/rtc/mpc8xx.c | 2 +- drivers/rtc/pcf8563.c | 2 +- drivers/rtc/rs5c372.c | 2 +- drivers/rtc/rx8025.c | 2 +- drivers/rtc/s3c24x0_rtc.c | 2 +- drivers/rtc/x1205.c | 2 +- 26 files changed, 49 insertions(+), 55 deletions(-) diff --git a/drivers/rtc/Makefile b/drivers/rtc/Makefile index 2e0c1183b4..2af3ee5cfe 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 ce4f1711dc..ee8acd3595 100644 --- a/drivers/rtc/bfin_rtc.c +++ b/drivers/rtc/bfin_rtc.c @@ -11,7 +11,7 @@ #include #include -#if defined(CONFIG_RTC_BFIN) && defined(CONFIG_CMD_DATE) +#if defined(CONFIG_CMD_DATE) #include #include diff --git a/drivers/rtc/ds12887.c b/drivers/rtc/ds12887.c index 990ebba263..fb1825bf15 100644 --- a/drivers/rtc/ds12887.c +++ b/drivers/rtc/ds12887.c @@ -28,7 +28,7 @@ #include #include -#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 e4e9154754..d28a9fd724 100644 --- a/drivers/rtc/ds1302.c +++ b/drivers/rtc/ds1302.c @@ -9,7 +9,7 @@ #include #include -#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 29854fc7c4..12528ed1ce 100644 --- a/drivers/rtc/ds1306.c +++ b/drivers/rtc/ds1306.c @@ -36,7 +36,7 @@ #include #include -#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 b20f193b41..11fc14f3f6 100644 --- a/drivers/rtc/ds1307.c +++ b/drivers/rtc/ds1307.c @@ -35,8 +35,7 @@ #include #include -#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 e908749ef8..df1132a1fc 100644 --- a/drivers/rtc/ds1337.c +++ b/drivers/rtc/ds1337.c @@ -32,7 +32,7 @@ #include #include -#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 1533b60f18..130588ca1e 100644 --- a/drivers/rtc/ds1374.c +++ b/drivers/rtc/ds1374.c @@ -35,7 +35,7 @@ #include #include -#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 2c496f510f..f95f28ed49 100644 --- a/drivers/rtc/ds1556.c +++ b/drivers/rtc/ds1556.c @@ -36,8 +36,7 @@ #include #include - -#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 5943f8711d..c621a9eb83 100644 --- a/drivers/rtc/ds164x.c +++ b/drivers/rtc/ds164x.c @@ -37,7 +37,7 @@ #include -#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 eb3ca88fd6..3f486b1b4d 100644 --- a/drivers/rtc/ds174x.c +++ b/drivers/rtc/ds174x.c @@ -33,7 +33,7 @@ #include #include -#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 95cb186348..d8cd47dac5 100644 --- a/drivers/rtc/ds3231.c +++ b/drivers/rtc/ds3231.c @@ -33,7 +33,7 @@ #include #include -#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 fce00d9353..372731005b 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 ef135cab38..402a8c8298 100644 --- a/drivers/rtc/m41t60.c +++ b/drivers/rtc/m41t60.c @@ -34,8 +34,7 @@ #include #include -#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 be29279d03..353a30e1f2 100644 --- a/drivers/rtc/m48t35ax.c +++ b/drivers/rtc/m48t35ax.c @@ -33,7 +33,7 @@ #include #include -#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 e9979f227d..4cfc5de3d1 100644 --- a/drivers/rtc/max6900.c +++ b/drivers/rtc/max6900.c @@ -32,7 +32,7 @@ #include #include -#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 7c4fe36e90..460a0e6c5e 100644 --- a/drivers/rtc/mc146818.c +++ b/drivers/rtc/mc146818.c @@ -31,7 +31,7 @@ #include #include -#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 d235d10f28..30b2a8198d 100644 --- a/drivers/rtc/mcfrtc.c +++ b/drivers/rtc/mcfrtc.c @@ -23,7 +23,7 @@ #include -#if defined(CONFIG_MCFRTC) && defined(CONFIG_CMD_DATE) +#if defined(CONFIG_CMD_DATE) #include #include diff --git a/drivers/rtc/mk48t59.c b/drivers/rtc/mk48t59.c index 59813998ed..918c291a0a 100644 --- a/drivers/rtc/mk48t59.c +++ b/drivers/rtc/mk48t59.c @@ -33,8 +33,6 @@ #include #include -#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 a6555f5eb6..1450649959 100644 --- a/drivers/rtc/mpc5xxx.c +++ b/drivers/rtc/mpc5xxx.c @@ -32,7 +32,7 @@ #include #include -#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 057547bc3c..943506975d 100644 --- a/drivers/rtc/mpc8xx.c +++ b/drivers/rtc/mpc8xx.c @@ -31,7 +31,7 @@ #include #include -#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 c384975f35..1274ffaf0b 100644 --- a/drivers/rtc/pcf8563.c +++ b/drivers/rtc/pcf8563.c @@ -32,7 +32,7 @@ #include #include -#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 1c9b752429..38db19929f 100644 --- a/drivers/rtc/rs5c372.c +++ b/drivers/rtc/rs5c372.c @@ -34,7 +34,7 @@ #include #include -#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 64eafe5c37..064138e9eb 100644 --- a/drivers/rtc/rx8025.c +++ b/drivers/rtc/rx8025.c @@ -30,7 +30,7 @@ #include #include -#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 358aef751c..13d077b649 100644 --- a/drivers/rtc/s3c24x0_rtc.c +++ b/drivers/rtc/s3c24x0_rtc.c @@ -28,7 +28,7 @@ #include #include -#if defined(CONFIG_RTC_S3C24X0) && (defined(CONFIG_CMD_DATE)) +#if (defined(CONFIG_CMD_DATE)) #if defined(CONFIG_S3C2400) #include diff --git a/drivers/rtc/x1205.c b/drivers/rtc/x1205.c index 0e1813917f..7025cf4635 100644 --- a/drivers/rtc/x1205.c +++ b/drivers/rtc/x1205.c @@ -40,7 +40,7 @@ #include #include -#if defined(CONFIG_RTC_X1205) && defined(CONFIG_CMD_DATE) +#if defined(CONFIG_CMD_DATE) #define CCR_SEC 0 #define CCR_MIN 1 -- 2.39.5