public inbox for u-boot@lists.denx.de
 help / color / mirror / Atom feed
* [U-Boot-Users] drivers/net/Makefile: Conditional COBJS inclusion cleanups
@ 2008-06-07 16:01 Shinya Kuribayashi
  2008-06-07 16:03 ` [U-Boot-Users] [PATCH 1/10] net: Conditional COBJS inclusion of bcm570x and tigon3 modules Shinya Kuribayashi
  2008-06-09 14:37 ` [U-Boot-Users] [PATCH v2] net: Conditional COBJS inclusion of network drivers Shinya Kuribayashi
  0 siblings, 2 replies; 20+ messages in thread
From: Shinya Kuribayashi @ 2008-06-07 16:01 UTC (permalink / raw)
  To: u-boot

Signed-off-by: Shinya Kuribayashi <skuribay@ruby.dti.ne.jp>
---

This mail contains the whole patch and diffstat.
Separated patches will follow for easy review.

 drivers/net/3c589.c        |    5 ---
 drivers/net/Makefile       |   66 ++++++++++++++++++++++----------------------
 drivers/net/bcm570x.c      |    5 ---
 drivers/net/cs8900.c       |    8 -----
 drivers/net/dc2114x.c      |    6 ----
 drivers/net/dm9000x.c      |    3 --
 drivers/net/e1000.c        |    5 ---
 drivers/net/eepro100.c     |    5 ---
 drivers/net/enc28j60.c     |    3 --
 drivers/net/fsl_mcdmafec.c |    2 -
 drivers/net/inca-ip_sw.c   |    5 ---
 drivers/net/ks8695eth.c    |    4 --
 drivers/net/lan91c96.c     |    9 ------
 drivers/net/macb.c         |    5 ---
 drivers/net/mcffec.c       |    3 --
 drivers/net/natsemi.c      |    5 ---
 drivers/net/netarm_eth.c   |    4 --
 drivers/net/netconsole.c   |    5 ---
 drivers/net/ns7520_eth.c   |    5 ---
 drivers/net/ns8382x.c      |    5 ---
 drivers/net/ns9750_eth.c   |    4 --
 drivers/net/pcnet.c        |    4 --
 drivers/net/plb2800_eth.c  |    6 ----
 drivers/net/rtl8019.c      |    8 -----
 drivers/net/rtl8139.c      |    4 --
 drivers/net/rtl8169.c      |    5 ---
 drivers/net/s3c4510b_eth.c |    5 ---
 drivers/net/smc91111.c     |    3 --
 drivers/net/smc911x.c      |    5 ---
 drivers/net/tigon3.c       |    5 +--
 drivers/net/tsec.c         |    3 --
 drivers/net/tsi108_eth.c   |    5 ---
 drivers/net/uli526x.c      |    4 --
 drivers/net/vsc7385.c      |    5 ---
 34 files changed, 34 insertions(+), 190 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 5b031c9..84be288 100644
--- a/drivers/net/Makefile
+++ b/drivers/net/Makefile
@@ -25,45 +25,45 @@ include $(TOPDIR)/config.mk
 
 LIB	:= $(obj)libnet.a
 
-COBJS-y += 3c589.o
-COBJS-y += bcm570x.o bcm570x_autoneg.o 5701rls.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-y += e1000.o
-COBJS-y += eepro100.o
-COBJS-y += enc28j60.o
-COBJS-y += fsl_mcdmafec.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-$(CONFIG_ENC28J60) += enc28j60.o
+COBJS-$(CONFIG_FSLDMAFEC) += fsl_mcdmafec.o
 COBJS-$(CONFIG_GRETH) += greth.o
-COBJS-y += inca-ip_sw.o
-COBJS-y += ks8695eth.o
-COBJS-y += lan91c96.o
-COBJS-y += macb.o
-COBJS-y += mcffec.o
-COBJS-y += natsemi.o
+COBJS-$(CONFIG_INCA_IP_SWITCH) += inca-ip_sw.o
+COBJS-$(CONFIG_DRIVER_KS8695ETH) += ks8695eth.o
+COBJS-$(CONFIG_DRIVER_LAN91C96) += lan91c96.o
+COBJS-$(CONFIG_MACB) += macb.o
+COBJS-$(CONFIG_MCFFEC) += mcffec.o
+COBJS-$(CONFIG_NATSEMI) += natsemi.o
 ifeq ($(CONFIG_DRIVER_NE2000),y)
 COBJS-y += ne2000.o
 COBJS-$(CONFIG_DRIVER_AX88796L) += ax88796.o
 endif
-COBJS-y += netarm_eth.o
-COBJS-y += netconsole.o
-COBJS-y += ns7520_eth.o
-COBJS-y += ns8382x.o
-COBJS-y += ns9750_eth.o
-COBJS-y += pcnet.o
-COBJS-y += plb2800_eth.o
-COBJS-y += rtl8019.o
-COBJS-y += rtl8139.o
-COBJS-y += rtl8169.o
-COBJS-y += s3c4510b_eth.o
-COBJS-y += smc91111.o
-COBJS-y += smc911x.o
-COBJS-y += tigon3.o
-COBJS-y += tsec.o
-COBJS-y += tsi108_eth.o
-COBJS-y += uli526x.o
-COBJS-y += vsc7385.o
+COBJS-$(CONFIG_DRIVER_NETARMETH) += netarm_eth.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-$(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-$(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-$(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/bcm570x.c b/drivers/net/bcm570x.c
index 5ad31d1..6b28b95 100644
--- a/drivers/net/bcm570x.c
+++ b/drivers/net/bcm570x.c
@@ -6,9 +6,6 @@
 
 #include <common.h>
 
-#if defined(CONFIG_CMD_NET) \
-	&& (!defined(CONFIG_NET_MULTI)) && defined(CONFIG_BCM570x)
-
 #ifdef CONFIG_BMW
 #include <mpc824x.h>
 #endif
@@ -1599,5 +1596,3 @@ PQQ_ENTRY QQ_GetTail (PQQ_CONTAINER pQueue, unsigned int Idx)
 
 	return pQueue->Array[Idx];
 }
-
-#endif
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/e1000.c b/drivers/net/e1000.c
index c53c226..8f0e7d5 100644
--- a/drivers/net/e1000.c
+++ b/drivers/net/e1000.c
@@ -44,9 +44,6 @@ tested on both gig copper and gig fiber boards
 
 #include "e1000.h"
 
-#if defined(CONFIG_CMD_NET) \
-	&& defined(CONFIG_NET_MULTI) && defined(CONFIG_E1000)
-
 #define TOUT_LOOP   100000
 
 #undef	virt_to_bus
@@ -3059,5 +3056,3 @@ e1000_initialize(bd_t * bis)
 	}
 	return 1;
 }
-
-#endif
diff --git a/drivers/net/eepro100.c b/drivers/net/eepro100.c
index 96ed271..9de0fb5 100644
--- a/drivers/net/eepro100.c
+++ b/drivers/net/eepro100.c
@@ -30,9 +30,6 @@
 
 #undef DEBUG
 
-#if defined(CONFIG_CMD_NET) \
-	&& defined(CONFIG_NET_MULTI) && defined(CONFIG_EEPRO100)
-
 	/* Ethernet chip registers.
 	 */
 #define SCBStatus		0	/* Rx/Command Unit Status *Word* */
@@ -944,5 +941,3 @@ static void read_hw_addr (struct eth_device *dev, bd_t * bis)
 #endif
 	}
 }
-
-#endif
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/fsl_mcdmafec.c b/drivers/net/fsl_mcdmafec.c
index 2ef91f2..b9602e1 100644
--- a/drivers/net/fsl_mcdmafec.c
+++ b/drivers/net/fsl_mcdmafec.c
@@ -31,7 +31,6 @@
 #include <net.h>
 #include <miiphy.h>
 
-#ifdef CONFIG_FSLDMAFEC
 #undef	ET_DEBUG
 #undef	MII_DEBUG
 
@@ -588,4 +587,3 @@ int mcdmafec_initialize(bd_t * bis)
 }
 
 #endif				/* CONFIG_CMD_NET && CONFIG_NET_MULTI */
-#endif				/* CONFIG_FSLDMAFEC */
diff --git a/drivers/net/inca-ip_sw.c b/drivers/net/inca-ip_sw.c
index a079b60..d852a15 100644
--- a/drivers/net/inca-ip_sw.c
+++ b/drivers/net/inca-ip_sw.c
@@ -26,9 +26,6 @@
 
 #include <common.h>
 
-#if defined(CONFIG_CMD_NET) \
-	&& defined(CONFIG_NET_MULTI) && defined(CONFIG_INCA_IP_SWITCH)
-
 #include <malloc.h>
 #include <net.h>
 #include <asm/inca-ip.h>
@@ -813,5 +810,3 @@ Fail:
 	return -1;
 }
 #endif /* CONFIG_INCA_IP_SWITCH_AMDIX */
-
-#endif
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/lan91c96.c b/drivers/net/lan91c96.c
index 51cfb7e..c23a400 100644
--- a/drivers/net/lan91c96.c
+++ b/drivers/net/lan91c96.c
@@ -63,10 +63,6 @@
 #include "lan91c96.h"
 #include <net.h>
 
-#ifdef CONFIG_DRIVER_LAN91C96
-
-#if defined(CONFIG_CMD_NET)
-
 /*------------------------------------------------------------------------
  *
  * Configuration options, for the experienced user to change.
@@ -865,9 +861,6 @@ static int smc_hw_init ()
 }
 #endif /* 0 */
 
-#endif /* CONFIG_CMD_NET */
-
-
 /* smc_get_ethaddr (bd_t * bd)
  *
  * This checks both the environment and the ROM for an ethernet address. If
@@ -963,5 +956,3 @@ int get_rom_mac (unsigned char *v_rom_mac)
 	return (1);
 #endif
 }
-
-#endif /* CONFIG_DRIVER_LAN91C96 */
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/mcffec.c b/drivers/net/mcffec.c
index 5ab4726..72743f1 100644
--- a/drivers/net/mcffec.c
+++ b/drivers/net/mcffec.c
@@ -27,8 +27,6 @@
 #include <common.h>
 #include <malloc.h>
 
-#ifdef CONFIG_MCFFEC
-
 #include <asm/fec.h>
 #include <asm/immap.h>
 
@@ -601,4 +599,3 @@ int mcffec_initialize(bd_t * bis)
 }
 
 #endif				/* CONFIG_CMD_NET, FEC_ENET & NET_MULTI */
-#endif				/* CONFIG_MCFFEC */
diff --git a/drivers/net/natsemi.c b/drivers/net/natsemi.c
index a523959..4aee048 100644
--- a/drivers/net/natsemi.c
+++ b/drivers/net/natsemi.c
@@ -56,9 +56,6 @@
 #include <asm/io.h>
 #include <pci.h>
 
-#if defined(CONFIG_CMD_NET) \
-	&& defined(CONFIG_NET_MULTI) && defined(CONFIG_NATSEMI)
-
 /* defines */
 #define EEPROM_SIZE 0xb /*12 16-bit chunks, or 24 bytes*/
 
@@ -878,5 +875,3 @@ natsemi_disable(struct eth_device *dev)
 	/* Restore PME enable bit */
 	OUTL(dev, SavedClkRun, ClkRun);
 }
-
-#endif
diff --git a/drivers/net/netarm_eth.c b/drivers/net/netarm_eth.c
index ecf45dc..6b635bb 100644
--- a/drivers/net/netarm_eth.c
+++ b/drivers/net/netarm_eth.c
@@ -22,8 +22,6 @@
 
 
 #include <common.h>
-
-#ifdef CONFIG_DRIVER_NETARMETH
 #include <command.h>
 #include <net.h>
 #include "netarm_eth.h"
@@ -354,5 +352,3 @@ extern int eth_send (volatile void *packet, int length)
 }
 
 #endif /* CONFIG_CMD_NET */
-
-#endif /* CONFIG_DRIVER_NETARMETH */
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/ns7520_eth.c b/drivers/net/ns7520_eth.c
index a5a20df..37411df 100644
--- a/drivers/net/ns7520_eth.c
+++ b/drivers/net/ns7520_eth.c
@@ -15,8 +15,6 @@
 
 #include <common.h>
 
-#if defined(CONFIG_DRIVER_NS7520_ETHERNET)
-
 #include <net.h>		/* NetSendPacket */
 #include <asm/arch/netarm_registers.h>
 #include <asm/arch/netarm_dma_module.h>
@@ -846,14 +844,11 @@ extern int ns7520_miiphy_write(char *devname, unsigned char const addr,
 	return (ret);
 }
 #endif				/* defined(CONFIG_MII) */
-#endif				/* CONFIG_DRIVER_NS7520_ETHERNET */
 
 int ns7520_miiphy_initialize(bd_t *bis)
 {
-#if defined(CONFIG_DRIVER_NS7520_ETHERNET)
 #if defined(CONFIG_MII)
 	miiphy_register("ns7520phy", ns7520_miiphy_read, ns7520_miiphy_write);
 #endif
-#endif
 	return 0;
 }
diff --git a/drivers/net/ns8382x.c b/drivers/net/ns8382x.c
index c807dd4..0b9a3ae 100644
--- a/drivers/net/ns8382x.c
+++ b/drivers/net/ns8382x.c
@@ -56,9 +56,6 @@
 #include <asm/io.h>
 #include <pci.h>
 
-#if defined(CONFIG_CMD_NET) \
-	&& defined(CONFIG_NET_MULTI) && defined(CONFIG_NS8382X)
-
 /* defines */
 #define DSIZE     0x00000FFF
 #define ETH_ALEN		6
@@ -859,5 +856,3 @@ ns8382x_disable(struct eth_device *dev)
 	/* Restore PME enable bit */
 	OUTL(dev, SavedClkRun, ClkRun);
 }
-
-#endif
diff --git a/drivers/net/ns9750_eth.c b/drivers/net/ns9750_eth.c
index 067ff8e..0559710 100644
--- a/drivers/net/ns9750_eth.c
+++ b/drivers/net/ns9750_eth.c
@@ -37,8 +37,6 @@
 
 #include "ns9750_eth.h"		/* for Ethernet and PHY */
 
-#ifdef CONFIG_DRIVER_NS9750_ETHERNET
-
 /* some definition to make transistion to linux easier */
 
 #define NS9750_DRIVER_NAME	"eth"
@@ -793,5 +791,3 @@ static unsigned int ns9750_mii_poll_busy (void)
 
 	return unTimeout;
 }
-
-#endif /* CONFIG_DRIVER_NS9750_ETHERNET */
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/rtl8019.c b/drivers/net/rtl8019.c
index 9d62cab..3ddf917 100644
--- a/drivers/net/rtl8019.c
+++ b/drivers/net/rtl8019.c
@@ -32,10 +32,6 @@
 #include "rtl8019.h"
 #include <net.h>
 
-#ifdef CONFIG_DRIVER_RTL8019
-
-#if defined(CONFIG_CMD_NET)
-
 /* packet page register access functions */
 
 static unsigned char get_reg (unsigned int regno)
@@ -271,7 +267,3 @@ extern int eth_send (volatile void *packet, int length)
 
 	return 0;
 }
-
-#endif /* CONFIG_CMD_NET */
-
-#endif /* CONFIG_DRIVER_RTL8019 */
diff --git a/drivers/net/rtl8139.c b/drivers/net/rtl8139.c
index 097f684..4fd20ac 100644
--- a/drivers/net/rtl8139.c
+++ b/drivers/net/rtl8139.c
@@ -77,9 +77,6 @@
 #include <asm/io.h>
 #include <pci.h>
 
-#if defined(CONFIG_CMD_NET) && defined(CONFIG_NET_MULTI) && \
-	defined(CONFIG_RTL8139)
-
 #define RTL_TIMEOUT	100000
 
 #define ETH_FRAME_LEN		1514
@@ -545,4 +542,3 @@ static void rtl_disable(struct eth_device *dev)
 		udelay (100); /* wait 100us */
 	}
 }
-#endif
diff --git a/drivers/net/rtl8169.c b/drivers/net/rtl8169.c
index 6c4c9ff..7423bc0 100644
--- a/drivers/net/rtl8169.c
+++ b/drivers/net/rtl8169.c
@@ -58,9 +58,6 @@
 #include <asm/io.h>
 #include <pci.h>
 
-#if defined(CONFIG_CMD_NET) && defined(CONFIG_NET_MULTI) && \
-	defined(CONFIG_RTL8169)
-
 #undef DEBUG_RTL8169
 #undef DEBUG_RTL8169_TX
 #undef DEBUG_RTL8169_RX
@@ -887,5 +884,3 @@ int rtl8169_initialize(bd_t *bis)
 	}
 	return card_number;
 }
-
-#endif
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/smc91111.c b/drivers/net/smc91111.c
index 8061f12..e8b235b 100644
--- a/drivers/net/smc91111.c
+++ b/drivers/net/smc91111.c
@@ -65,8 +65,6 @@
 #include "smc91111.h"
 #include <net.h>
 
-#ifdef CONFIG_DRIVER_SMC91111
-
 /* Use power-down feature of the chip */
 #define POWER_DOWN	0
 
@@ -1620,4 +1618,3 @@ int get_rom_mac (uchar *v_rom_mac)
 	return (valid_mac ? 1 : 0);
 #endif
 }
-#endif /* CONFIG_DRIVER_SMC91111 */
diff --git a/drivers/net/smc911x.c b/drivers/net/smc911x.c
index 5302cb5..8e141d4 100644
--- a/drivers/net/smc911x.c
+++ b/drivers/net/smc911x.c
@@ -23,9 +23,6 @@
  */
 
 #include <common.h>
-
-#ifdef CONFIG_DRIVER_SMC911X
-
 #include <command.h>
 #include <net.h>
 #include <miiphy.h>
@@ -682,5 +679,3 @@ int eth_rx(void)
 
 	return 0;
 }
-
-#endif				/* CONFIG_DRIVER_SMC911X */
diff --git a/drivers/net/tigon3.c b/drivers/net/tigon3.c
index 5f6a4ec..ab448b0 100644
--- a/drivers/net/tigon3.c
+++ b/drivers/net/tigon3.c
@@ -12,8 +12,7 @@
 /******************************************************************************/
 #include <common.h>
 #include <asm/types.h>
-#if defined(CONFIG_CMD_NET) && !defined(CONFIG_NET_MULTI) && \
-	defined(CONFIG_TIGON3)
+
 #ifdef CONFIG_BMW
 #include <mpc824x.h>
 #endif
@@ -5695,5 +5694,3 @@ LM_DmaTest (PLM_DEVICE_BLOCK pDevice, PLM_UINT8 pBufferVirt,
 	}
 	return LM_STATUS_SUCCESS;
 }
-
-#endif
diff --git a/drivers/net/tsec.c b/drivers/net/tsec.c
index c7af930..9d20918 100644
--- a/drivers/net/tsec.c
+++ b/drivers/net/tsec.c
@@ -17,7 +17,6 @@
 #include <net.h>
 #include <command.h>
 
-#if defined(CONFIG_TSEC_ENET)
 #include "tsec.h"
 #include "miiphy.h"
 
@@ -1710,5 +1709,3 @@ tsec_mcast_addr (struct eth_device *dev, u8 mcast_mac, u8 set)
 	return 0;
 }
 #endif /* Multicast TFTP ? */
-
-#endif /* CONFIG_TSEC_ENET */
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
diff --git a/drivers/net/vsc7385.c b/drivers/net/vsc7385.c
index 4095bce..4e7259f 100644
--- a/drivers/net/vsc7385.c
+++ b/drivers/net/vsc7385.c
@@ -13,9 +13,6 @@
  */
 
 #include <config.h>
-
-#ifdef CONFIG_VSC7385_ENET
-
 #include <common.h>
 #include <asm/io.h>
 #include <asm/errno.h>
@@ -97,5 +94,3 @@ int vsc7385_upload_firmware(void *firmware, unsigned int size)
 
 	return 0;
 }
-
-#endif

^ permalink raw reply related	[flat|nested] 20+ messages in thread

* [U-Boot-Users] [PATCH 1/10] net: Conditional COBJS inclusion of bcm570x and tigon3 modules
  2008-06-07 16:01 [U-Boot-Users] drivers/net/Makefile: Conditional COBJS inclusion cleanups Shinya Kuribayashi
@ 2008-06-07 16:03 ` Shinya Kuribayashi
  2008-06-07 16:04   ` [U-Boot-Users] [PATCH 2/10] net: Conditional COBJS inclusion of Realtek modules Shinya Kuribayashi
  2008-06-09 14:37 ` [U-Boot-Users] [PATCH v2] net: Conditional COBJS inclusion of network drivers Shinya Kuribayashi
  1 sibling, 1 reply; 20+ messages in thread
From: Shinya Kuribayashi @ 2008-06-07 16:03 UTC (permalink / raw)
  To: u-boot

net: Conditional COBJS inclusion of bcm570x and tigon3 modules

From: Shinya Kuribayashi <skuribay@ruby.dti.ne.jp>

Signed-off-by: Shinya Kuribayashi <skuribay@ruby.dti.ne.jp>
---

 drivers/net/Makefile  |    4 ++--
 drivers/net/bcm570x.c |    5 -----
 drivers/net/tigon3.c  |    5 +----
 3 files changed, 3 insertions(+), 11 deletions(-)


diff --git a/drivers/net/Makefile b/drivers/net/Makefile
index 5b031c9..4274f79 100644
--- a/drivers/net/Makefile
+++ b/drivers/net/Makefile
@@ -26,7 +26,7 @@ include $(TOPDIR)/config.mk
 LIB	:= $(obj)libnet.a
 
 COBJS-y += 3c589.o
-COBJS-y += bcm570x.o bcm570x_autoneg.o 5701rls.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
@@ -59,7 +59,7 @@ COBJS-y += rtl8169.o
 COBJS-y += s3c4510b_eth.o
 COBJS-y += smc91111.o
 COBJS-y += smc911x.o
-COBJS-y += tigon3.o
+COBJS-$(CONFIG_TIGON3) += tigon3.o bcm570x_autoneg.o 5701rls.o
 COBJS-y += tsec.o
 COBJS-y += tsi108_eth.o
 COBJS-y += uli526x.o
diff --git a/drivers/net/bcm570x.c b/drivers/net/bcm570x.c
index 5ad31d1..6b28b95 100644
--- a/drivers/net/bcm570x.c
+++ b/drivers/net/bcm570x.c
@@ -6,9 +6,6 @@
 
 #include <common.h>
 
-#if defined(CONFIG_CMD_NET) \
-	&& (!defined(CONFIG_NET_MULTI)) && defined(CONFIG_BCM570x)
-
 #ifdef CONFIG_BMW
 #include <mpc824x.h>
 #endif
@@ -1599,5 +1596,3 @@ PQQ_ENTRY QQ_GetTail (PQQ_CONTAINER pQueue, unsigned int Idx)
 
 	return pQueue->Array[Idx];
 }
-
-#endif
diff --git a/drivers/net/tigon3.c b/drivers/net/tigon3.c
index 5f6a4ec..ab448b0 100644
--- a/drivers/net/tigon3.c
+++ b/drivers/net/tigon3.c
@@ -12,8 +12,7 @@
 /******************************************************************************/
 #include <common.h>
 #include <asm/types.h>
-#if defined(CONFIG_CMD_NET) && !defined(CONFIG_NET_MULTI) && \
-	defined(CONFIG_TIGON3)
+
 #ifdef CONFIG_BMW
 #include <mpc824x.h>
 #endif
@@ -5695,5 +5694,3 @@ LM_DmaTest (PLM_DEVICE_BLOCK pDevice, PLM_UINT8 pBufferVirt,
 	}
 	return LM_STATUS_SUCCESS;
 }
-
-#endif

^ permalink raw reply related	[flat|nested] 20+ messages in thread

* [U-Boot-Users] [PATCH 2/10] net: Conditional COBJS inclusion of Realtek modules
  2008-06-07 16:03 ` [U-Boot-Users] [PATCH 1/10] net: Conditional COBJS inclusion of bcm570x and tigon3 modules Shinya Kuribayashi
@ 2008-06-07 16:04   ` Shinya Kuribayashi
  2008-06-07 16:06     ` [U-Boot-Users] [PATCH 3/10] net: Conditional COBJS inclusion of Intel modules Shinya Kuribayashi
                       ` (2 more replies)
  0 siblings, 3 replies; 20+ messages in thread
From: Shinya Kuribayashi @ 2008-06-07 16:04 UTC (permalink / raw)
  To: u-boot

net: Conditional COBJS inclusion of Realtek modules

From: Shinya Kuribayashi <skuribay@ruby.dti.ne.jp>

Signed-off-by: Shinya Kuribayashi <skuribay@ruby.dti.ne.jp>
---

 drivers/net/Makefile  |    6 +++---
 drivers/net/rtl8019.c |    8 --------
 drivers/net/rtl8139.c |    4 ----
 drivers/net/rtl8169.c |    5 -----
 4 files changed, 3 insertions(+), 20 deletions(-)


diff --git a/drivers/net/Makefile b/drivers/net/Makefile
index 4274f79..6413bb1 100644
--- a/drivers/net/Makefile
+++ b/drivers/net/Makefile
@@ -53,9 +53,9 @@ COBJS-y += ns8382x.o
 COBJS-y += ns9750_eth.o
 COBJS-y += pcnet.o
 COBJS-y += plb2800_eth.o
-COBJS-y += rtl8019.o
-COBJS-y += rtl8139.o
-COBJS-y += rtl8169.o
+COBJS-$(CONFIG_DRIVER_RTL8019) += rtl8019.o
+COBJS-$(CONFIG_RTL8139) += rtl8139.o
+COBJS-$(CONFIG_RTL8169) += rtl8169.o
 COBJS-y += s3c4510b_eth.o
 COBJS-y += smc91111.o
 COBJS-y += smc911x.o
diff --git a/drivers/net/rtl8019.c b/drivers/net/rtl8019.c
index 9d62cab..3ddf917 100644
--- a/drivers/net/rtl8019.c
+++ b/drivers/net/rtl8019.c
@@ -32,10 +32,6 @@
 #include "rtl8019.h"
 #include <net.h>
 
-#ifdef CONFIG_DRIVER_RTL8019
-
-#if defined(CONFIG_CMD_NET)
-
 /* packet page register access functions */
 
 static unsigned char get_reg (unsigned int regno)
@@ -271,7 +267,3 @@ extern int eth_send (volatile void *packet, int length)
 
 	return 0;
 }
-
-#endif /* CONFIG_CMD_NET */
-
-#endif /* CONFIG_DRIVER_RTL8019 */
diff --git a/drivers/net/rtl8139.c b/drivers/net/rtl8139.c
index 097f684..4fd20ac 100644
--- a/drivers/net/rtl8139.c
+++ b/drivers/net/rtl8139.c
@@ -77,9 +77,6 @@
 #include <asm/io.h>
 #include <pci.h>
 
-#if defined(CONFIG_CMD_NET) && defined(CONFIG_NET_MULTI) && \
-	defined(CONFIG_RTL8139)
-
 #define RTL_TIMEOUT	100000
 
 #define ETH_FRAME_LEN		1514
@@ -545,4 +542,3 @@ static void rtl_disable(struct eth_device *dev)
 		udelay (100); /* wait 100us */
 	}
 }
-#endif
diff --git a/drivers/net/rtl8169.c b/drivers/net/rtl8169.c
index 6c4c9ff..7423bc0 100644
--- a/drivers/net/rtl8169.c
+++ b/drivers/net/rtl8169.c
@@ -58,9 +58,6 @@
 #include <asm/io.h>
 #include <pci.h>
 
-#if defined(CONFIG_CMD_NET) && defined(CONFIG_NET_MULTI) && \
-	defined(CONFIG_RTL8169)
-
 #undef DEBUG_RTL8169
 #undef DEBUG_RTL8169_TX
 #undef DEBUG_RTL8169_RX
@@ -887,5 +884,3 @@ int rtl8169_initialize(bd_t *bis)
 	}
 	return card_number;
 }
-
-#endif

^ permalink raw reply related	[flat|nested] 20+ messages in thread

* [U-Boot-Users] [PATCH 3/10] net: Conditional COBJS inclusion of Intel modules
  2008-06-07 16:04   ` [U-Boot-Users] [PATCH 2/10] net: Conditional COBJS inclusion of Realtek modules Shinya Kuribayashi
@ 2008-06-07 16:06     ` Shinya Kuribayashi
  2008-06-07 16:07     ` [U-Boot-Users] [PATCH 4/10] net: Conditional COBJS inclusion of INCA-IP switch Shinya Kuribayashi
  2008-06-07 16:08     ` [U-Boot-Users] [PATCH 5/10] net: Conditional COBJS inclusion of National Semiconductor modules Shinya Kuribayashi
  2 siblings, 0 replies; 20+ messages in thread
From: Shinya Kuribayashi @ 2008-06-07 16:06 UTC (permalink / raw)
  To: u-boot

net: Conditional COBJS inclusion of Intel modules

From: Shinya Kuribayashi <skuribay@ruby.dti.ne.jp>

Signed-off-by: Shinya Kuribayashi <skuribay@ruby.dti.ne.jp>
---

 drivers/net/Makefile   |    4 ++--
 drivers/net/e1000.c    |    5 -----
 drivers/net/eepro100.c |    5 -----
 3 files changed, 2 insertions(+), 12 deletions(-)


diff --git a/drivers/net/Makefile b/drivers/net/Makefile
index 6413bb1..432fc10 100644
--- a/drivers/net/Makefile
+++ b/drivers/net/Makefile
@@ -31,8 +31,8 @@ COBJS-$(CONFIG_BFIN_MAC) += bfin_mac.o
 COBJS-y += cs8900.o
 COBJS-y += dc2114x.o
 COBJS-y += dm9000x.o
-COBJS-y += e1000.o
-COBJS-y += eepro100.o
+COBJS-$(CONFIG_E1000) += e1000.o
+COBJS-$(CONFIG_EEPRO100) += eepro100.o
 COBJS-y += enc28j60.o
 COBJS-y += fsl_mcdmafec.o
 COBJS-$(CONFIG_GRETH) += greth.o
diff --git a/drivers/net/e1000.c b/drivers/net/e1000.c
index c53c226..8f0e7d5 100644
--- a/drivers/net/e1000.c
+++ b/drivers/net/e1000.c
@@ -44,9 +44,6 @@ tested on both gig copper and gig fiber boards
 
 #include "e1000.h"
 
-#if defined(CONFIG_CMD_NET) \
-	&& defined(CONFIG_NET_MULTI) && defined(CONFIG_E1000)
-
 #define TOUT_LOOP   100000
 
 #undef	virt_to_bus
@@ -3059,5 +3056,3 @@ e1000_initialize(bd_t * bis)
 	}
 	return 1;
 }
-
-#endif
diff --git a/drivers/net/eepro100.c b/drivers/net/eepro100.c
index 96ed271..9de0fb5 100644
--- a/drivers/net/eepro100.c
+++ b/drivers/net/eepro100.c
@@ -30,9 +30,6 @@
 
 #undef DEBUG
 
-#if defined(CONFIG_CMD_NET) \
-	&& defined(CONFIG_NET_MULTI) && defined(CONFIG_EEPRO100)
-
 	/* Ethernet chip registers.
 	 */
 #define SCBStatus		0	/* Rx/Command Unit Status *Word* */
@@ -944,5 +941,3 @@ static void read_hw_addr (struct eth_device *dev, bd_t * bis)
 #endif
 	}
 }
-
-#endif

^ permalink raw reply related	[flat|nested] 20+ messages in thread

* [U-Boot-Users] [PATCH 4/10] net: Conditional COBJS inclusion of INCA-IP switch
  2008-06-07 16:04   ` [U-Boot-Users] [PATCH 2/10] net: Conditional COBJS inclusion of Realtek modules Shinya Kuribayashi
  2008-06-07 16:06     ` [U-Boot-Users] [PATCH 3/10] net: Conditional COBJS inclusion of Intel modules Shinya Kuribayashi
@ 2008-06-07 16:07     ` Shinya Kuribayashi
  2008-06-07 16:08     ` [U-Boot-Users] [PATCH 5/10] net: Conditional COBJS inclusion of National Semiconductor modules Shinya Kuribayashi
  2 siblings, 0 replies; 20+ messages in thread
From: Shinya Kuribayashi @ 2008-06-07 16:07 UTC (permalink / raw)
  To: u-boot

net: Conditional COBJS inclusion of INCA-IP switch

From: Shinya Kuribayashi <skuribay@ruby.dti.ne.jp>

Signed-off-by: Shinya Kuribayashi <skuribay@ruby.dti.ne.jp>
---

 drivers/net/Makefile     |    2 +-
 drivers/net/inca-ip_sw.c |    5 -----
 2 files changed, 1 insertions(+), 6 deletions(-)


diff --git a/drivers/net/Makefile b/drivers/net/Makefile
index 432fc10..35c1490 100644
--- a/drivers/net/Makefile
+++ b/drivers/net/Makefile
@@ -36,7 +36,7 @@ COBJS-$(CONFIG_EEPRO100) += eepro100.o
 COBJS-y += enc28j60.o
 COBJS-y += fsl_mcdmafec.o
 COBJS-$(CONFIG_GRETH) += greth.o
-COBJS-y += inca-ip_sw.o
+COBJS-$(CONFIG_INCA_IP_SWITCH) += inca-ip_sw.o
 COBJS-y += ks8695eth.o
 COBJS-y += lan91c96.o
 COBJS-y += macb.o
diff --git a/drivers/net/inca-ip_sw.c b/drivers/net/inca-ip_sw.c
index a079b60..d852a15 100644
--- a/drivers/net/inca-ip_sw.c
+++ b/drivers/net/inca-ip_sw.c
@@ -26,9 +26,6 @@
 
 #include <common.h>
 
-#if defined(CONFIG_CMD_NET) \
-	&& defined(CONFIG_NET_MULTI) && defined(CONFIG_INCA_IP_SWITCH)
-
 #include <malloc.h>
 #include <net.h>
 #include <asm/inca-ip.h>
@@ -813,5 +810,3 @@ Fail:
 	return -1;
 }
 #endif /* CONFIG_INCA_IP_SWITCH_AMDIX */
-
-#endif

^ permalink raw reply related	[flat|nested] 20+ messages in thread

* [U-Boot-Users] [PATCH 5/10] net: Conditional COBJS inclusion of National Semiconductor modules
  2008-06-07 16:04   ` [U-Boot-Users] [PATCH 2/10] net: Conditional COBJS inclusion of Realtek modules Shinya Kuribayashi
  2008-06-07 16:06     ` [U-Boot-Users] [PATCH 3/10] net: Conditional COBJS inclusion of Intel modules Shinya Kuribayashi
  2008-06-07 16:07     ` [U-Boot-Users] [PATCH 4/10] net: Conditional COBJS inclusion of INCA-IP switch Shinya Kuribayashi
@ 2008-06-07 16:08     ` Shinya Kuribayashi
  2008-06-07 16:10       ` [U-Boot-Users] [PATCH 6/10] net: Conditional COBJS inclusion of NET+ARM modules Shinya Kuribayashi
  2 siblings, 1 reply; 20+ messages in thread
From: Shinya Kuribayashi @ 2008-06-07 16:08 UTC (permalink / raw)
  To: u-boot

net: Conditional COBJS inclusion of National Semiconductor modules

From: Shinya Kuribayashi <skuribay@ruby.dti.ne.jp>

Signed-off-by: Shinya Kuribayashi <skuribay@ruby.dti.ne.jp>
---

 drivers/net/Makefile  |    4 ++--
 drivers/net/natsemi.c |    5 -----
 drivers/net/ns8382x.c |    5 -----
 3 files changed, 2 insertions(+), 12 deletions(-)


diff --git a/drivers/net/Makefile b/drivers/net/Makefile
index 35c1490..57c31cb 100644
--- a/drivers/net/Makefile
+++ b/drivers/net/Makefile
@@ -41,7 +41,7 @@ COBJS-y += ks8695eth.o
 COBJS-y += lan91c96.o
 COBJS-y += macb.o
 COBJS-y += mcffec.o
-COBJS-y += natsemi.o
+COBJS-$(CONFIG_NATSEMI) += natsemi.o
 ifeq ($(CONFIG_DRIVER_NE2000),y)
 COBJS-y += ne2000.o
 COBJS-$(CONFIG_DRIVER_AX88796L) += ax88796.o
@@ -49,7 +49,7 @@ endif
 COBJS-y += netarm_eth.o
 COBJS-y += netconsole.o
 COBJS-y += ns7520_eth.o
-COBJS-y += ns8382x.o
+COBJS-$(CONFIG_NS8382X) += ns8382x.o
 COBJS-y += ns9750_eth.o
 COBJS-y += pcnet.o
 COBJS-y += plb2800_eth.o
diff --git a/drivers/net/natsemi.c b/drivers/net/natsemi.c
index a523959..4aee048 100644
--- a/drivers/net/natsemi.c
+++ b/drivers/net/natsemi.c
@@ -56,9 +56,6 @@
 #include <asm/io.h>
 #include <pci.h>
 
-#if defined(CONFIG_CMD_NET) \
-	&& defined(CONFIG_NET_MULTI) && defined(CONFIG_NATSEMI)
-
 /* defines */
 #define EEPROM_SIZE 0xb /*12 16-bit chunks, or 24 bytes*/
 
@@ -878,5 +875,3 @@ natsemi_disable(struct eth_device *dev)
 	/* Restore PME enable bit */
 	OUTL(dev, SavedClkRun, ClkRun);
 }
-
-#endif
diff --git a/drivers/net/ns8382x.c b/drivers/net/ns8382x.c
index c807dd4..0b9a3ae 100644
--- a/drivers/net/ns8382x.c
+++ b/drivers/net/ns8382x.c
@@ -56,9 +56,6 @@
 #include <asm/io.h>
 #include <pci.h>
 
-#if defined(CONFIG_CMD_NET) \
-	&& defined(CONFIG_NET_MULTI) && defined(CONFIG_NS8382X)
-
 /* defines */
 #define DSIZE     0x00000FFF
 #define ETH_ALEN		6
@@ -859,5 +856,3 @@ ns8382x_disable(struct eth_device *dev)
 	/* Restore PME enable bit */
 	OUTL(dev, SavedClkRun, ClkRun);
 }
-
-#endif

^ permalink raw reply related	[flat|nested] 20+ messages in thread

* [U-Boot-Users] [PATCH 6/10] net: Conditional COBJS inclusion of NET+ARM modules
  2008-06-07 16:08     ` [U-Boot-Users] [PATCH 5/10] net: Conditional COBJS inclusion of National Semiconductor modules Shinya Kuribayashi
@ 2008-06-07 16:10       ` Shinya Kuribayashi
  2008-06-07 16:11         ` [U-Boot-Users] [PATCH 7/10] net: Conditional COBJS inclusion of TSEC and Vitesse modules Shinya Kuribayashi
  0 siblings, 1 reply; 20+ messages in thread
From: Shinya Kuribayashi @ 2008-06-07 16:10 UTC (permalink / raw)
  To: u-boot

net: Conditional COBJS inclusion of NET+ARM modules

From: Shinya Kuribayashi <skuribay@ruby.dti.ne.jp>

Signed-off-by: Shinya Kuribayashi <skuribay@ruby.dti.ne.jp>
---

 drivers/net/Makefile     |    6 +++---
 drivers/net/netarm_eth.c |    4 ----
 drivers/net/ns7520_eth.c |    5 -----
 drivers/net/ns9750_eth.c |    4 ----
 4 files changed, 3 insertions(+), 16 deletions(-)


diff --git a/drivers/net/Makefile b/drivers/net/Makefile
index 57c31cb..70a6dde 100644
--- a/drivers/net/Makefile
+++ b/drivers/net/Makefile
@@ -46,11 +46,11 @@ ifeq ($(CONFIG_DRIVER_NE2000),y)
 COBJS-y += ne2000.o
 COBJS-$(CONFIG_DRIVER_AX88796L) += ax88796.o
 endif
-COBJS-y += netarm_eth.o
+COBJS-$(CONFIG_DRIVER_NETARMETH) += netarm_eth.o
 COBJS-y += netconsole.o
-COBJS-y += ns7520_eth.o
+COBJS-$(CONFIG_DRIVER_NS7520_ETHERNET) += ns7520_eth.o
 COBJS-$(CONFIG_NS8382X) += ns8382x.o
-COBJS-y += ns9750_eth.o
+COBJS-$(CONFIG_DRIVER_NS9750_ETHERNET) += ns9750_eth.o
 COBJS-y += pcnet.o
 COBJS-y += plb2800_eth.o
 COBJS-$(CONFIG_DRIVER_RTL8019) += rtl8019.o
diff --git a/drivers/net/netarm_eth.c b/drivers/net/netarm_eth.c
index ecf45dc..6b635bb 100644
--- a/drivers/net/netarm_eth.c
+++ b/drivers/net/netarm_eth.c
@@ -22,8 +22,6 @@
 
 
 #include <common.h>
-
-#ifdef CONFIG_DRIVER_NETARMETH
 #include <command.h>
 #include <net.h>
 #include "netarm_eth.h"
@@ -354,5 +352,3 @@ extern int eth_send (volatile void *packet, int length)
 }
 
 #endif /* CONFIG_CMD_NET */
-
-#endif /* CONFIG_DRIVER_NETARMETH */
diff --git a/drivers/net/ns7520_eth.c b/drivers/net/ns7520_eth.c
index a5a20df..37411df 100644
--- a/drivers/net/ns7520_eth.c
+++ b/drivers/net/ns7520_eth.c
@@ -15,8 +15,6 @@
 
 #include <common.h>
 
-#if defined(CONFIG_DRIVER_NS7520_ETHERNET)
-
 #include <net.h>		/* NetSendPacket */
 #include <asm/arch/netarm_registers.h>
 #include <asm/arch/netarm_dma_module.h>
@@ -846,14 +844,11 @@ extern int ns7520_miiphy_write(char *devname, unsigned char const addr,
 	return (ret);
 }
 #endif				/* defined(CONFIG_MII) */
-#endif				/* CONFIG_DRIVER_NS7520_ETHERNET */
 
 int ns7520_miiphy_initialize(bd_t *bis)
 {
-#if defined(CONFIG_DRIVER_NS7520_ETHERNET)
 #if defined(CONFIG_MII)
 	miiphy_register("ns7520phy", ns7520_miiphy_read, ns7520_miiphy_write);
 #endif
-#endif
 	return 0;
 }
diff --git a/drivers/net/ns9750_eth.c b/drivers/net/ns9750_eth.c
index 067ff8e..0559710 100644
--- a/drivers/net/ns9750_eth.c
+++ b/drivers/net/ns9750_eth.c
@@ -37,8 +37,6 @@
 
 #include "ns9750_eth.h"		/* for Ethernet and PHY */
 
-#ifdef CONFIG_DRIVER_NS9750_ETHERNET
-
 /* some definition to make transistion to linux easier */
 
 #define NS9750_DRIVER_NAME	"eth"
@@ -793,5 +791,3 @@ static unsigned int ns9750_mii_poll_busy (void)
 
 	return unTimeout;
 }
-
-#endif /* CONFIG_DRIVER_NS9750_ETHERNET */

^ permalink raw reply related	[flat|nested] 20+ messages in thread

* [U-Boot-Users] [PATCH 7/10] net: Conditional COBJS inclusion of TSEC and Vitesse modules
  2008-06-07 16:10       ` [U-Boot-Users] [PATCH 6/10] net: Conditional COBJS inclusion of NET+ARM modules Shinya Kuribayashi
@ 2008-06-07 16:11         ` Shinya Kuribayashi
  2008-06-07 16:12           ` [U-Boot-Users] [PATCH 8/10] net: Conditional COBJS inclusion of SMC modules Shinya Kuribayashi
  0 siblings, 1 reply; 20+ messages in thread
From: Shinya Kuribayashi @ 2008-06-07 16:11 UTC (permalink / raw)
  To: u-boot

net: Conditional COBJS inclusion of TSEC and Vitesse modules

From: Shinya Kuribayashi <skuribay@ruby.dti.ne.jp>

Signed-off-by: Shinya Kuribayashi <skuribay@ruby.dti.ne.jp>
---

 drivers/net/Makefile  |    4 ++--
 drivers/net/tsec.c    |    3 ---
 drivers/net/vsc7385.c |    5 -----
 3 files changed, 2 insertions(+), 10 deletions(-)


diff --git a/drivers/net/Makefile b/drivers/net/Makefile
index 70a6dde..3370aa4 100644
--- a/drivers/net/Makefile
+++ b/drivers/net/Makefile
@@ -60,10 +60,10 @@ COBJS-y += s3c4510b_eth.o
 COBJS-y += smc91111.o
 COBJS-y += smc911x.o
 COBJS-$(CONFIG_TIGON3) += tigon3.o bcm570x_autoneg.o 5701rls.o
-COBJS-y += tsec.o
+COBJS-$(CONFIG_TSEC_ENET) += tsec.o
 COBJS-y += tsi108_eth.o
 COBJS-y += uli526x.o
-COBJS-y += vsc7385.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/tsec.c b/drivers/net/tsec.c
index c7af930..9d20918 100644
--- a/drivers/net/tsec.c
+++ b/drivers/net/tsec.c
@@ -17,7 +17,6 @@
 #include <net.h>
 #include <command.h>
 
-#if defined(CONFIG_TSEC_ENET)
 #include "tsec.h"
 #include "miiphy.h"
 
@@ -1710,5 +1709,3 @@ tsec_mcast_addr (struct eth_device *dev, u8 mcast_mac, u8 set)
 	return 0;
 }
 #endif /* Multicast TFTP ? */
-
-#endif /* CONFIG_TSEC_ENET */
diff --git a/drivers/net/vsc7385.c b/drivers/net/vsc7385.c
index 4095bce..4e7259f 100644
--- a/drivers/net/vsc7385.c
+++ b/drivers/net/vsc7385.c
@@ -13,9 +13,6 @@
  */
 
 #include <config.h>
-
-#ifdef CONFIG_VSC7385_ENET
-
 #include <common.h>
 #include <asm/io.h>
 #include <asm/errno.h>
@@ -97,5 +94,3 @@ int vsc7385_upload_firmware(void *firmware, unsigned int size)
 
 	return 0;
 }
-
-#endif

^ permalink raw reply related	[flat|nested] 20+ messages in thread

* [U-Boot-Users] [PATCH 8/10] net: Conditional COBJS inclusion of SMC modules
  2008-06-07 16:11         ` [U-Boot-Users] [PATCH 7/10] net: Conditional COBJS inclusion of TSEC and Vitesse modules Shinya Kuribayashi
@ 2008-06-07 16:12           ` Shinya Kuribayashi
  2008-06-07 16:14             ` [U-Boot-Users] [PATCH 9/10] net: Conditional COBJS inclusion of Freescale FEC modules Shinya Kuribayashi
  0 siblings, 1 reply; 20+ messages in thread
From: Shinya Kuribayashi @ 2008-06-07 16:12 UTC (permalink / raw)
  To: u-boot

net: Conditional COBJS inclusion of SMC modules

From: Shinya Kuribayashi <skuribay@ruby.dti.ne.jp>

Signed-off-by: Shinya Kuribayashi <skuribay@ruby.dti.ne.jp>
---

 drivers/net/Makefile   |    6 +++---
 drivers/net/lan91c96.c |    9 ---------
 drivers/net/smc91111.c |    3 ---
 drivers/net/smc911x.c  |    5 -----
 4 files changed, 3 insertions(+), 20 deletions(-)


diff --git a/drivers/net/Makefile b/drivers/net/Makefile
index 3370aa4..dc68f3e 100644
--- a/drivers/net/Makefile
+++ b/drivers/net/Makefile
@@ -38,7 +38,7 @@ COBJS-y += fsl_mcdmafec.o
 COBJS-$(CONFIG_GRETH) += greth.o
 COBJS-$(CONFIG_INCA_IP_SWITCH) += inca-ip_sw.o
 COBJS-y += ks8695eth.o
-COBJS-y += lan91c96.o
+COBJS-$(CONFIG_DRIVER_LAN91C96) += lan91c96.o
 COBJS-y += macb.o
 COBJS-y += mcffec.o
 COBJS-$(CONFIG_NATSEMI) += natsemi.o
@@ -57,8 +57,8 @@ COBJS-$(CONFIG_DRIVER_RTL8019) += rtl8019.o
 COBJS-$(CONFIG_RTL8139) += rtl8139.o
 COBJS-$(CONFIG_RTL8169) += rtl8169.o
 COBJS-y += s3c4510b_eth.o
-COBJS-y += smc91111.o
-COBJS-y += smc911x.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
diff --git a/drivers/net/lan91c96.c b/drivers/net/lan91c96.c
index 51cfb7e..c23a400 100644
--- a/drivers/net/lan91c96.c
+++ b/drivers/net/lan91c96.c
@@ -63,10 +63,6 @@
 #include "lan91c96.h"
 #include <net.h>
 
-#ifdef CONFIG_DRIVER_LAN91C96
-
-#if defined(CONFIG_CMD_NET)
-
 /*------------------------------------------------------------------------
  *
  * Configuration options, for the experienced user to change.
@@ -865,9 +861,6 @@ static int smc_hw_init ()
 }
 #endif /* 0 */
 
-#endif /* CONFIG_CMD_NET */
-
-
 /* smc_get_ethaddr (bd_t * bd)
  *
  * This checks both the environment and the ROM for an ethernet address. If
@@ -963,5 +956,3 @@ int get_rom_mac (unsigned char *v_rom_mac)
 	return (1);
 #endif
 }
-
-#endif /* CONFIG_DRIVER_LAN91C96 */
diff --git a/drivers/net/smc91111.c b/drivers/net/smc91111.c
index 8061f12..e8b235b 100644
--- a/drivers/net/smc91111.c
+++ b/drivers/net/smc91111.c
@@ -65,8 +65,6 @@
 #include "smc91111.h"
 #include <net.h>
 
-#ifdef CONFIG_DRIVER_SMC91111
-
 /* Use power-down feature of the chip */
 #define POWER_DOWN	0
 
@@ -1620,4 +1618,3 @@ int get_rom_mac (uchar *v_rom_mac)
 	return (valid_mac ? 1 : 0);
 #endif
 }
-#endif /* CONFIG_DRIVER_SMC91111 */
diff --git a/drivers/net/smc911x.c b/drivers/net/smc911x.c
index 5302cb5..8e141d4 100644
--- a/drivers/net/smc911x.c
+++ b/drivers/net/smc911x.c
@@ -23,9 +23,6 @@
  */
 
 #include <common.h>
-
-#ifdef CONFIG_DRIVER_SMC911X
-
 #include <command.h>
 #include <net.h>
 #include <miiphy.h>
@@ -682,5 +679,3 @@ int eth_rx(void)
 
 	return 0;
 }
-
-#endif				/* CONFIG_DRIVER_SMC911X */

^ permalink raw reply related	[flat|nested] 20+ messages in thread

* [U-Boot-Users] [PATCH 9/10] net: Conditional COBJS inclusion of Freescale FEC modules
  2008-06-07 16:12           ` [U-Boot-Users] [PATCH 8/10] net: Conditional COBJS inclusion of SMC modules Shinya Kuribayashi
@ 2008-06-07 16:14             ` Shinya Kuribayashi
  2008-06-07 16:16               ` [U-Boot-Users] [PATCH 10/10] net: Conditional COBJS inclusino of remainings Shinya Kuribayashi
  0 siblings, 1 reply; 20+ messages in thread
From: Shinya Kuribayashi @ 2008-06-07 16:14 UTC (permalink / raw)
  To: u-boot

net: Conditional COBJS inclusion of Freescale FEC modules

From: Shinya Kuribayashi <skuribay@ruby.dti.ne.jp>

Signed-off-by: Shinya Kuribayashi <skuribay@ruby.dti.ne.jp>
---

 drivers/net/Makefile       |    4 ++--
 drivers/net/fsl_mcdmafec.c |    2 --
 drivers/net/mcffec.c       |    3 ---
 3 files changed, 2 insertions(+), 7 deletions(-)


diff --git a/drivers/net/Makefile b/drivers/net/Makefile
index dc68f3e..ca30952 100644
--- a/drivers/net/Makefile
+++ b/drivers/net/Makefile
@@ -34,13 +34,13 @@ COBJS-y += dm9000x.o
 COBJS-$(CONFIG_E1000) += e1000.o
 COBJS-$(CONFIG_EEPRO100) += eepro100.o
 COBJS-y += enc28j60.o
-COBJS-y += fsl_mcdmafec.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_LAN91C96) += lan91c96.o
 COBJS-y += macb.o
-COBJS-y += mcffec.o
+COBJS-$(CONFIG_MCFFEC) += mcffec.o
 COBJS-$(CONFIG_NATSEMI) += natsemi.o
 ifeq ($(CONFIG_DRIVER_NE2000),y)
 COBJS-y += ne2000.o
diff --git a/drivers/net/fsl_mcdmafec.c b/drivers/net/fsl_mcdmafec.c
index 2ef91f2..b9602e1 100644
--- a/drivers/net/fsl_mcdmafec.c
+++ b/drivers/net/fsl_mcdmafec.c
@@ -31,7 +31,6 @@
 #include <net.h>
 #include <miiphy.h>
 
-#ifdef CONFIG_FSLDMAFEC
 #undef	ET_DEBUG
 #undef	MII_DEBUG
 
@@ -588,4 +587,3 @@ int mcdmafec_initialize(bd_t * bis)
 }
 
 #endif				/* CONFIG_CMD_NET && CONFIG_NET_MULTI */
-#endif				/* CONFIG_FSLDMAFEC */
diff --git a/drivers/net/mcffec.c b/drivers/net/mcffec.c
index 5ab4726..72743f1 100644
--- a/drivers/net/mcffec.c
+++ b/drivers/net/mcffec.c
@@ -27,8 +27,6 @@
 #include <common.h>
 #include <malloc.h>
 
-#ifdef CONFIG_MCFFEC
-
 #include <asm/fec.h>
 #include <asm/immap.h>
 
@@ -601,4 +599,3 @@ int mcffec_initialize(bd_t * bis)
 }
 
 #endif				/* CONFIG_CMD_NET, FEC_ENET & NET_MULTI */
-#endif				/* CONFIG_MCFFEC */

^ permalink raw reply related	[flat|nested] 20+ messages in thread

* [U-Boot-Users] [PATCH 10/10] net: Conditional COBJS inclusino of remainings
  2008-06-07 16:14             ` [U-Boot-Users] [PATCH 9/10] net: Conditional COBJS inclusion of Freescale FEC modules Shinya Kuribayashi
@ 2008-06-07 16:16               ` Shinya Kuribayashi
  2008-06-09 13:19                 ` Ben Warren
  0 siblings, 1 reply; 20+ messages in thread
From: Shinya Kuribayashi @ 2008-06-07 16:16 UTC (permalink / raw)
  To: u-boot

net: Conditional COBJS inclusino of remainings

From: Shinya Kuribayashi <skuribay@ruby.dti.ne.jp>

Signed-off-by: Shinya Kuribayashi <skuribay@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

^ permalink raw reply related	[flat|nested] 20+ messages in thread

* [U-Boot-Users] [PATCH 10/10] net: Conditional COBJS inclusino of remainings
  2008-06-07 16:16               ` [U-Boot-Users] [PATCH 10/10] net: Conditional COBJS inclusino of remainings Shinya Kuribayashi
@ 2008-06-09 13:19                 ` Ben Warren
  2008-06-09 13:43                   ` Shinya Kuribayashi
  0 siblings, 1 reply; 20+ messages in thread
From: Ben Warren @ 2008-06-09 13:19 UTC (permalink / raw)
  To: u-boot

Hi Shinya,

On Sat, Jun 7, 2008 at 9:16 AM, Shinya Kuribayashi
<skuribay@ruby.dti.ne.jp> wrote:
> net: Conditional COBJS inclusino of remainings
>

s/inclusino/inclusion/
"remainings" isn't a word.  Please use something like "remaining
Ethernet controllers"

> From: Shinya Kuribayashi <skuribay@ruby.dti.ne.jp>
>
> Signed-off-by: Shinya Kuribayashi <skuribay@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"
>

This patch no longer applies due to other changes to the DM9000
driver.  Please re-base against the net repo and resubmit.
<snip>

thanks for doing all this Makefile fixing!  It's been on my to-do list
but you got there first.  All others apply cleanly, BTW.

regards,
Ben

^ permalink raw reply	[flat|nested] 20+ messages in thread

* [U-Boot-Users] [PATCH 10/10] net: Conditional COBJS inclusino of remainings
  2008-06-09 13:19                 ` Ben Warren
@ 2008-06-09 13:43                   ` Shinya Kuribayashi
  0 siblings, 0 replies; 20+ messages in thread
From: Shinya Kuribayashi @ 2008-06-09 13:43 UTC (permalink / raw)
  To: u-boot

Ben Warren wrote:
>> 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"
>>
> 
> This patch no longer applies due to other changes to the DM9000
> driver.  Please re-base against the net repo and resubmit.
> <snip>

Ok.

> thanks for doing all this Makefile fixing!  It's been on my to-do list
> but you got there first.  All others apply cleanly, BTW.

These patches were just for the review, not for git-am. I'll revised
and submit all-in-one patch soon.


  Shinya

^ permalink raw reply	[flat|nested] 20+ messages in thread

* [U-Boot-Users] [PATCH v2] net: Conditional COBJS inclusion of network drivers
  2008-06-07 16:01 [U-Boot-Users] drivers/net/Makefile: Conditional COBJS inclusion cleanups Shinya Kuribayashi
  2008-06-07 16:03 ` [U-Boot-Users] [PATCH 1/10] net: Conditional COBJS inclusion of bcm570x and tigon3 modules Shinya Kuribayashi
@ 2008-06-09 14:37 ` Shinya Kuribayashi
  2008-07-05 22:32   ` Wolfgang Denk
  1 sibling, 1 reply; 20+ messages in thread
From: Shinya Kuribayashi @ 2008-06-09 14:37 UTC (permalink / raw)
  To: u-boot

Replace COBJS-y with appropriate driver config names.

Signed-off-by: Shinya Kuribayashi <skuribay@ruby.dti.ne.jp>
---

Changes v2:

 * Kill more CONFIG_CMD_NET and CONFIG_NET_MULTI defines from
   - fsl_mcdmafec.c
   - mcffec.c
   - netarm_eth.c

 * Revised DM9000 part against the net repo.

 drivers/net/3c589.c        |    5 ---
 drivers/net/Makefile       |   66 ++++++++++++++++++++++----------------------
 drivers/net/bcm570x.c      |    5 ---
 drivers/net/cs8900.c       |    8 -----
 drivers/net/dc2114x.c      |    6 ----
 drivers/net/dm9000x.c      |    3 --
 drivers/net/e1000.c        |    5 ---
 drivers/net/eepro100.c     |    5 ---
 drivers/net/enc28j60.c     |    3 --
 drivers/net/fsl_mcdmafec.c |    5 ---
 drivers/net/inca-ip_sw.c   |    5 ---
 drivers/net/ks8695eth.c    |    4 ---
 drivers/net/lan91c96.c     |    9 ------
 drivers/net/macb.c         |    5 ---
 drivers/net/mcffec.c       |    7 -----
 drivers/net/natsemi.c      |    5 ---
 drivers/net/netarm_eth.c   |    8 -----
 drivers/net/netconsole.c   |    5 ---
 drivers/net/ns7520_eth.c   |    5 ---
 drivers/net/ns8382x.c      |    5 ---
 drivers/net/ns9750_eth.c   |    4 ---
 drivers/net/pcnet.c        |    4 ---
 drivers/net/plb2800_eth.c  |    6 ----
 drivers/net/rtl8019.c      |    8 -----
 drivers/net/rtl8139.c      |    4 ---
 drivers/net/rtl8169.c      |    5 ---
 drivers/net/s3c4510b_eth.c |    5 ---
 drivers/net/smc91111.c     |    3 --
 drivers/net/smc911x.c      |    5 ---
 drivers/net/tigon3.c       |    5 +--
 drivers/net/tsec.c         |    3 --
 drivers/net/tsi108_eth.c   |    5 ---
 drivers/net/uli526x.c      |    4 ---
 drivers/net/vsc7385.c      |    5 ---
 34 files changed, 34 insertions(+), 201 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 5b031c9..84be288 100644
--- a/drivers/net/Makefile
+++ b/drivers/net/Makefile
@@ -25,45 +25,45 @@ include $(TOPDIR)/config.mk
 
 LIB	:= $(obj)libnet.a
 
-COBJS-y += 3c589.o
-COBJS-y += bcm570x.o bcm570x_autoneg.o 5701rls.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-y += e1000.o
-COBJS-y += eepro100.o
-COBJS-y += enc28j60.o
-COBJS-y += fsl_mcdmafec.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-$(CONFIG_ENC28J60) += enc28j60.o
+COBJS-$(CONFIG_FSLDMAFEC) += fsl_mcdmafec.o
 COBJS-$(CONFIG_GRETH) += greth.o
-COBJS-y += inca-ip_sw.o
-COBJS-y += ks8695eth.o
-COBJS-y += lan91c96.o
-COBJS-y += macb.o
-COBJS-y += mcffec.o
-COBJS-y += natsemi.o
+COBJS-$(CONFIG_INCA_IP_SWITCH) += inca-ip_sw.o
+COBJS-$(CONFIG_DRIVER_KS8695ETH) += ks8695eth.o
+COBJS-$(CONFIG_DRIVER_LAN91C96) += lan91c96.o
+COBJS-$(CONFIG_MACB) += macb.o
+COBJS-$(CONFIG_MCFFEC) += mcffec.o
+COBJS-$(CONFIG_NATSEMI) += natsemi.o
 ifeq ($(CONFIG_DRIVER_NE2000),y)
 COBJS-y += ne2000.o
 COBJS-$(CONFIG_DRIVER_AX88796L) += ax88796.o
 endif
-COBJS-y += netarm_eth.o
-COBJS-y += netconsole.o
-COBJS-y += ns7520_eth.o
-COBJS-y += ns8382x.o
-COBJS-y += ns9750_eth.o
-COBJS-y += pcnet.o
-COBJS-y += plb2800_eth.o
-COBJS-y += rtl8019.o
-COBJS-y += rtl8139.o
-COBJS-y += rtl8169.o
-COBJS-y += s3c4510b_eth.o
-COBJS-y += smc91111.o
-COBJS-y += smc911x.o
-COBJS-y += tigon3.o
-COBJS-y += tsec.o
-COBJS-y += tsi108_eth.o
-COBJS-y += uli526x.o
-COBJS-y += vsc7385.o
+COBJS-$(CONFIG_DRIVER_NETARMETH) += netarm_eth.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-$(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-$(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-$(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/bcm570x.c b/drivers/net/bcm570x.c
index 5ad31d1..6b28b95 100644
--- a/drivers/net/bcm570x.c
+++ b/drivers/net/bcm570x.c
@@ -6,9 +6,6 @@
 
 #include <common.h>
 
-#if defined(CONFIG_CMD_NET) \
-	&& (!defined(CONFIG_NET_MULTI)) && defined(CONFIG_BCM570x)
-
 #ifdef CONFIG_BMW
 #include <mpc824x.h>
 #endif
@@ -1599,5 +1596,3 @@ PQQ_ENTRY QQ_GetTail (PQQ_CONTAINER pQueue, unsigned int Idx)
 
 	return pQueue->Array[Idx];
 }
-
-#endif
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 c2144d9..90fc852 100644
--- a/drivers/net/dm9000x.c
+++ b/drivers/net/dm9000x.c
@@ -64,8 +64,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 ---------------- */
@@ -758,4 +756,3 @@ phy_write(int reg, u16 value)
 	DM9000_iow(DM9000_EPCR, 0x0);	/* Clear phyxcer write command */
 	DM9000_DBG("phy_write(reg:0x%x, value:0x%x)\n", reg, value);
 }
-#endif	/* CONFIG_DRIVER_DM9000 */
diff --git a/drivers/net/e1000.c b/drivers/net/e1000.c
index 40a781f..c31029a 100644
--- a/drivers/net/e1000.c
+++ b/drivers/net/e1000.c
@@ -44,9 +44,6 @@ tested on both gig copper and gig fiber boards
 
 #include "e1000.h"
 
-#if defined(CONFIG_CMD_NET) \
-	&& defined(CONFIG_NET_MULTI) && defined(CONFIG_E1000)
-
 #define TOUT_LOOP   100000
 
 #undef	virt_to_bus
@@ -3061,5 +3058,3 @@ e1000_initialize(bd_t * bis)
 	}
 	return 1;
 }
-
-#endif
diff --git a/drivers/net/eepro100.c b/drivers/net/eepro100.c
index 96ed271..9de0fb5 100644
--- a/drivers/net/eepro100.c
+++ b/drivers/net/eepro100.c
@@ -30,9 +30,6 @@
 
 #undef DEBUG
 
-#if defined(CONFIG_CMD_NET) \
-	&& defined(CONFIG_NET_MULTI) && defined(CONFIG_EEPRO100)
-
 	/* Ethernet chip registers.
 	 */
 #define SCBStatus		0	/* Rx/Command Unit Status *Word* */
@@ -944,5 +941,3 @@ static void read_hw_addr (struct eth_device *dev, bd_t * bis)
 #endif
 	}
 }
-
-#endif
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/fsl_mcdmafec.c b/drivers/net/fsl_mcdmafec.c
index 2ef91f2..f2bdba6 100644
--- a/drivers/net/fsl_mcdmafec.c
+++ b/drivers/net/fsl_mcdmafec.c
@@ -31,7 +31,6 @@
 #include <net.h>
 #include <miiphy.h>
 
-#ifdef CONFIG_FSLDMAFEC
 #undef	ET_DEBUG
 #undef	MII_DEBUG
 
@@ -49,7 +48,6 @@
 #define BD_ENET_RX_ERR	(BD_ENET_RX_LG | BD_ENET_RX_NO | BD_ENET_RX_CR | \
 			 BD_ENET_RX_OV | BD_ENET_RX_TR)
 
-#if defined(CONFIG_CMD_NET) && defined(CONFIG_NET_MULTI)
 #include <asm/immap.h>
 #include <asm/fsl_mcdmafec.h>
 
@@ -586,6 +584,3 @@ int mcdmafec_initialize(bd_t * bis)
 
 	return 1;
 }
-
-#endif				/* CONFIG_CMD_NET && CONFIG_NET_MULTI */
-#endif				/* CONFIG_FSLDMAFEC */
diff --git a/drivers/net/inca-ip_sw.c b/drivers/net/inca-ip_sw.c
index e4aaed6..ffdd1f3 100644
--- a/drivers/net/inca-ip_sw.c
+++ b/drivers/net/inca-ip_sw.c
@@ -26,9 +26,6 @@
 
 #include <common.h>
 
-#if defined(CONFIG_CMD_NET) \
-	&& defined(CONFIG_NET_MULTI) && defined(CONFIG_INCA_IP_SWITCH)
-
 #include <malloc.h>
 #include <net.h>
 #include <asm/inca-ip.h>
@@ -813,5 +810,3 @@ Fail:
 	return -1;
 }
 #endif /* CONFIG_INCA_IP_SWITCH_AMDIX */
-
-#endif
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/lan91c96.c b/drivers/net/lan91c96.c
index 51cfb7e..c23a400 100644
--- a/drivers/net/lan91c96.c
+++ b/drivers/net/lan91c96.c
@@ -63,10 +63,6 @@
 #include "lan91c96.h"
 #include <net.h>
 
-#ifdef CONFIG_DRIVER_LAN91C96
-
-#if defined(CONFIG_CMD_NET)
-
 /*------------------------------------------------------------------------
  *
  * Configuration options, for the experienced user to change.
@@ -865,9 +861,6 @@ static int smc_hw_init ()
 }
 #endif /* 0 */
 
-#endif /* CONFIG_CMD_NET */
-
-
 /* smc_get_ethaddr (bd_t * bd)
  *
  * This checks both the environment and the ROM for an ethernet address. If
@@ -963,5 +956,3 @@ int get_rom_mac (unsigned char *v_rom_mac)
 	return (1);
 #endif
 }
-
-#endif /* CONFIG_DRIVER_LAN91C96 */
diff --git a/drivers/net/macb.c b/drivers/net/macb.c
index 703784e..90142c3 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
@@ -591,5 +588,3 @@ int miiphy_write(unsigned char addr, unsigned char reg, unsigned short value)
 }
 
 #endif
-
-#endif /* CONFIG_MACB */
diff --git a/drivers/net/mcffec.c b/drivers/net/mcffec.c
index 8d4e248..58ed5e3 100644
--- a/drivers/net/mcffec.c
+++ b/drivers/net/mcffec.c
@@ -27,8 +27,6 @@
 #include <common.h>
 #include <malloc.h>
 
-#ifdef CONFIG_MCFFEC
-
 #include <asm/fec.h>
 #include <asm/immap.h>
 
@@ -51,8 +49,6 @@
 
 DECLARE_GLOBAL_DATA_PTR;
 
-#if defined(CONFIG_CMD_NET) && defined(CONFIG_NET_MULTI)
-
 struct fec_info_s fec_info[] = {
 #ifdef CFG_FEC0_IOBASE
 	{
@@ -605,6 +601,3 @@ int mcffec_initialize(bd_t * bis)
 
 	return 1;
 }
-
-#endif				/* CONFIG_CMD_NET, FEC_ENET & NET_MULTI */
-#endif				/* CONFIG_MCFFEC */
diff --git a/drivers/net/natsemi.c b/drivers/net/natsemi.c
index a523959..4aee048 100644
--- a/drivers/net/natsemi.c
+++ b/drivers/net/natsemi.c
@@ -56,9 +56,6 @@
 #include <asm/io.h>
 #include <pci.h>
 
-#if defined(CONFIG_CMD_NET) \
-	&& defined(CONFIG_NET_MULTI) && defined(CONFIG_NATSEMI)
-
 /* defines */
 #define EEPROM_SIZE 0xb /*12 16-bit chunks, or 24 bytes*/
 
@@ -878,5 +875,3 @@ natsemi_disable(struct eth_device *dev)
 	/* Restore PME enable bit */
 	OUTL(dev, SavedClkRun, ClkRun);
 }
-
-#endif
diff --git a/drivers/net/netarm_eth.c b/drivers/net/netarm_eth.c
index ecf45dc..c011809 100644
--- a/drivers/net/netarm_eth.c
+++ b/drivers/net/netarm_eth.c
@@ -22,15 +22,11 @@
 
 
 #include <common.h>
-
-#ifdef CONFIG_DRIVER_NETARMETH
 #include <command.h>
 #include <net.h>
 #include "netarm_eth.h"
 #include <asm/arch/netarm_registers.h>
 
-#if defined(CONFIG_CMD_NET)
-
 static int na_mii_poll_busy (void);
 
 static void na_get_mac_addr (void)
@@ -352,7 +348,3 @@ extern int eth_send (volatile void *packet, int length)
 	printf ("eth_send timeout\n");
 	return 1;
 }
-
-#endif /* CONFIG_CMD_NET */
-
-#endif /* CONFIG_DRIVER_NETARMETH */
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/ns7520_eth.c b/drivers/net/ns7520_eth.c
index a5a20df..37411df 100644
--- a/drivers/net/ns7520_eth.c
+++ b/drivers/net/ns7520_eth.c
@@ -15,8 +15,6 @@
 
 #include <common.h>
 
-#if defined(CONFIG_DRIVER_NS7520_ETHERNET)
-
 #include <net.h>		/* NetSendPacket */
 #include <asm/arch/netarm_registers.h>
 #include <asm/arch/netarm_dma_module.h>
@@ -846,14 +844,11 @@ extern int ns7520_miiphy_write(char *devname, unsigned char const addr,
 	return (ret);
 }
 #endif				/* defined(CONFIG_MII) */
-#endif				/* CONFIG_DRIVER_NS7520_ETHERNET */
 
 int ns7520_miiphy_initialize(bd_t *bis)
 {
-#if defined(CONFIG_DRIVER_NS7520_ETHERNET)
 #if defined(CONFIG_MII)
 	miiphy_register("ns7520phy", ns7520_miiphy_read, ns7520_miiphy_write);
 #endif
-#endif
 	return 0;
 }
diff --git a/drivers/net/ns8382x.c b/drivers/net/ns8382x.c
index c807dd4..0b9a3ae 100644
--- a/drivers/net/ns8382x.c
+++ b/drivers/net/ns8382x.c
@@ -56,9 +56,6 @@
 #include <asm/io.h>
 #include <pci.h>
 
-#if defined(CONFIG_CMD_NET) \
-	&& defined(CONFIG_NET_MULTI) && defined(CONFIG_NS8382X)
-
 /* defines */
 #define DSIZE     0x00000FFF
 #define ETH_ALEN		6
@@ -859,5 +856,3 @@ ns8382x_disable(struct eth_device *dev)
 	/* Restore PME enable bit */
 	OUTL(dev, SavedClkRun, ClkRun);
 }
-
-#endif
diff --git a/drivers/net/ns9750_eth.c b/drivers/net/ns9750_eth.c
index 067ff8e..0559710 100644
--- a/drivers/net/ns9750_eth.c
+++ b/drivers/net/ns9750_eth.c
@@ -37,8 +37,6 @@
 
 #include "ns9750_eth.h"		/* for Ethernet and PHY */
 
-#ifdef CONFIG_DRIVER_NS9750_ETHERNET
-
 /* some definition to make transistion to linux easier */
 
 #define NS9750_DRIVER_NAME	"eth"
@@ -793,5 +791,3 @@ static unsigned int ns9750_mii_poll_busy (void)
 
 	return unTimeout;
 }
-
-#endif /* CONFIG_DRIVER_NS9750_ETHERNET */
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/rtl8019.c b/drivers/net/rtl8019.c
index 9d62cab..3ddf917 100644
--- a/drivers/net/rtl8019.c
+++ b/drivers/net/rtl8019.c
@@ -32,10 +32,6 @@
 #include "rtl8019.h"
 #include <net.h>
 
-#ifdef CONFIG_DRIVER_RTL8019
-
-#if defined(CONFIG_CMD_NET)
-
 /* packet page register access functions */
 
 static unsigned char get_reg (unsigned int regno)
@@ -271,7 +267,3 @@ extern int eth_send (volatile void *packet, int length)
 
 	return 0;
 }
-
-#endif /* CONFIG_CMD_NET */
-
-#endif /* CONFIG_DRIVER_RTL8019 */
diff --git a/drivers/net/rtl8139.c b/drivers/net/rtl8139.c
index 097f684..4fd20ac 100644
--- a/drivers/net/rtl8139.c
+++ b/drivers/net/rtl8139.c
@@ -77,9 +77,6 @@
 #include <asm/io.h>
 #include <pci.h>
 
-#if defined(CONFIG_CMD_NET) && defined(CONFIG_NET_MULTI) && \
-	defined(CONFIG_RTL8139)
-
 #define RTL_TIMEOUT	100000
 
 #define ETH_FRAME_LEN		1514
@@ -545,4 +542,3 @@ static void rtl_disable(struct eth_device *dev)
 		udelay (100); /* wait 100us */
 	}
 }
-#endif
diff --git a/drivers/net/rtl8169.c b/drivers/net/rtl8169.c
index 6c4c9ff..7423bc0 100644
--- a/drivers/net/rtl8169.c
+++ b/drivers/net/rtl8169.c
@@ -58,9 +58,6 @@
 #include <asm/io.h>
 #include <pci.h>
 
-#if defined(CONFIG_CMD_NET) && defined(CONFIG_NET_MULTI) && \
-	defined(CONFIG_RTL8169)
-
 #undef DEBUG_RTL8169
 #undef DEBUG_RTL8169_TX
 #undef DEBUG_RTL8169_RX
@@ -887,5 +884,3 @@ int rtl8169_initialize(bd_t *bis)
 	}
 	return card_number;
 }
-
-#endif
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/smc91111.c b/drivers/net/smc91111.c
index 8061f12..e8b235b 100644
--- a/drivers/net/smc91111.c
+++ b/drivers/net/smc91111.c
@@ -65,8 +65,6 @@
 #include "smc91111.h"
 #include <net.h>
 
-#ifdef CONFIG_DRIVER_SMC91111
-
 /* Use power-down feature of the chip */
 #define POWER_DOWN	0
 
@@ -1620,4 +1618,3 @@ int get_rom_mac (uchar *v_rom_mac)
 	return (valid_mac ? 1 : 0);
 #endif
 }
-#endif /* CONFIG_DRIVER_SMC91111 */
diff --git a/drivers/net/smc911x.c b/drivers/net/smc911x.c
index 6d93bf0..7555cb9 100644
--- a/drivers/net/smc911x.c
+++ b/drivers/net/smc911x.c
@@ -23,9 +23,6 @@
  */
 
 #include <common.h>
-
-#ifdef CONFIG_DRIVER_SMC911X
-
 #include <command.h>
 #include <net.h>
 #include <miiphy.h>
@@ -699,5 +696,3 @@ int eth_rx(void)
 
 	return 0;
 }
-
-#endif				/* CONFIG_DRIVER_SMC911X */
diff --git a/drivers/net/tigon3.c b/drivers/net/tigon3.c
index 5f6a4ec..ab448b0 100644
--- a/drivers/net/tigon3.c
+++ b/drivers/net/tigon3.c
@@ -12,8 +12,7 @@
 /******************************************************************************/
 #include <common.h>
 #include <asm/types.h>
-#if defined(CONFIG_CMD_NET) && !defined(CONFIG_NET_MULTI) && \
-	defined(CONFIG_TIGON3)
+
 #ifdef CONFIG_BMW
 #include <mpc824x.h>
 #endif
@@ -5695,5 +5694,3 @@ LM_DmaTest (PLM_DEVICE_BLOCK pDevice, PLM_UINT8 pBufferVirt,
 	}
 	return LM_STATUS_SUCCESS;
 }
-
-#endif
diff --git a/drivers/net/tsec.c b/drivers/net/tsec.c
index 397ae71..6e0f2c6 100644
--- a/drivers/net/tsec.c
+++ b/drivers/net/tsec.c
@@ -17,7 +17,6 @@
 #include <net.h>
 #include <command.h>
 
-#if defined(CONFIG_TSEC_ENET)
 #include "tsec.h"
 #include "miiphy.h"
 
@@ -1741,5 +1740,3 @@ tsec_mcast_addr (struct eth_device *dev, u8 mcast_mac, u8 set)
 	return 0;
 }
 #endif /* Multicast TFTP ? */
-
-#endif /* CONFIG_TSEC_ENET */
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
diff --git a/drivers/net/vsc7385.c b/drivers/net/vsc7385.c
index 4095bce..4e7259f 100644
--- a/drivers/net/vsc7385.c
+++ b/drivers/net/vsc7385.c
@@ -13,9 +13,6 @@
  */
 
 #include <config.h>
-
-#ifdef CONFIG_VSC7385_ENET
-
 #include <common.h>
 #include <asm/io.h>
 #include <asm/errno.h>
@@ -97,5 +94,3 @@ int vsc7385_upload_firmware(void *firmware, unsigned int size)
 
 	return 0;
 }
-
-#endif

^ permalink raw reply related	[flat|nested] 20+ messages in thread

* [U-Boot-Users] [PATCH v2] net: Conditional COBJS inclusion of network drivers
  2008-06-09 14:37 ` [U-Boot-Users] [PATCH v2] net: Conditional COBJS inclusion of network drivers Shinya Kuribayashi
@ 2008-07-05 22:32   ` Wolfgang Denk
  2008-07-06  4:42     ` Shinya Kuribayashi
  2008-07-06  7:01     ` Ben Warren
  0 siblings, 2 replies; 20+ messages in thread
From: Wolfgang Denk @ 2008-07-05 22:32 UTC (permalink / raw)
  To: u-boot

In message <484D4038.5000707@ruby.dti.ne.jp> you wrote:
> Replace COBJS-y with appropriate driver config names.
> 
> Signed-off-by: Shinya Kuribayashi <skuribay@ruby.dti.ne.jp>
> ---
> 
> Changes v2:
> 
>  * Kill more CONFIG_CMD_NET and CONFIG_NET_MULTI defines from
>    - fsl_mcdmafec.c
>    - mcffec.c
>    - netarm_eth.c
> 
>  * Revised DM9000 part against the net repo.

Hm... Are you absolutely sure your changes, especially the
CONFIG_CMD_NET and even more the CONFIG_NET_MULTI related ones, do not
cause any trouble on any systems?

Let's for example check the E1000 network driver. with your changes,
it will be built (and enabled), if...

...
> +COBJS-$(CONFIG_E1000) += e1000.o
...

... if CONFIG_E1000 is set.

However, the old code:

...
> -#if defined(CONFIG_CMD_NET) \
> -	&& defined(CONFIG_NET_MULTI) && defined(CONFIG_E1000)
> -

...*also* required that CONFIG_CMD_NET *AND* CONFIG_NET_MULTI were
set, too. 

[For the E1000 driver this is easy to  verify,  as  only  few  boards
enable this option, but you are changing this for many drivers, so it
affects many boards...]


It seems not obvious to me that your change is  really  harmless,  or
tested.

Could you please comment?

[Note that I like your patch and would like to apply it (or  ask  Ben
to do that), but it seems kind of risly to me...]

Best regards,

Wolfgang Denk

-- 
DENX Software Engineering GmbH,     MD: Wolfgang Denk & Detlev Zundel
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: (+49)-8142-66989-10 Fax: (+49)-8142-66989-80 Email: wd at denx.de
If it has syntax, it isn't user friendly.

^ permalink raw reply	[flat|nested] 20+ messages in thread

* [U-Boot-Users] [PATCH v2] net: Conditional COBJS inclusion of network drivers
  2008-07-05 22:32   ` Wolfgang Denk
@ 2008-07-06  4:42     ` Shinya Kuribayashi
  2008-07-06 10:56       ` Jean-Christophe PLAGNIOL-VILLARD
  2008-07-06  7:01     ` Ben Warren
  1 sibling, 1 reply; 20+ messages in thread
From: Shinya Kuribayashi @ 2008-07-06  4:42 UTC (permalink / raw)
  To: u-boot

Wolfgang Denk wrote:
> Hm... Are you absolutely sure your changes, especially the
> CONFIG_CMD_NET and even more the CONFIG_NET_MULTI related ones, do not
> cause any trouble on any systems?

[...]

> It seems not obvious to me that your change is  really  harmless,  or
> tested.
> 
> Could you please comment?

Carefully reviewed as much as I could, but yes it's not fully tested.
I only did some build tests before patch submission.

I expect all board config files, which have one of the existing ethernet
driver config, already have CONFIG_CMD_NET and CONFIG_NET_MULTI, too.
But even if that is the case, there still might be some build breakage.

One of possible down sides of this change, upcomming ports or fully new
ports might encounter build failures due to missing symbols caused by
the lacks of libnet.a, command/cmd_bdinfo.o or something.

[ this could be easily fixed (and must be fixed at the end). ]

Avoiding unnecessary build failures like this, hence prefer the tight
coupling of net|driver|command configs, please revert the patch. Patch
seems already applied to upstream contrary to Wolfgang's comment.


  Shinya

^ permalink raw reply	[flat|nested] 20+ messages in thread

* [U-Boot-Users] [PATCH v2] net: Conditional COBJS inclusion of network drivers
  2008-07-05 22:32   ` Wolfgang Denk
  2008-07-06  4:42     ` Shinya Kuribayashi
@ 2008-07-06  7:01     ` Ben Warren
  2008-07-06  7:52       ` Wolfgang Denk
  1 sibling, 1 reply; 20+ messages in thread
From: Ben Warren @ 2008-07-06  7:01 UTC (permalink / raw)
  To: u-boot

Hi Wolfgang,

welcome back...

Wolfgang Denk wrote:
> In message <484D4038.5000707@ruby.dti.ne.jp> you wrote:
>   
>> Replace COBJS-y with appropriate driver config names.
>>
>> Signed-off-by: Shinya Kuribayashi <skuribay@ruby.dti.ne.jp>
>> ---
>>
>> Changes v2:
>>
>>  * Kill more CONFIG_CMD_NET and CONFIG_NET_MULTI defines from
>>    - fsl_mcdmafec.c
>>    - mcffec.c
>>    - netarm_eth.c
>>
>>  * Revised DM9000 part against the net repo.
>>     
>
> Hm... Are you absolutely sure your changes, especially the
> CONFIG_CMD_NET and even more the CONFIG_NET_MULTI related ones, do not
> cause any trouble on any systems?
>
> Let's for example check the E1000 network driver. with your changes,
> it will be built (and enabled), if...
>
> ...
>   
>> +COBJS-$(CONFIG_E1000) += e1000.o
>>     
> ...
>
> ... if CONFIG_E1000 is set.
>
> However, the old code:
>
> ...
>   
>> -#if defined(CONFIG_CMD_NET) \
>> -	&& defined(CONFIG_NET_MULTI) && defined(CONFIG_E1000)
>> -
>>     
>
> ...*also* required that CONFIG_CMD_NET *AND* CONFIG_NET_MULTI were
> set, too. 
>
> [For the E1000 driver this is easy to  verify,  as  only  few  boards
> enable this option, but you are changing this for many drivers, so it
> affects many boards...]
>
>
> It seems not obvious to me that your change is  really  harmless,  or
> tested.
>
> Could you please comment?
>
> [Note that I like your patch and would like to apply it (or  ask  Ben
> to do that), but it seems kind of risly to me...]
>
>   
I decided to accept this and push it upstream because it's definitely a 
step in the right direction.  Addressing your concerns, for any driver:

if CONFIG_CMD_NET isn't defined, networking isn't enabled, and at worst 
your image is bigger than necessary because of libnet.a

if CONFIG_NET_MULTI isn't defined, but CONFIG_CMD_NET is, networking 
will use the 'old-school' API and if the driver doesn't export 
eth_init() etc., you'll get a compile error.

So, IMHO the worst case scenario is a bit of code bloat or compile 
error, which aren't disastrous.  Run-time errors bad, compile-time, not 
so much.

Personally, I want to merge the two networking APIs so this MULTI 
business goes away.  Baby steps are necessary here.
> Best regards,
>
> Wolfgang Denk
>
>   
regards,
Ben

^ permalink raw reply	[flat|nested] 20+ messages in thread

* [U-Boot-Users] [PATCH v2] net: Conditional COBJS inclusion of network drivers
  2008-07-06  7:01     ` Ben Warren
@ 2008-07-06  7:52       ` Wolfgang Denk
  0 siblings, 0 replies; 20+ messages in thread
From: Wolfgang Denk @ 2008-07-06  7:52 UTC (permalink / raw)
  To: u-boot

Dear Ben,

in message <48706DD6.3040500@gmail.com> you wrote:
> 
> welcome back...

Thanks (I already feel again as if I could need a good vacation :-)

> So, IMHO the worst case scenario is a bit of code bloat or compile 
> error, which aren't disastrous.  Run-time errors bad, compile-time, not 
> so much.

OK, agreed.

> Personally, I want to merge the two networking APIs so this MULTI 
> business goes away.  Baby steps are necessary here.

Agreed, too. Thanks.

Best regards,

Wolfgang Denk

-- 
DENX Software Engineering GmbH,     MD: Wolfgang Denk & Detlev Zundel
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: (+49)-8142-66989-10 Fax: (+49)-8142-66989-80 Email: wd at denx.de
CONSUMER NOTICE:  Because  of  the  "Uncertainty  Principle,"  It  Is
Impossible  for  the  Consumer  to  Find  Out  at  the Same Time Both
Precisely Where This Product Is and How Fast It Is Moving.

^ permalink raw reply	[flat|nested] 20+ messages in thread

* [U-Boot-Users] [PATCH v2] net: Conditional COBJS inclusion of network drivers
  2008-07-06  4:42     ` Shinya Kuribayashi
@ 2008-07-06 10:56       ` Jean-Christophe PLAGNIOL-VILLARD
  2008-07-07  1:20         ` Shinya Kuribayashi
  0 siblings, 1 reply; 20+ messages in thread
From: Jean-Christophe PLAGNIOL-VILLARD @ 2008-07-06 10:56 UTC (permalink / raw)
  To: u-boot

On 13:42 Sun 06 Jul     , Shinya Kuribayashi wrote:
> Wolfgang Denk wrote:
> > Hm... Are you absolutely sure your changes, especially the
> > CONFIG_CMD_NET and even more the CONFIG_NET_MULTI related ones, do not
> > cause any trouble on any systems?
> 
> [...]
> 
> > It seems not obvious to me that your change is  really  harmless,  or
> > tested.
> > 
> > Could you please comment?
> 
> Carefully reviewed as much as I could, but yes it's not fully tested.
> I only did some build tests before patch submission.
> 
> I expect all board config files, which have one of the existing ethernet
> driver config, already have CONFIG_CMD_NET and CONFIG_NET_MULTI, too.
> But even if that is the case, there still might be some build breakage.
> 
I've found an error on ARM, I'll send a patch about it soon.

Best Regards,
J.

^ permalink raw reply	[flat|nested] 20+ messages in thread

* [U-Boot-Users] [PATCH v2] net: Conditional COBJS inclusion of network drivers
  2008-07-06 10:56       ` Jean-Christophe PLAGNIOL-VILLARD
@ 2008-07-07  1:20         ` Shinya Kuribayashi
  0 siblings, 0 replies; 20+ messages in thread
From: Shinya Kuribayashi @ 2008-07-07  1:20 UTC (permalink / raw)
  To: u-boot

Jean-Christophe PLAGNIOL-VILLARD wrote:
>> But even if that is the case, there still might be some build breakage.
>>
> I've found an error on ARM, I'll send a patch about it soon.

Sorry, and thanks in advance.

> Best Regards,
> J.

-- 
Shinya Kuribayashi
NEC Electronics

^ permalink raw reply	[flat|nested] 20+ messages in thread

end of thread, other threads:[~2008-07-07  1:20 UTC | newest]

Thread overview: 20+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-06-07 16:01 [U-Boot-Users] drivers/net/Makefile: Conditional COBJS inclusion cleanups Shinya Kuribayashi
2008-06-07 16:03 ` [U-Boot-Users] [PATCH 1/10] net: Conditional COBJS inclusion of bcm570x and tigon3 modules Shinya Kuribayashi
2008-06-07 16:04   ` [U-Boot-Users] [PATCH 2/10] net: Conditional COBJS inclusion of Realtek modules Shinya Kuribayashi
2008-06-07 16:06     ` [U-Boot-Users] [PATCH 3/10] net: Conditional COBJS inclusion of Intel modules Shinya Kuribayashi
2008-06-07 16:07     ` [U-Boot-Users] [PATCH 4/10] net: Conditional COBJS inclusion of INCA-IP switch Shinya Kuribayashi
2008-06-07 16:08     ` [U-Boot-Users] [PATCH 5/10] net: Conditional COBJS inclusion of National Semiconductor modules Shinya Kuribayashi
2008-06-07 16:10       ` [U-Boot-Users] [PATCH 6/10] net: Conditional COBJS inclusion of NET+ARM modules Shinya Kuribayashi
2008-06-07 16:11         ` [U-Boot-Users] [PATCH 7/10] net: Conditional COBJS inclusion of TSEC and Vitesse modules Shinya Kuribayashi
2008-06-07 16:12           ` [U-Boot-Users] [PATCH 8/10] net: Conditional COBJS inclusion of SMC modules Shinya Kuribayashi
2008-06-07 16:14             ` [U-Boot-Users] [PATCH 9/10] net: Conditional COBJS inclusion of Freescale FEC modules Shinya Kuribayashi
2008-06-07 16:16               ` [U-Boot-Users] [PATCH 10/10] net: Conditional COBJS inclusino of remainings Shinya Kuribayashi
2008-06-09 13:19                 ` Ben Warren
2008-06-09 13:43                   ` Shinya Kuribayashi
2008-06-09 14:37 ` [U-Boot-Users] [PATCH v2] net: Conditional COBJS inclusion of network drivers Shinya Kuribayashi
2008-07-05 22:32   ` Wolfgang Denk
2008-07-06  4:42     ` Shinya Kuribayashi
2008-07-06 10:56       ` Jean-Christophe PLAGNIOL-VILLARD
2008-07-07  1:20         ` Shinya Kuribayashi
2008-07-06  7:01     ` Ben Warren
2008-07-06  7:52       ` Wolfgang Denk

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox