[PATCH 01/11] i2c: Clean drivers/i2c/ Makefile

View: New views
20 Messages — Rating Filter:   Alert me  
< Prev | 1 - 2 | Next >

[PATCH 01/11] i2c: Clean drivers/i2c/ Makefile

by Michal Simek :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

From: Michal Simek <monstr@...>


Signed-off-by: Michal Simek <monstr@...>
---
 drivers/i2c/Makefile       |   10 +++++-----
 drivers/i2c/fsl_i2c.c      |    2 --
 drivers/i2c/mxc_i2c.c      |    2 +-
 drivers/i2c/omap1510_i2c.c |    4 ----
 drivers/i2c/omap24xx_i2c.c |    4 ----
 drivers/i2c/tsi108_i2c.c   |    2 --
 6 files changed, 6 insertions(+), 18 deletions(-)

diff --git a/drivers/i2c/Makefile b/drivers/i2c/Makefile
index 534c015..1f25afb 100644
--- a/drivers/i2c/Makefile
+++ b/drivers/i2c/Makefile
@@ -25,11 +25,11 @@ include $(TOPDIR)/config.mk
 
 LIB := $(obj)libi2c.a
 
-COBJS-y += fsl_i2c.o
-COBJS-y += omap1510_i2c.o
-COBJS-y += omap24xx_i2c.o
-COBJS-y += tsi108_i2c.o
-COBJS-y += mxc_i2c.o
+COBJS-$(CONFIG_FSL_I2C) += fsl_i2c.o
+COBJS-$(CONFIG_I2C_MXC) += mxc_i2c.o
+COBJS-$(CONFIG_DRIVER_OMAP1510_I2C) += omap1510_i2c.o
+COBJS-$(CONFIG_DRIVER_OMAP24XX_I2C) += omap24xx_i2c.o
+COBJS-$(CONFIG_TSI108_I2C) += tsi108_i2c.o
 
 COBJS := $(COBJS-y)
 SRCS := $(COBJS:.o=.c)
diff --git a/drivers/i2c/fsl_i2c.c b/drivers/i2c/fsl_i2c.c
index 9f2c1ec..688f66a 100644
--- a/drivers/i2c/fsl_i2c.c
+++ b/drivers/i2c/fsl_i2c.c
@@ -18,7 +18,6 @@
 
 #include <common.h>
 
-#ifdef CONFIG_FSL_I2C
 #ifdef CONFIG_HARD_I2C
 
 #include <command.h>
@@ -387,4 +386,3 @@ unsigned int i2c_get_bus_speed(void)
 }
 
 #endif /* CONFIG_HARD_I2C */
-#endif /* CONFIG_FSL_I2C */
diff --git a/drivers/i2c/mxc_i2c.c b/drivers/i2c/mxc_i2c.c
index a218329..1f6ba1f 100644
--- a/drivers/i2c/mxc_i2c.c
+++ b/drivers/i2c/mxc_i2c.c
@@ -24,7 +24,7 @@
 
 #include <common.h>
 
-#if defined(CONFIG_HARD_I2C) && defined (CONFIG_I2C_MXC)
+#if defined(CONFIG_HARD_I2C)
 
 #include <asm/arch/mx31.h>
 #include <asm/arch/mx31-regs.h>
diff --git a/drivers/i2c/omap1510_i2c.c b/drivers/i2c/omap1510_i2c.c
index 04400fb..388951d 100644
--- a/drivers/i2c/omap1510_i2c.c
+++ b/drivers/i2c/omap1510_i2c.c
@@ -20,8 +20,6 @@
 
 #include <common.h>
 
-#ifdef CONFIG_DRIVER_OMAP1510_I2C
-
 static void wait_for_bb (void);
 static u16 wait_for_pin (void);
 
@@ -277,5 +275,3 @@ static u16 wait_for_pin (void)
 
  return status;
 }
-
-#endif /* CONFIG_DRIVER_OMAP1510_I2C */
diff --git a/drivers/i2c/omap24xx_i2c.c b/drivers/i2c/omap24xx_i2c.c
index 7dab786..d16cfb1 100644
--- a/drivers/i2c/omap24xx_i2c.c
+++ b/drivers/i2c/omap24xx_i2c.c
@@ -22,8 +22,6 @@
 
 #include <common.h>
 
-#ifdef CONFIG_DRIVER_OMAP24XX_I2C
-
 #include <asm/arch/i2c.h>
 #include <asm/io.h>
 
@@ -325,5 +323,3 @@ static u16 wait_for_pin (void)
 }
  return status;
 }
-
-#endif /* CONFIG_DRIVER_OMAP24XX_I2C */
diff --git a/drivers/i2c/tsi108_i2c.c b/drivers/i2c/tsi108_i2c.c
index d6736b0..695e393 100644
--- a/drivers/i2c/tsi108_i2c.c
+++ b/drivers/i2c/tsi108_i2c.c
@@ -25,7 +25,6 @@
 #include <config.h>
 #include <common.h>
 
-#ifdef CONFIG_TSI108_I2C
 #include <tsi108.h>
 
 #if defined(CONFIG_CMD_I2C)
@@ -280,4 +279,3 @@ int i2c_probe (uchar chip)
 }
 
 #endif
-#endif /* CONFIG_TSI108_I2C */
--
1.5.4.GIT


-------------------------------------------------------------------------
Sponsored by: SourceForge.net Community Choice Awards: VOTE NOW!
Studies have shown that voting for your favorite open source project,
along with a healthy diet, reduces your potential for chronic lameness
and boredom. Vote Now at http://www.sourceforge.net/community/cca08
_______________________________________________
U-Boot-Users mailing list
U-Boot-Users@...
https://lists.sourceforge.net/lists/listinfo/u-boot-users

[PATCH 02/11] usb: Clean drivers/usb/Makefile

by Michal Simek :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

From: Michal Simek <monstr@...>


Signed-off-by: Michal Simek <monstr@...>
---
 drivers/usb/Makefile            |   12 ++++++------
 drivers/usb/isp116x-hcd.c       |    3 ---
 drivers/usb/sl811_usb.c         |    3 ---
 drivers/usb/usb_ohci.c          |    3 ---
 drivers/usb/usbdcore_ep0.c      |    3 ---
 drivers/usb/usbdcore_mpc8xx.c   |    4 ++--
 drivers/usb/usbdcore_omap1510.c |    2 +-
 7 files changed, 9 insertions(+), 21 deletions(-)

diff --git a/drivers/usb/Makefile b/drivers/usb/Makefile
index 252b00e..1388186 100644
--- a/drivers/usb/Makefile
+++ b/drivers/usb/Makefile
@@ -25,13 +25,13 @@ include $(TOPDIR)/config.mk
 
 LIB := $(obj)libusb.a
 
-COBJS-y += isp116x-hcd.o
-COBJS-y += sl811_usb.o
-COBJS-y += usb_ohci.o
+COBJS-$(CONFIG_USB_ISP116X_HCD) += isp116x-hcd.o
+COBJS-$(CONFIG_USB_SL811HS) += sl811_usb.o
+COBJS-$(CONFIG_USB_OHCI_NEW) += usb_ohci.o
 COBJS-y += usbdcore.o
-COBJS-y += usbdcore_ep0.o
-COBJS-y += usbdcore_mpc8xx.o
-COBJS-y += usbdcore_omap1510.o
+COBJS-$(CONFIG_USB_DEVICE) += usbdcore_ep0.o
+COBJS-$(CONFIG_MPC885_FAMILY) += usbdcore_mpc8xx.o
+COBJS-$(CONFIG_OMAP1510) += usbdcore_omap1510.o
 
 COBJS := $(COBJS-y)
 SRCS := $(COBJS:.o=.c)
diff --git a/drivers/usb/isp116x-hcd.c b/drivers/usb/isp116x-hcd.c
index 6b9b23b..e9e69bb 100644
--- a/drivers/usb/isp116x-hcd.c
+++ b/drivers/usb/isp116x-hcd.c
@@ -57,7 +57,6 @@
 
 #include <common.h>
 
-#ifdef CONFIG_USB_ISP116X_HCD
 #include <asm/io.h>
 #include <usb.h>
 #include <malloc.h>
@@ -1441,5 +1440,3 @@ int usb_lowlevel_stop(void)
 
  return 0;
 }
-
-#endif /* CONFIG_USB_ISP116X_HCD */
diff --git a/drivers/usb/sl811_usb.c b/drivers/usb/sl811_usb.c
index 159cc25..cfdd375 100644
--- a/drivers/usb/sl811_usb.c
+++ b/drivers/usb/sl811_usb.c
@@ -36,7 +36,6 @@
  */
 
 #include <common.h>
-#ifdef CONFIG_USB_SL811HS
 #include <mpc8xx.h>
 #include <usb.h>
 #include "sl811.h"
@@ -733,5 +732,3 @@ static int sl811_rh_submit_urb(struct usb_device *usb_dev, unsigned long pipe,
 
  return status == 0 ? len : status;
 }
-
-#endif /* CONFIG_USB_SL811HS */
diff --git a/drivers/usb/usb_ohci.c b/drivers/usb/usb_ohci.c
index fd60edb..9e7b396 100644
--- a/drivers/usb/usb_ohci.c
+++ b/drivers/usb/usb_ohci.c
@@ -47,8 +47,6 @@
 
 #include <common.h>
 
-#ifdef CONFIG_USB_OHCI_NEW
-
 #include <asm/byteorder.h>
 
 #if defined(CONFIG_PCI_OHCI)
@@ -1910,4 +1908,3 @@ int usb_lowlevel_stop(void)
 
  return 0;
 }
-#endif /* CONFIG_USB_OHCI_NEW */
diff --git a/drivers/usb/usbdcore_ep0.c b/drivers/usb/usbdcore_ep0.c
index cf3f382..2395eec 100644
--- a/drivers/usb/usbdcore_ep0.c
+++ b/drivers/usb/usbdcore_ep0.c
@@ -52,7 +52,6 @@
 
 #include <common.h>
 
-#if defined(CONFIG_USB_DEVICE)
 #include "usbdcore.h"
 
 #if 0
@@ -597,5 +596,3 @@ int ep0_recv_setup (struct urb *urb)
  }
  return -1;
 }
-
-#endif
diff --git a/drivers/usb/usbdcore_mpc8xx.c b/drivers/usb/usbdcore_mpc8xx.c
index 122793c..539e0f8 100644
--- a/drivers/usb/usbdcore_mpc8xx.c
+++ b/drivers/usb/usbdcore_mpc8xx.c
@@ -59,7 +59,7 @@
 #include <common.h>
 #include <config.h>
 
-#if defined(CONFIG_MPC885_FAMILY) && defined(CONFIG_USB_DEVICE)
+#if defined(CONFIG_USB_DEVICE)
 #include <commproc.h>
 #include "usbdcore.h"
 #include "usbdcore_mpc8xx.h"
@@ -1399,4 +1399,4 @@ static u32 mpc8xx_udc_alloc (u32 data_size, u32 alignment)
  return retaddr;
 }
 
-#endif /* CONFIG_MPC885_FAMILY && CONFIG_USB_DEVICE) */
+#endif /* CONFIG_USB_DEVICE) */
diff --git a/drivers/usb/usbdcore_omap1510.c b/drivers/usb/usbdcore_omap1510.c
index 84bb936..8d23537 100644
--- a/drivers/usb/usbdcore_omap1510.c
+++ b/drivers/usb/usbdcore_omap1510.c
@@ -28,7 +28,7 @@
 
 #include <common.h>
 
-#if defined(CONFIG_OMAP1510) && defined(CONFIG_USB_DEVICE)
+#if defined(CONFIG_USB_DEVICE)
 
 #include <asm/io.h>
 #ifdef CONFIG_OMAP_SX1
--
1.5.4.GIT


-------------------------------------------------------------------------
Sponsored by: SourceForge.net Community Choice Awards: VOTE NOW!
Studies have shown that voting for your favorite open source project,
along with a healthy diet, reduces your potential for chronic lameness
and boredom. Vote Now at http://www.sourceforge.net/community/cca08
_______________________________________________
U-Boot-Users mailing list
U-Boot-Users@...
https://lists.sourceforge.net/lists/listinfo/u-boot-users

[PATCH 03/11] rtc: Clean drivers/rtc/Makefile

by Michal Simek :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

From: Michal Simek <monstr@...>


Signed-off-by: Michal Simek <monstr@...>
---
 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 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
--
1.5.4.GIT


-------------------------------------------------------------------------
Sponsored by: SourceForge.net Community Choice Awards: VOTE NOW!
Studies have shown that voting for your favorite open source project,
along with a healthy diet, reduces your potential for chronic lameness
and boredom. Vote Now at http://www.sourceforge.net/community/cca08
_______________________________________________
U-Boot-Users mailing list
U-Boot-Users@...
https://lists.sourceforge.net/lists/listinfo/u-boot-users

[PATCH 04/11] serial: Clean drivers/serial/Makefile

by Michal Simek :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

From: Michal Simek <monstr@...>


Signed-off-by: Michal Simek <monstr@...>
---
 drivers/serial/Makefile           |   24 ++++++++++++------------
 drivers/serial/atmel_usart.c      |    3 ---
 drivers/serial/mcfuart.c          |    3 ---
 drivers/serial/ns16550.c          |    4 ----
 drivers/serial/ns9750_serial.c    |    4 ----
 drivers/serial/s3c4510b_uart.c    |    4 ----
 drivers/serial/serial.c           |    4 ----
 drivers/serial/serial_max3100.c   |    4 ----
 drivers/serial/serial_pl010.c     |    4 ----
 drivers/serial/serial_pl011.c     |    4 ----
 drivers/serial/serial_sh.c        |    4 ----
 drivers/serial/serial_xuartlite.c |    4 ----
 drivers/serial/usbtty.c           |    5 -----
 13 files changed, 12 insertions(+), 59 deletions(-)

diff --git a/drivers/serial/Makefile b/drivers/serial/Makefile
index c9e797e..45dfe96 100644
--- a/drivers/serial/Makefile
+++ b/drivers/serial/Makefile
@@ -25,18 +25,18 @@ include $(TOPDIR)/config.mk
 
 LIB := $(obj)libserial.a
 
-COBJS-y += atmel_usart.o
-COBJS-y += mcfuart.o
-COBJS-y += ns9750_serial.o
-COBJS-y += ns16550.o
-COBJS-y += s3c4510b_uart.o
-COBJS-y += serial.o
-COBJS-y += serial_max3100.o
-COBJS-y += serial_pl010.o
-COBJS-y += serial_pl011.o
-COBJS-y += serial_xuartlite.o
-COBJS-y += serial_sh.o
-COBJS-y += usbtty.o
+COBJS-$(CONFIG_ATMEL_USART) += atmel_usart.o
+COBJS-$(CONFIG_MCFUART) += mcfuart.o
+COBJS-$(CFG_NS9750_UART) += ns9750_serial.o
+COBJS-$(CFG_NS16550) += ns16550.o
+COBJS-$(CONFIG_DRIVER_S3C4510_UART) += s3c4510b_uart.o
+COBJS-$(CFG_NS16550_SERIAL) += serial.o
+COBJS-$(CONFIG_MAX3100_SERIAL) += serial_max3100.o
+COBJS-$(CFG_PL010_SERIAL) += serial_pl010.o
+COBJS-$(CFG_PL011_SERIAL) += serial_pl011.o
+COBJS-$(CONFIG_XILINX_UARTLITE) += serial_xuartlite.o
+COBJS-$(CFG_SCIF_CONSOLE) += serial_sh.o
+COBJS-$(CONFIG_USB_TTY) += usbtty.o
 
 COBJS := $(COBJS-y)
 SRCS := $(COBJS:.o=.c)
diff --git a/drivers/serial/atmel_usart.c b/drivers/serial/atmel_usart.c
index f35b997..f3b146c 100644
--- a/drivers/serial/atmel_usart.c
+++ b/drivers/serial/atmel_usart.c
@@ -17,7 +17,6 @@
  */
 #include <common.h>
 
-#ifdef CONFIG_ATMEL_USART
 #include <asm/io.h>
 #include <asm/arch/clk.h>
 #include <asm/arch/memory-map.h>
@@ -96,5 +95,3 @@ int serial_tstc(void)
 {
  return (usart3_readl(CSR) & USART3_BIT(RXRDY)) != 0;
 }
-
-#endif /* CONFIG_ATMEL_USART */
diff --git a/drivers/serial/mcfuart.c b/drivers/serial/mcfuart.c
index 5eb4f45..a1fcd05 100644
--- a/drivers/serial/mcfuart.c
+++ b/drivers/serial/mcfuart.c
@@ -29,8 +29,6 @@
 
 #include <common.h>
 
-#ifdef CONFIG_MCFUART
-
 #include <asm/immap.h>
 #include <asm/uart.h>
 
@@ -130,4 +128,3 @@ void serial_setbrg(void)
 
  uart->ucr = UART_UCR_RX_ENABLED | UART_UCR_TX_ENABLED;
 }
-#endif /* CONFIG_MCFUART */
diff --git a/drivers/serial/ns16550.c b/drivers/serial/ns16550.c
index 6b3f60e..af717e0 100644
--- a/drivers/serial/ns16550.c
+++ b/drivers/serial/ns16550.c
@@ -6,8 +6,6 @@
 
 #include <config.h>
 
-#ifdef CFG_NS16550
-
 #include <ns16550.h>
 
 #define LCRVAL LCR_8N1 /* 8 data, 1 stop, no parity */
@@ -75,5 +73,3 @@ int NS16550_tstc (NS16550_t com_port)
 {
  return ((com_port->lsr & LSR_DR) != 0);
 }
-
-#endif
diff --git a/drivers/serial/ns9750_serial.c b/drivers/serial/ns9750_serial.c
index 02c0d39..e9645a0 100644
--- a/drivers/serial/ns9750_serial.c
+++ b/drivers/serial/ns9750_serial.c
@@ -28,8 +28,6 @@
 
 #include <common.h>
 
-#ifdef CFG_NS9750_UART
-
 #include "ns9750_bbus.h" /* for GPIOs */
 #include "ns9750_ser.h" /* for serial configuration */
 
@@ -210,5 +208,3 @@ static unsigned int calcRxCharGapRegister( void )
 {
  return NS9750_SER_RX_CHAR_TIMER_TRUN;
 }
-
-#endif /* CFG_NS9750_UART */
diff --git a/drivers/serial/s3c4510b_uart.c b/drivers/serial/s3c4510b_uart.c
index ddcd591..aa378e1 100644
--- a/drivers/serial/s3c4510b_uart.c
+++ b/drivers/serial/s3c4510b_uart.c
@@ -45,8 +45,6 @@
 
 #include <common.h>
 
-#ifdef CONFIG_DRIVER_S3C4510_UART
-
 #include <asm/hardware.h>
 #include "s3c4510b_uart.h"
 
@@ -212,5 +210,3 @@ void serial_puts (const char *s)
  uart->m_ctrl.bf.sendBreak = 0;
 
 }
-
-#endif
diff --git a/drivers/serial/serial.c b/drivers/serial/serial.c
index 4ccaee2..77a0ba5 100644
--- a/drivers/serial/serial.c
+++ b/drivers/serial/serial.c
@@ -23,8 +23,6 @@
 
 #include <common.h>
 
-#ifdef CFG_NS16550_SERIAL
-
 #include <ns16550.h>
 #ifdef CFG_NS87308
 #include <ns87308.h>
@@ -334,5 +332,3 @@ DECLARE_ESERIAL_FUNCTIONS(4);
 struct serial_device eserial4_device =
  INIT_ESERIAL_STRUCTURE(4,"eserial3","EUART4");
 #endif /* CONFIG_SERIAL_MULTI */
-
-#endif
diff --git a/drivers/serial/serial_max3100.c b/drivers/serial/serial_max3100.c
index 0611fc1..4abc271 100644
--- a/drivers/serial/serial_max3100.c
+++ b/drivers/serial/serial_max3100.c
@@ -26,8 +26,6 @@
 #include <common.h>
 #include <watchdog.h>
 
-#ifdef CONFIG_MAX3100_SERIAL
-
 DECLARE_GLOBAL_DATA_PTR;
 
 /**************************************************************/
@@ -298,5 +296,3 @@ int serial_tstc(void)
 void serial_setbrg(void)
 {
 }
-
-#endif
diff --git a/drivers/serial/serial_pl010.c b/drivers/serial/serial_pl010.c
index 134ed09..436d6e0 100644
--- a/drivers/serial/serial_pl010.c
+++ b/drivers/serial/serial_pl010.c
@@ -31,8 +31,6 @@
 #include <common.h>
 #include <watchdog.h>
 
-#ifdef CFG_PL010_SERIAL
-
 #include "serial_pl011.h"
 
 #define IO_WRITE(addr, val) (*(volatile unsigned int *)(addr) = (val))
@@ -171,5 +169,3 @@ static int pl010_tstc (int portnum)
  return !(IO_READ (port[portnum] + UART_PL01x_FR) &
  UART_PL01x_FR_RXFE);
 }
-
-#endif
diff --git a/drivers/serial/serial_pl011.c b/drivers/serial/serial_pl011.c
index 4d35fe5..b8d394c 100644
--- a/drivers/serial/serial_pl011.c
+++ b/drivers/serial/serial_pl011.c
@@ -30,8 +30,6 @@
 
 #include <common.h>
 
-#ifdef CFG_PL011_SERIAL
-
 #include "serial_pl011.h"
 
 #define IO_WRITE(addr, val) (*(volatile unsigned int *)(addr) = (val))
@@ -157,5 +155,3 @@ static int pl011_tstc (int portnum)
  return !(IO_READ (port[portnum] + UART_PL01x_FR) &
  UART_PL01x_FR_RXFE);
 }
-
-#endif
diff --git a/drivers/serial/serial_sh.c b/drivers/serial/serial_sh.c
index 0801ac4..2b9eeed 100644
--- a/drivers/serial/serial_sh.c
+++ b/drivers/serial/serial_sh.c
@@ -20,8 +20,6 @@
 #include <common.h>
 #include <asm/processor.h>
 
-#ifdef CFG_SCIF_CONSOLE
-
 #if defined (CONFIG_CONS_SCIF0)
 #define SCIF_BASE SCIF0_BASE
 #elif defined (CONFIG_CONS_SCIF1)
@@ -215,5 +213,3 @@ int serial_getc(void)
 
  return ch;
 }
-
-#endif /* CFG_SCIF_CONSOLE */
diff --git a/drivers/serial/serial_xuartlite.c b/drivers/serial/serial_xuartlite.c
index 5c41a1c..7e84aa1 100644
--- a/drivers/serial/serial_xuartlite.c
+++ b/drivers/serial/serial_xuartlite.c
@@ -27,8 +27,6 @@
 #include <config.h>
 #include <asm/io.h>
 
-#ifdef CONFIG_XILINX_UARTLITE
-
 #define RX_FIFO_OFFSET 0 /* receive FIFO, read only */
 #define TX_FIFO_OFFSET 4 /* transmit FIFO, write only */
 #define STATUS_REG_OFFSET 8 /* status register, read only */
@@ -77,5 +75,3 @@ int serial_tstc(void)
 {
  return (in_be32(UARTLITE_STATUS) & SR_RX_FIFO_VALID_DATA);
 }
-
-#endif /* CONFIG_MICROBLZE */
diff --git a/drivers/serial/usbtty.c b/drivers/serial/usbtty.c
index cc2bdac..846d12e 100644
--- a/drivers/serial/usbtty.c
+++ b/drivers/serial/usbtty.c
@@ -23,8 +23,6 @@
 
 #include <common.h>
 
-#ifdef CONFIG_USB_TTY
-
 #include <circbuf.h>
 #include <devices.h>
 #include "usbtty.h"
@@ -1007,6 +1005,3 @@ void usbtty_poll (void)
  udc_irq();
 
 }
-
-
-#endif
--
1.5.4.GIT


-------------------------------------------------------------------------
Sponsored by: SourceForge.net Community Choice Awards: VOTE NOW!
Studies have shown that voting for your favorite open source project,
along with a healthy diet, reduces your potential for chronic lameness
and boredom. Vote Now at http://www.sourceforge.net/community/cca08
_______________________________________________
U-Boot-Users mailing list
U-Boot-Users@...
https://lists.sourceforge.net/lists/listinfo/u-boot-users

[PATCH 05/11] mtd: Clean drivers/mtd/Makefile

by Michal Simek :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

From: Michal Simek <monstr@...>


Signed-off-by: Michal Simek <monstr@...>
---
 drivers/mtd/Makefile    |    6 +++---
 drivers/mtd/at45.c      |    2 --
 drivers/mtd/cfi_flash.c |    3 ---
 drivers/mtd/mw_eeprom.c |    5 -----
 4 files changed, 3 insertions(+), 13 deletions(-)

diff --git a/drivers/mtd/Makefile b/drivers/mtd/Makefile
index ff932a1..e1bf095 100644
--- a/drivers/mtd/Makefile
+++ b/drivers/mtd/Makefile
@@ -25,10 +25,10 @@ include $(TOPDIR)/config.mk
 
 LIB := $(obj)libmtd.a
 
-COBJS-y += at45.o
-COBJS-y += cfi_flash.o
+COBJS-$(CONFIG_HAS_DATAFLASH) += at45.o
+COBJS-$(CFG_FLASH_CFI_DRIVER) += cfi_flash.o
 COBJS-$(CONFIG_HAS_DATAFLASH) += dataflash.o
-COBJS-y += mw_eeprom.o
+COBJS-$(CONFIG_MW_EEPROM) += mw_eeprom.o
 COBJS-$(CONFIG_FLASH_CFI_LEGACY) += jedec_flash.o
 
 COBJS := $(COBJS-y)
diff --git a/drivers/mtd/at45.c b/drivers/mtd/at45.c
index a9d13ff..4739e04 100644
--- a/drivers/mtd/at45.c
+++ b/drivers/mtd/at45.c
@@ -21,7 +21,6 @@
 #include <config.h>
 #include <common.h>
 
-#ifdef CONFIG_HAS_DATAFLASH
 #include <dataflash.h>
 
 /*
@@ -559,4 +558,3 @@ int AT91F_DataflashProbe(int cs, AT91PS_DataflashDesc pDesc)
  AT91F_DataFlashGetStatus(pDesc);
  return ((pDesc->command[1] == 0xFF) ? 0 : pDesc->command[1] & 0x3C);
 }
-#endif
diff --git a/drivers/mtd/cfi_flash.c b/drivers/mtd/cfi_flash.c
index c0ea97b..5bed30d 100644
--- a/drivers/mtd/cfi_flash.c
+++ b/drivers/mtd/cfi_flash.c
@@ -39,7 +39,6 @@
 #include <asm/io.h>
 #include <asm/byteorder.h>
 #include <environment.h>
-#ifdef CFG_FLASH_CFI_DRIVER
 
 /*
  * This file implements a Common Flash Interface (CFI) driver for
@@ -2010,5 +2009,3 @@ unsigned long flash_init (void)
 #endif
  return (size);
 }
-
-#endif /* CFG_FLASH_CFI */
diff --git a/drivers/mtd/mw_eeprom.c b/drivers/mtd/mw_eeprom.c
index 2b33488..f32ced4 100644
--- a/drivers/mtd/mw_eeprom.c
+++ b/drivers/mtd/mw_eeprom.c
@@ -1,9 +1,6 @@
 /* Three-wire (MicroWire) serial eeprom driver (for 93C46 and compatibles) */
 
 #include <common.h>
-
-#ifdef CONFIG_MW_EEPROM
-
 #include <ssi.h>
 
 /*
@@ -237,5 +234,3 @@ int mw_eeprom_probe(int dev)
  }
  return 0;
 }
-
-#endif
--
1.5.4.GIT


-------------------------------------------------------------------------
Sponsored by: SourceForge.net Community Choice Awards: VOTE NOW!
Studies have shown that voting for your favorite open source project,
along with a healthy diet, reduces your potential for chronic lameness
and boredom. Vote Now at http://www.sourceforge.net/community/cca08
_______________________________________________
U-Boot-Users mailing list
U-Boot-Users@...
https://lists.sourceforge.net/lists/listinfo/u-boot-users

[PATCH 06/11] misc: Clean drivers/misc/Makefile

by Michal Simek :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

From: Michal Simek <monstr@...>


Signed-off-by: Michal Simek <monstr@...>
---
 drivers/misc/Makefile     |    6 +++---
 drivers/misc/ali512x.c    |    5 -----
 drivers/misc/ns87308.c    |    4 ----
 drivers/misc/status_led.c |    4 ----
 4 files changed, 3 insertions(+), 16 deletions(-)

diff --git a/drivers/misc/Makefile b/drivers/misc/Makefile
index fe8d3d8..2e5884b 100644
--- a/drivers/misc/Makefile
+++ b/drivers/misc/Makefile
@@ -25,9 +25,9 @@ include $(TOPDIR)/config.mk
 
 LIB := $(obj)libmisc.a
 
-COBJS-y += ali512x.o
-COBJS-y += ns87308.o
-COBJS-y += status_led.o
+COBJS-$(CONFIG_ALI152X) += ali512x.o
+COBJS-$(CFG_NS87308) += ns87308.o
+COBJS-$(CONFIG_STATUS_LED) += status_led.o
 COBJS-$(CONFIG_FSL_LAW) += fsl_law.o
 
 COBJS := $(COBJS-y)
diff --git a/drivers/misc/ali512x.c b/drivers/misc/ali512x.c
index 90b45d9..d6a2c1f 100644
--- a/drivers/misc/ali512x.c
+++ b/drivers/misc/ali512x.c
@@ -32,8 +32,6 @@
 
 #include <config.h>
 
-#ifdef CONFIG_ALI152X
-
 #include <common.h>
 #include <asm/io.h>
 #include <asm/ic/ali512x.h>
@@ -418,6 +416,3 @@ int ali512x_cio_in(int pin)
 
  return data & bit;
 }
-
-
-#endif
diff --git a/drivers/misc/ns87308.c b/drivers/misc/ns87308.c
index cf4d359..6642c2e 100644
--- a/drivers/misc/ns87308.c
+++ b/drivers/misc/ns87308.c
@@ -23,8 +23,6 @@
 
 #include <config.h>
 
-#ifdef CFG_NS87308
-
 #include <ns87308.h>
 
 void initialise_ns87308 (void)
@@ -117,5 +115,3 @@ void initialise_ns87308 (void)
  PNP_PGCS_CSLINE_CONF(2, CFG_NS87308_CS2_CONF);
 #endif
 }
-
-#endif
diff --git a/drivers/misc/status_led.c b/drivers/misc/status_led.c
index ddb6c22..4ba3e18 100644
--- a/drivers/misc/status_led.c
+++ b/drivers/misc/status_led.c
@@ -35,8 +35,6 @@
 
 /* ------------------------------------------------------------------------- */
 
-#ifdef CONFIG_STATUS_LED
-
 typedef struct {
  led_id_t mask;
  int state;
@@ -127,5 +125,3 @@ void status_led_set (int led, int state)
  }
  __led_set (ld->mask, state);
 }
-
-#endif /* CONFIG_STATUS_LED */
--
1.5.4.GIT


-------------------------------------------------------------------------
Sponsored by: SourceForge.net Community Choice Awards: VOTE NOW!
Studies have shown that voting for your favorite open source project,
along with a healthy diet, reduces your potential for chronic lameness
and boredom. Vote Now at http://www.sourceforge.net/community/cca08
_______________________________________________
U-Boot-Users mailing list
U-Boot-Users@...
https://lists.sourceforge.net/lists/listinfo/u-boot-users

[PATCH 07/11] block: Clean drivers/block/Makefile

by Michal Simek :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

From: Michal Simek <monstr@...>


Signed-off-by: Michal Simek <monstr@...>
---
 drivers/block/Makefile    |   10 +++++-----
 drivers/block/ahci.c      |    3 ---
 drivers/block/ata_piix.c  |    4 ----
 drivers/block/sil680.c    |    4 +---
 drivers/block/sym53c8xx.c |    5 -----
 drivers/block/systemace.c |    3 ---
 6 files changed, 6 insertions(+), 23 deletions(-)

diff --git a/drivers/block/Makefile b/drivers/block/Makefile
index a09cd2a..95db69c 100644
--- a/drivers/block/Makefile
+++ b/drivers/block/Makefile
@@ -25,14 +25,14 @@ include $(TOPDIR)/config.mk
 
 LIB := $(obj)libblock.a
 
-COBJS-y += ahci.o
-COBJS-y += ata_piix.o
+COBJS-$(CONFIG_SCSI_AHCI) += ahci.o
+COBJS-$(CFG_ATA_PIIX) += ata_piix.o
 COBJS-$(CONFIG_FSL_SATA) += fsl_sata.o
 COBJS-$(CONFIG_LIBATA) += libata.o
 COBJS-$(CONFIG_SATA_SIL3114) += sata_sil3114.o
-COBJS-y += sil680.o
-COBJS-y += sym53c8xx.o
-COBJS-y += systemace.o
+COBJS-$(CFG_IDE_SIL680) += sil680.o
+COBJS-$(CONFIG_SCSI_SYM53C8XX) += sym53c8xx.o
+COBJS-$(CONFIG_SYSTEMACE) += systemace.o
 
 COBJS := $(COBJS-y)
 SRCS := $(COBJS:.o=.c)
diff --git a/drivers/block/ahci.c b/drivers/block/ahci.c
index 3d82c62..52fd108 100644
--- a/drivers/block/ahci.c
+++ b/drivers/block/ahci.c
@@ -26,8 +26,6 @@
  */
 #include <common.h>
 
-#ifdef CONFIG_SCSI_AHCI
-
 #include <command.h>
 #include <pci.h>
 #include <asm/processor.h>
@@ -700,4 +698,3 @@ void scsi_print_error(ccb * pccb)
 {
  /*The ahci error info can be read in the ahci driver*/
 }
-#endif
diff --git a/drivers/block/ata_piix.c b/drivers/block/ata_piix.c
index 441a4dc..4c26b36 100644
--- a/drivers/block/ata_piix.c
+++ b/drivers/block/ata_piix.c
@@ -35,8 +35,6 @@
 #include <ide.h>
 #include <ata.h>
 
-#ifdef CFG_ATA_PIIX /*ata_piix driver */
-
 extern block_dev_desc_t sata_dev_desc[CFG_SATA_MAX_DEVICE];
 extern int curr_device;
 
@@ -756,5 +754,3 @@ int scan_sata(int dev)
 {
  return 0;
 }
-
-#endif
diff --git a/drivers/block/sil680.c b/drivers/block/sil680.c
index a6143df..3535f20 100644
--- a/drivers/block/sil680.c
+++ b/drivers/block/sil680.c
@@ -54,7 +54,7 @@
  */
 
 #include <common.h>
-#if defined(CFG_IDE_SIL680)
+
 #include <ata.h>
 #include <ide.h>
 #include <pci.h>
@@ -106,5 +106,3 @@ int ide_preinit (void)
 void ide_set_reset (int flag) {
  return;
 }
-
-#endif /* CFG_IDE_SIL680 */
diff --git a/drivers/block/sym53c8xx.c b/drivers/block/sym53c8xx.c
index 87b63b7..9291b60 100644
--- a/drivers/block/sym53c8xx.c
+++ b/drivers/block/sym53c8xx.c
@@ -35,8 +35,6 @@
 
 #include <common.h>
 
-#ifdef CONFIG_SCSI_SYM53C8XX
-
 #include <command.h>
 #include <pci.h>
 #include <asm/processor.h>
@@ -870,6 +868,3 @@ void scsi_chip_init(void)
 #endif
 }
 #endif
-
-
-#endif /* CONFIG_SCSI_SYM53C8XX */
diff --git a/drivers/block/systemace.c b/drivers/block/systemace.c
index 7d82c27..dfaab52 100644
--- a/drivers/block/systemace.c
+++ b/drivers/block/systemace.c
@@ -44,8 +44,6 @@
 #include <part.h>
 #include <asm/io.h>
 
-#ifdef CONFIG_SYSTEMACE
-
 /*
  * The ace_readw and writew functions read/write 16bit words, but the
  * offset value is the BYTE offset as most used in the Xilinx
@@ -255,4 +253,3 @@ static unsigned long systemace_read(int dev, unsigned long start,
 
  return blkcnt;
 }
-#endif /* CONFIG_SYSTEMACE */
--
1.5.4.GIT


-------------------------------------------------------------------------
Sponsored by: SourceForge.net Community Choice Awards: VOTE NOW!
Studies have shown that voting for your favorite open source project,
along with a healthy diet, reduces your potential for chronic lameness
and boredom. Vote Now at http://www.sourceforge.net/community/cca08
_______________________________________________
U-Boot-Users mailing list
U-Boot-Users@...
https://lists.sourceforge.net/lists/listinfo/u-boot-users

[PATCH 08/11] dma: Clean drivers/dma/Makefile

by Michal Simek :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

From: Michal Simek <monstr@...>


Signed-off-by: Michal Simek <monstr@...>
---
 drivers/dma/MCD_dmaApi.c    |    3 ---
 drivers/dma/MCD_tasks.c     |    4 ----
 drivers/dma/MCD_tasksInit.c |    4 ----
 drivers/dma/Makefile        |    2 +-
 4 files changed, 1 insertions(+), 12 deletions(-)

diff --git a/drivers/dma/MCD_dmaApi.c b/drivers/dma/MCD_dmaApi.c
index b0062b7..5c95651 100644
--- a/drivers/dma/MCD_dmaApi.c
+++ b/drivers/dma/MCD_dmaApi.c
@@ -24,8 +24,6 @@
 
 #include <common.h>
 
-#ifdef CONFIG_FSLDMAFEC
-
 #include <MCD_dma.h>
 #include <MCD_tasksInit.h>
 #include <MCD_progCheck.h>
@@ -1023,4 +1021,3 @@ static void MCD_memcpy(int *dest, int *src, u32 size)
  for (i = 0; i < size; i += sizeof(int), dest++, src++)
  *dest = *src;
 }
-#endif /* CONFIG_FSLDMAFEC */
diff --git a/drivers/dma/MCD_tasks.c b/drivers/dma/MCD_tasks.c
index 06a2d53..4f6e346 100644
--- a/drivers/dma/MCD_tasks.c
+++ b/drivers/dma/MCD_tasks.c
@@ -24,8 +24,6 @@
 
 #include <common.h>
 
-#ifdef CONFIG_FSLDMAFEC
-
 #include <MCD_dma.h>
 
 u32 MCD_varTab0[];
@@ -2430,5 +2428,3 @@ u32 MCD_ENetXmit_TDT[] = {
 #ifdef MCD_INCLUDE_EU
 MCD_bufDesc MCD_singleBufDescs[NCHANNELS];
 #endif
-
-#endif                          /* CONFIG_FSLDMAFEC */
diff --git a/drivers/dma/MCD_tasksInit.c b/drivers/dma/MCD_tasksInit.c
index cf567db..2f19875 100644
--- a/drivers/dma/MCD_tasksInit.c
+++ b/drivers/dma/MCD_tasksInit.c
@@ -28,8 +28,6 @@
  * Do not edit!
  */
 
-#ifdef CONFIG_FSLDMAFEC
-
 #include <MCD_dma.h>
 
 extern dmaRegs *MCD_dmaBar;
@@ -242,5 +240,3 @@ void MCD_startDmaENetXmit(char *bDBase, char *currBD, char *xmitFifoPtr,
  /* Set the task's Enable bit in its Task Control Register */
  MCD_dmaBar->taskControl[channel] |= (u16) 0x8000;
 }
-
-#endif /* CONFIG_FSLDMAFEC */
diff --git a/drivers/dma/Makefile b/drivers/dma/Makefile
index 7e17360..cf29efa 100644
--- a/drivers/dma/Makefile
+++ b/drivers/dma/Makefile
@@ -25,7 +25,7 @@ include $(TOPDIR)/config.mk
 
 LIB := $(obj)libdma.a
 
-COBJS-y += MCD_tasksInit.o MCD_dmaApi.o MCD_tasks.o
+COBJS-$(CONFIG_FSLDMAFEC) += MCD_tasksInit.o MCD_dmaApi.o MCD_tasks.o
 
 COBJS := $(COBJS-y)
 SRCS := $(COBJS:.o=.c)
--
1.5.4.GIT


-------------------------------------------------------------------------
Sponsored by: SourceForge.net Community Choice Awards: VOTE NOW!
Studies have shown that voting for your favorite open source project,
along with a healthy diet, reduces your potential for chronic lameness
and boredom. Vote Now at http://www.sourceforge.net/community/cca08
_______________________________________________
U-Boot-Users mailing list
U-Boot-Users@...
https://lists.sourceforge.net/lists/listinfo/u-boot-users

[PATCH 09/11] pci: Clean drivers/pci/Makefile

by Michal Simek :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

From: Michal Simek <monstr@...>


Signed-off-by: Michal Simek <monstr@...>
---
 drivers/pci/Makefile       |   10 ++++------
 drivers/pci/fsl_pci_init.c |    4 ----
 drivers/pci/pci.c          |    4 ----
 drivers/pci/pci_auto.c     |    5 -----
 drivers/pci/pci_indirect.c |    2 --
 drivers/pci/tsi108_pci.c   |    4 ----
 drivers/pci/w83c553f.c     |    4 ----
 7 files changed, 4 insertions(+), 29 deletions(-)

diff --git a/drivers/pci/Makefile b/drivers/pci/Makefile
index dec93b9..87a3a96 100644
--- a/drivers/pci/Makefile
+++ b/drivers/pci/Makefile
@@ -25,12 +25,10 @@ include $(TOPDIR)/config.mk
 
 LIB := $(obj)libpci.a
 
-COBJS-y += fsl_pci_init.o
-COBJS-y += pci.o
-COBJS-y += pci_auto.o
-COBJS-y += pci_indirect.o
-COBJS-y += tsi108_pci.o
-COBJS-y += w83c553f.o
+COBJS-$(CONFIG_FSL_PCI_INIT) += fsl_pci_init.o
+COBJS-$(CONFIG_PCI) += pci.o pci_auto.o pci_indirect.o
+COBJS-$(CONFIG_TSI108_PCI) += tsi108_pci.o
+COBJS-$(CFG_WINBOND_83C553) += w83c553f.o
 COBJS-$(CONFIG_SH4_PCI) += pci_sh4.o
 COBJS-$(CONFIG_SH7751_PCI) +=pci_sh7751.o
 COBJS-$(CONFIG_SH7780_PCI) +=pci_sh7780.o
diff --git a/drivers/pci/fsl_pci_init.c b/drivers/pci/fsl_pci_init.c
index 7dc33be..2fdb8d0 100644
--- a/drivers/pci/fsl_pci_init.c
+++ b/drivers/pci/fsl_pci_init.c
@@ -18,8 +18,6 @@
 
 #include <common.h>
 
-#ifdef CONFIG_FSL_PCI_INIT
-
 /*
  * PCI/PCIE Controller initialization for mpc85xx/mpc86xx soc's
  *
@@ -197,5 +195,3 @@ fsl_pci_init(struct pci_controller *hose)
  pci_hose_write_config_word(hose, dev, PCI_SEC_STATUS, 0xffff);
  }
 }
-
-#endif /* CONFIG_FSL_PCI */
diff --git a/drivers/pci/pci.c b/drivers/pci/pci.c
index 16180cb..b5eea89 100644
--- a/drivers/pci/pci.c
+++ b/drivers/pci/pci.c
@@ -30,8 +30,6 @@
 
 #include <common.h>
 
-#ifdef CONFIG_PCI
-
 #include <command.h>
 #include <asm/processor.h>
 #include <asm/io.h>
@@ -544,5 +542,3 @@ void pci_init(void)
  /* now call board specific pci_init()... */
  pci_init_board();
 }
-
-#endif /* CONFIG_PCI */
diff --git a/drivers/pci/pci_auto.c b/drivers/pci/pci_auto.c
index eb69593..944ebc7 100644
--- a/drivers/pci/pci_auto.c
+++ b/drivers/pci/pci_auto.c
@@ -14,9 +14,6 @@
  */
 
 #include <common.h>
-
-#ifdef CONFIG_PCI
-
 #include <pci.h>
 
 #undef DEBUG
@@ -408,5 +405,3 @@ int pciauto_config_device(struct pci_controller *hose, pci_dev_t dev)
 
  return sub_bus;
 }
-
-#endif /* CONFIG_PCI */
diff --git a/drivers/pci/pci_indirect.c b/drivers/pci/pci_indirect.c
index 55517a8..ab51f8d 100644
--- a/drivers/pci/pci_indirect.c
+++ b/drivers/pci/pci_indirect.c
@@ -11,7 +11,6 @@
 
 #include <common.h>
 
-#ifdef CONFIG_PCI
 #if (!defined(__I386__) && !defined(CONFIG_IXDP425))
 
 #include <asm/processor.h>
@@ -135,4 +134,3 @@ void pci_setup_indirect(struct pci_controller* hose, u32 cfg_addr, u32 cfg_data)
 }
 
 #endif /* !__I386__ && !CONFIG_IXDP425 */
-#endif /* CONFIG_PCI */
diff --git a/drivers/pci/tsi108_pci.c b/drivers/pci/tsi108_pci.c
index 4f02cb8..edd614f 100644
--- a/drivers/pci/tsi108_pci.c
+++ b/drivers/pci/tsi108_pci.c
@@ -27,8 +27,6 @@
 
 #include <config.h>
 
-#ifdef CONFIG_TSI108_PCI
-
 #include <common.h>
 #include <pci.h>
 #include <asm/io.h>
@@ -182,5 +180,3 @@ void ft_pci_setup(void *blob, bd_t *bd)
  }
 }
 #endif /* CONFIG_OF_LIBFDT */
-
-#endif /* CONFIG_TSI108_PCI */
diff --git a/drivers/pci/w83c553f.c b/drivers/pci/w83c553f.c
index 9ea08a2..d7355a4 100644
--- a/drivers/pci/w83c553f.c
+++ b/drivers/pci/w83c553f.c
@@ -30,8 +30,6 @@
 #include <common.h>
 #include <config.h>
 
-#ifdef CFG_WINBOND_83C553
-
 #include <asm/io.h>
 #include <pci.h>
 
@@ -222,5 +220,3 @@ void initialise_dma(void)
  out8(W83C553F_DMA1 + W83C553F_DMA1_CS, 0x00);
  out16(W83C553F_DMA2 + W83C553F_DMA2_CS, 0x0000);
 }
-
-#endif /* CFG_WINBOND_83C553 */
--
1.5.4.GIT


-------------------------------------------------------------------------
Sponsored by: SourceForge.net Community Choice Awards: VOTE NOW!
Studies have shown that voting for your favorite open source project,
along with a healthy diet, reduces your potential for chronic lameness
and boredom. Vote Now at http://www.sourceforge.net/community/cca08
_______________________________________________
U-Boot-Users mailing list
U-Boot-Users@...
https://lists.sourceforge.net/lists/listinfo/u-boot-users

[PATCH 10/11] input: Clean drivers/input/Makefile

by Michal Simek :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

From: Michal Simek <monstr@...>


Signed-off-by: Michal Simek <monstr@...>
---
 drivers/input/Makefile   |    7 ++++---
 drivers/input/i8042.c    |    4 ----
 drivers/input/keyboard.c |    4 ----
 drivers/input/pc_keyb.c  |    4 ----
 4 files changed, 4 insertions(+), 15 deletions(-)

diff --git a/drivers/input/Makefile b/drivers/input/Makefile
index 2933cb6..d34c5e7 100644
--- a/drivers/input/Makefile
+++ b/drivers/input/Makefile
@@ -25,9 +25,10 @@ include $(TOPDIR)/config.mk
 
 LIB := $(obj)libinput.a
 
-COBJS-y += i8042.o
-COBJS-y += keyboard.o
-COBJS-y += pc_keyb.o ps2ser.o ps2mult.o
+COBJS-$(CONFIG_I8042_KBD) += i8042.o
+COBJS-$(CONFIG_PS2KBD) += keyboard.o pc_keyb.o
+COBJS-$(CONFIG_PS2SERIAL) += ps2ser.o
+COBJS-$(CONFIG_PS2MULT) += ps2mult.o
 
 COBJS := $(COBJS-y)
 SRCS := $(COBJS:.o=.c)
diff --git a/drivers/input/i8042.c b/drivers/input/i8042.c
index 22c2a4e..d152768 100644
--- a/drivers/input/i8042.c
+++ b/drivers/input/i8042.c
@@ -27,8 +27,6 @@
 
 #include <common.h>
 
-#ifdef CONFIG_I8042_KBD
-
 #ifdef CONFIG_USE_CPCIDVI
 extern u8  gt_cpcidvi_in8(u32 offset);
 extern void gt_cpcidvi_out8(u32 offset, u8 data);
@@ -670,5 +668,3 @@ static int kbd_reset (void)
 
     return 0;
 }
-
-#endif /* CONFIG_I8042_KBD */
diff --git a/drivers/input/keyboard.c b/drivers/input/keyboard.c
index 54182a7..a634d76 100644
--- a/drivers/input/keyboard.c
+++ b/drivers/input/keyboard.c
@@ -11,8 +11,6 @@
 
 #include <common.h>
 
-#ifdef CONFIG_PS2KBD
-
 #include <devices.h>
 #include <keyboard.h>
 
@@ -301,5 +299,3 @@ int kbd_init (void)
  }
  return error;
 }
-
-#endif /* CONFIG_PS2KBD */
diff --git a/drivers/input/pc_keyb.c b/drivers/input/pc_keyb.c
index 81d3e98..4649580 100644
--- a/drivers/input/pc_keyb.c
+++ b/drivers/input/pc_keyb.c
@@ -13,8 +13,6 @@
 
 #include <common.h>
 
-#ifdef CONFIG_PS2KBD
-
 #include <keyboard.h>
 #include <pc_keyb.h>
 
@@ -252,5 +250,3 @@ void pckbd_leds(unsigned char leds)
  kbd_send_data(KBD_CMD_SET_LEDS);
  kbd_send_data(leds);
 }
-
-#endif /* CONFIG_PS2KBD */
--
1.5.4.GIT


-------------------------------------------------------------------------
Sponsored by: SourceForge.net Community Choice Awards: VOTE NOW!
Studies have shown that voting for your favorite open source project,
along with a healthy diet, reduces your potential for chronic lameness
and boredom. Vote Now at http://www.sourceforge.net/community/cca08
_______________________________________________
U-Boot-Users mailing list
U-Boot-Users@...
https://lists.sourceforge.net/lists/listinfo/u-boot-users

[PATCH 11/11] video: Clean drivers/video/Makefile

by Michal Simek :: Rate this Message:

Reply to Author