[U-Boot-Users] [PATCH 10/10] net: Conditional COBJS inclusino of remainings
Shinya Kuribayashi
skuribay at ruby.dti.ne.jp
Sat Jun 7 18:16:39 CEST 2008
net: Conditional COBJS inclusino of remainings
From: Shinya Kuribayashi <skuribay at ruby.dti.ne.jp>
Signed-off-by: Shinya Kuribayashi <skuribay at ruby.dti.ne.jp>
---
drivers/net/3c589.c | 5 -----
drivers/net/Makefile | 26 +++++++++++++-------------
drivers/net/cs8900.c | 8 --------
drivers/net/dc2114x.c | 6 ------
drivers/net/dm9000x.c | 3 ---
drivers/net/enc28j60.c | 3 ---
drivers/net/ks8695eth.c | 4 ----
drivers/net/macb.c | 5 -----
drivers/net/netconsole.c | 5 -----
drivers/net/pcnet.c | 4 ----
drivers/net/plb2800_eth.c | 6 ------
drivers/net/s3c4510b_eth.c | 5 -----
drivers/net/tsi108_eth.c | 5 -----
drivers/net/uli526x.c | 4 ----
14 files changed, 13 insertions(+), 76 deletions(-)
diff --git a/drivers/net/3c589.c b/drivers/net/3c589.c
index 3f1e770..0cf8dff 100644
--- a/drivers/net/3c589.c
+++ b/drivers/net/3c589.c
@@ -26,8 +26,6 @@
#include <command.h>
#include <net.h>
-#ifdef CONFIG_DRIVER_3C589
-
#include "3c589.h"
@@ -514,6 +512,3 @@ int eth_send(volatile void *packet, int length) {
return length;
}
-
-
-#endif /* CONFIG_DRIVER_3C589 */
diff --git a/drivers/net/Makefile b/drivers/net/Makefile
index ca30952..84be288 100644
--- a/drivers/net/Makefile
+++ b/drivers/net/Makefile
@@ -25,21 +25,21 @@ include $(TOPDIR)/config.mk
LIB := $(obj)libnet.a
-COBJS-y += 3c589.o
+COBJS-$(CONFIG_DRIVER_3C589) += 3c589.o
COBJS-$(CONFIG_BCM570x) += bcm570x.o bcm570x_autoneg.o 5701rls.o
COBJS-$(CONFIG_BFIN_MAC) += bfin_mac.o
-COBJS-y += cs8900.o
-COBJS-y += dc2114x.o
-COBJS-y += dm9000x.o
+COBJS-$(CONFIG_DRIVER_CS8900) += cs8900.o
+COBJS-$(CONFIG_TULIP) += dc2114x.o
+COBJS-$(CONFIG_DRIVER_DM9000) += dm9000x.o
COBJS-$(CONFIG_E1000) += e1000.o
COBJS-$(CONFIG_EEPRO100) += eepro100.o
-COBJS-y += enc28j60.o
+COBJS-$(CONFIG_ENC28J60) += enc28j60.o
COBJS-$(CONFIG_FSLDMAFEC) += fsl_mcdmafec.o
COBJS-$(CONFIG_GRETH) += greth.o
COBJS-$(CONFIG_INCA_IP_SWITCH) += inca-ip_sw.o
-COBJS-y += ks8695eth.o
+COBJS-$(CONFIG_DRIVER_KS8695ETH) += ks8695eth.o
COBJS-$(CONFIG_DRIVER_LAN91C96) += lan91c96.o
-COBJS-y += macb.o
+COBJS-$(CONFIG_MACB) += macb.o
COBJS-$(CONFIG_MCFFEC) += mcffec.o
COBJS-$(CONFIG_NATSEMI) += natsemi.o
ifeq ($(CONFIG_DRIVER_NE2000),y)
@@ -47,22 +47,22 @@ COBJS-y += ne2000.o
COBJS-$(CONFIG_DRIVER_AX88796L) += ax88796.o
endif
COBJS-$(CONFIG_DRIVER_NETARMETH) += netarm_eth.o
-COBJS-y += netconsole.o
+COBJS-$(CONFIG_NETCONSOLE) += netconsole.o
COBJS-$(CONFIG_DRIVER_NS7520_ETHERNET) += ns7520_eth.o
COBJS-$(CONFIG_NS8382X) += ns8382x.o
COBJS-$(CONFIG_DRIVER_NS9750_ETHERNET) += ns9750_eth.o
-COBJS-y += pcnet.o
-COBJS-y += plb2800_eth.o
+COBJS-$(CONFIG_PCNET) += pcnet.o
+COBJS-$(CONFIG_PLB2800_ETHER) += plb2800_eth.o
COBJS-$(CONFIG_DRIVER_RTL8019) += rtl8019.o
COBJS-$(CONFIG_RTL8139) += rtl8139.o
COBJS-$(CONFIG_RTL8169) += rtl8169.o
-COBJS-y += s3c4510b_eth.o
+COBJS-$(CONFIG_DRIVER_S3C4510_ETH) += s3c4510b_eth.o
COBJS-$(CONFIG_DRIVER_SMC91111) += smc91111.o
COBJS-$(CONFIG_DRIVER_SMC911X) += smc911x.o
COBJS-$(CONFIG_TIGON3) += tigon3.o bcm570x_autoneg.o 5701rls.o
COBJS-$(CONFIG_TSEC_ENET) += tsec.o
-COBJS-y += tsi108_eth.o
-COBJS-y += uli526x.o
+COBJS-$(CONFIG_TSI108_ETH) += tsi108_eth.o
+COBJS-$(CONFIG_ULI526X) += uli526x.o
COBJS-$(CONFIG_VSC7385_ENET) += vsc7385.o
COBJS-$(CONFIG_XILINX_EMAC) += xilinx_emac.o
COBJS-$(CONFIG_XILINX_EMACLITE) += xilinx_emaclite.o
diff --git a/drivers/net/cs8900.c b/drivers/net/cs8900.c
index 458b517..ae1983a 100644
--- a/drivers/net/cs8900.c
+++ b/drivers/net/cs8900.c
@@ -41,10 +41,6 @@
#include "cs8900.h"
#include <net.h>
-#ifdef CONFIG_DRIVER_CS8900
-
-#if defined(CONFIG_CMD_NET)
-
#undef DEBUG
/* packet page register access functions */
@@ -315,7 +311,3 @@ int cs8900_e2prom_write(unsigned char addr, unsigned short value)
return 0;
}
-
-#endif /* CONFIG_CMD_NET */
-
-#endif /* CONFIG_DRIVER_CS8900 */
diff --git a/drivers/net/dc2114x.c b/drivers/net/dc2114x.c
index 1d728d8..8117239 100644
--- a/drivers/net/dc2114x.c
+++ b/drivers/net/dc2114x.c
@@ -19,10 +19,6 @@
*/
#include <common.h>
-
-#if defined(CONFIG_CMD_NET) \
- && defined(CONFIG_NET_MULTI) && defined(CONFIG_TULIP)
-
#include <malloc.h>
#include <net.h>
#include <pci.h>
@@ -766,5 +762,3 @@ static void update_srom(struct eth_device *dev, bd_t *bis)
}
}
#endif /* UPDATE_SROM */
-
-#endif
diff --git a/drivers/net/dm9000x.c b/drivers/net/dm9000x.c
index 68901cd..cb21925 100644
--- a/drivers/net/dm9000x.c
+++ b/drivers/net/dm9000x.c
@@ -47,8 +47,6 @@ TODO: Homerun NIC and longrun NIC are not functional, only internal at the
#include <net.h>
#include <asm/io.h>
-#ifdef CONFIG_DRIVER_DM9000
-
#include "dm9000x.h"
/* Board/System/Debug information/definition ---------------- */
@@ -619,4 +617,3 @@ phy_write(int reg, u16 value)
DM9000_iow(DM9000_EPCR, 0x0); /* Clear phyxcer write command */
DM9000_DBG("phy_write(reg:%d, value:%d)\n", reg, value);
}
-#endif /* CONFIG_DRIVER_DM9000 */
diff --git a/drivers/net/enc28j60.c b/drivers/net/enc28j60.c
index 98303ac..5c24b0d 100644
--- a/drivers/net/enc28j60.c
+++ b/drivers/net/enc28j60.c
@@ -17,7 +17,6 @@
#include <config.h>
#include <common.h>
-#ifdef CONFIG_ENC28J60
#include <net.h>
#include <asm/arch/hardware.h>
#include <asm/arch/spi.h>
@@ -979,5 +978,3 @@ static void phyWrite(unsigned char addr, unsigned short data)
}
}
}
-
-#endif /* CONFIG_ENC28J60 */
diff --git a/drivers/net/ks8695eth.c b/drivers/net/ks8695eth.c
index b598dd7..7f3e0c2 100644
--- a/drivers/net/ks8695eth.c
+++ b/drivers/net/ks8695eth.c
@@ -21,8 +21,6 @@
/****************************************************************************/
#include <common.h>
-
-#ifdef CONFIG_DRIVER_KS8695ETH
#include <malloc.h>
#include <net.h>
#include <asm/io.h>
@@ -234,5 +232,3 @@ int eth_send(volatile void *packet, int len)
return len;
}
-
-#endif /* CONFIG_DRIVER_KS8695ETH */
diff --git a/drivers/net/macb.c b/drivers/net/macb.c
index e5733f6..aa39284 100644
--- a/drivers/net/macb.c
+++ b/drivers/net/macb.c
@@ -17,9 +17,6 @@
*/
#include <common.h>
-#if defined(CONFIG_MACB) \
- && (defined(CONFIG_CMD_NET) || defined(CONFIG_CMD_MII))
-
/*
* The u-boot networking stack is a little weird. It seems like the
* networking core allocates receive buffers up front without any
@@ -593,5 +590,3 @@ int miiphy_write(unsigned char addr, unsigned char reg, unsigned short value)
}
#endif
-
-#endif /* CONFIG_MACB */
diff --git a/drivers/net/netconsole.c b/drivers/net/netconsole.c
index 69089f9..b2ee5ea 100644
--- a/drivers/net/netconsole.c
+++ b/drivers/net/netconsole.c
@@ -22,9 +22,6 @@
*/
#include <common.h>
-
-#ifdef CONFIG_NETCONSOLE
-
#include <command.h>
#include <devices.h>
#include <net.h>
@@ -263,5 +260,3 @@ int drv_nc_init (void)
return (rc == 0) ? 1 : rc;
}
-
-#endif /* CONFIG_NETCONSOLE */
diff --git a/drivers/net/pcnet.c b/drivers/net/pcnet.c
index aa04e8f..a4f0214 100644
--- a/drivers/net/pcnet.c
+++ b/drivers/net/pcnet.c
@@ -45,9 +45,6 @@
#define PCNET_DEBUG2(fmt,args...)
#endif
-#if defined(CONFIG_CMD_NET) \
- && defined(CONFIG_NET_MULTI) && defined(CONFIG_PCNET)
-
#if !defined(CONF_PCNET_79C973) && defined(CONF_PCNET_79C975)
#error "Macro for PCnet chip version is not defined!"
#endif
@@ -537,4 +534,3 @@ static void pcnet_halt (struct eth_device *dev)
printf ("%s: TIMEOUT: controller reset failed\n", dev->name);
}
}
-#endif
diff --git a/drivers/net/plb2800_eth.c b/drivers/net/plb2800_eth.c
index b8cc57a..dad842c 100644
--- a/drivers/net/plb2800_eth.c
+++ b/drivers/net/plb2800_eth.c
@@ -24,10 +24,6 @@
*/
#include <common.h>
-
-#if defined(CONFIG_CMD_NET) \
- && defined(CONFIG_NET_MULTI) && defined(CONFIG_PLB2800_ETHER)
-
#include <malloc.h>
#include <net.h>
#include <asm/addrspace.h>
@@ -392,5 +388,3 @@ static unsigned char * plb2800_get_mac_addr(void)
return addr;
}
-
-#endif /* CONFIG_PLB2800_ETHER */
diff --git a/drivers/net/s3c4510b_eth.c b/drivers/net/s3c4510b_eth.c
index 3d9066a..6dcb244 100644
--- a/drivers/net/s3c4510b_eth.c
+++ b/drivers/net/s3c4510b_eth.c
@@ -25,9 +25,6 @@
*/
#include <common.h>
-
-#ifdef CONFIG_DRIVER_S3C4510_ETH
-
#include <command.h>
#include <net.h>
#include <asm/hardware.h>
@@ -242,5 +239,3 @@ void eth_halt(void)
/* disable MAC */
PUT_REG( REG_MACCON, ETH_HaltReg);
}
-
-#endif
diff --git a/drivers/net/tsi108_eth.c b/drivers/net/tsi108_eth.c
index a09115e..57c0dc3 100644
--- a/drivers/net/tsi108_eth.c
+++ b/drivers/net/tsi108_eth.c
@@ -27,9 +27,6 @@
#include <config.h>
-#if defined(CONFIG_CMD_NET) && defined(CONFIG_NET_MULTI) \
- && defined(CONFIG_TSI108_ETH)
-
#if !defined(CONFIG_TSI108_ETH_NUM_PORTS) || (CONFIG_TSI108_ETH_NUM_PORTS > 2)
#error "CONFIG_TSI108_ETH_NUM_PORTS must be defined as 1 or 2"
#endif
@@ -1032,5 +1029,3 @@ static void tsi108_eth_halt (struct eth_device *dev)
/* Put MAC into reset state. */
reg_MAC_CONFIG_1(base) = MAC_CONFIG_1_SOFT_RESET;
}
-
-#endif
diff --git a/drivers/net/uli526x.c b/drivers/net/uli526x.c
index 79d29ae..7145b72 100644
--- a/drivers/net/uli526x.c
+++ b/drivers/net/uli526x.c
@@ -22,9 +22,6 @@
/* some kernel function compatible define */
-#if defined(CONFIG_CMD_NET) && defined(CONFIG_NET_MULTI) && \
- defined(CONFIG_ULI526X)
-
#undef DEBUG
/* Board/System/Debug information/definition */
@@ -993,4 +990,3 @@ static void set_mac_addr(struct eth_device *dev)
udelay(10);
return;
}
-#endif
More information about the U-Boot
mailing list