drivers/net/Makefile: Conditional COBJS inclusion cleanups
Subsystems (2)
---
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(-)
drivers/net/3c589.c +0 -5
@@ -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 */
drivers/net/Makefile +33 -33
78 lines not on this page · raw message
drivers/net/bcm570x.c +0 -5
@@ -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
drivers/net/cs8900.c +0 -8
@@ -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 */
drivers/net/dc2114x.c +0 -6
@@ -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
drivers/net/dm9000x.c +0 -3
@@ -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 */
drivers/net/e1000.c +0 -5
@@ -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
drivers/net/eepro100.c +0 -5
@@ -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
drivers/net/enc28j60.c +0 -3
@@ -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 */
drivers/net/fsl_mcdmafec.c +0 -2
@@ -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 */
drivers/net/inca-ip_sw.c +0 -5
@@ -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
drivers/net/ks8695eth.c +0 -4
@@ -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 */
drivers/net/lan91c96.c +0 -9
@@ -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 */
drivers/net/macb.c +0 -5
@@ -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 */
drivers/net/mcffec.c +0 -3
@@ -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 */
drivers/net/natsemi.c +0 -5
@@ -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
drivers/net/netarm_eth.c +0 -4
@@ -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 */
drivers/net/netconsole.c +0 -5
@@ -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 */
drivers/net/ns7520_eth.c +0 -5
@@ -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 ; }
drivers/net/ns8382x.c +0 -5
@@ -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
drivers/net/ns9750_eth.c +0 -4
@@ -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 */
drivers/net/pcnet.c +0 -4
@@ -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
drivers/net/plb2800_eth.c +0 -6
@@ -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 */
drivers/net/rtl8019.c +0 -8
@@ -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 */
drivers/net/rtl8139.c +0 -4
@@ -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
drivers/net/rtl8169.c +0 -5
@@ -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
drivers/net/s3c4510b_eth.c +0 -5
@@ -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
drivers/net/smc91111.c +0 -3
@@ -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 */
drivers/net/smc911x.c +0 -5
@@ -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 */
drivers/net/tigon3.c +1 -4
@@ -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
drivers/net/tsec.c +0 -3
@@ -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 */
drivers/net/tsi108_eth.c +0 -5
@@ -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
drivers/net/uli526x.c +0 -4
@@ -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
drivers/net/vsc7385.c +0 -5
@@ -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
PATCH 1/10 net: Conditional COBJS inclusion of bcm570x and tigon3 modules
net: Conditional COBJS inclusion of bcm570x and tigon3 modules
From: Shinya Kuribayashi <[email protected]>
---
drivers/net/Makefile | 4 ++-- drivers/net/bcm570x.c | 5 ----- drivers/net/tigon3.c | 5 +---- 3 files changed, 3 insertions(+), 11 deletions(-)
drivers/net/Makefile +2 -2
@@ -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
drivers/net/bcm570x.c +0 -5
@@ -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
drivers/net/tigon3.c +1 -4
@@ -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
PATCH 2/10 net: Conditional COBJS inclusion of Realtek modules
net: Conditional COBJS inclusion of Realtek modules
From: Shinya Kuribayashi <[email protected]>
---
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(-)
drivers/net/Makefile +3 -3
@@ -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
drivers/net/rtl8019.c +0 -8
@@ -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 */
drivers/net/rtl8139.c +0 -4
@@ -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
drivers/net/rtl8169.c +0 -5
@@ -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
PATCH 3/10 net: Conditional COBJS inclusion of Intel modules
net: Conditional COBJS inclusion of Intel modules
From: Shinya Kuribayashi <[email protected]>
---
drivers/net/Makefile | 4 ++-- drivers/net/e1000.c | 5 ----- drivers/net/eepro100.c | 5 ----- 3 files changed, 2 insertions(+), 12 deletions(-)
drivers/net/Makefile +2 -2
@@ -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
drivers/net/e1000.c +0 -5
@@ -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
drivers/net/eepro100.c +0 -5
@@ -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
PATCH 4/10 net: Conditional COBJS inclusion of INCA-IP switch
In reply to Shinya Kuribayashinet: Conditional COBJS inclusion of INCA-IP switch
From: Shinya Kuribayashi <[email protected]>
---
drivers/net/Makefile | 2 +- drivers/net/inca-ip_sw.c | 5 ----- 2 files changed, 1 insertions(+), 6 deletions(-)
drivers/net/Makefile +1 -1
@@ -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
drivers/net/inca-ip_sw.c +0 -5
@@ -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
PATCH 5/10 net: Conditional COBJS inclusion of National Semiconductor modules
In reply to Shinya Kuribayashinet: Conditional COBJS inclusion of National Semiconductor modules
From: Shinya Kuribayashi <[email protected]>
---
drivers/net/Makefile | 4 ++-- drivers/net/natsemi.c | 5 ----- drivers/net/ns8382x.c | 5 ----- 3 files changed, 2 insertions(+), 12 deletions(-)
drivers/net/Makefile +2 -2
@@ -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
drivers/net/natsemi.c +0 -5
@@ -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
drivers/net/ns8382x.c +0 -5
@@ -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
PATCH 6/10 net: Conditional COBJS inclusion of NET+ARM modules
net: Conditional COBJS inclusion of NET+ARM modules
From: Shinya Kuribayashi <[email protected]>
---
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(-)
drivers/net/Makefile +3 -3
@@ -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
drivers/net/netarm_eth.c +0 -4
@@ -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 */
drivers/net/ns7520_eth.c +0 -5
@@ -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 ; }
drivers/net/ns9750_eth.c +0 -4
@@ -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 */
PATCH 7/10 net: Conditional COBJS inclusion of TSEC and Vitesse modules
net: Conditional COBJS inclusion of TSEC and Vitesse modules
From: Shinya Kuribayashi <[email protected]>
---
drivers/net/Makefile | 4 ++-- drivers/net/tsec.c | 3 --- drivers/net/vsc7385.c | 5 ----- 3 files changed, 2 insertions(+), 10 deletions(-)
drivers/net/Makefile +2 -2
@@ -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
drivers/net/tsec.c +0 -3
@@ -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 */
drivers/net/vsc7385.c +0 -5
@@ -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
PATCH 8/10 net: Conditional COBJS inclusion of SMC modules
net: Conditional COBJS inclusion of SMC modules
From: Shinya Kuribayashi <[email protected]>
---
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(-)
drivers/net/Makefile +3 -3
@@ -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
drivers/net/lan91c96.c +0 -9
@@ -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 */
drivers/net/smc91111.c +0 -3
@@ -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 */
drivers/net/smc911x.c +0 -5
@@ -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 */
PATCH 9/10 net: Conditional COBJS inclusion of Freescale FEC modules
net: Conditional COBJS inclusion of Freescale FEC modules
From: Shinya Kuribayashi <[email protected]>
---
drivers/net/Makefile | 4 ++-- drivers/net/fsl_mcdmafec.c | 2 -- drivers/net/mcffec.c | 3 --- 3 files changed, 2 insertions(+), 7 deletions(-)
drivers/net/Makefile +2 -2
@@ -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
drivers/net/fsl_mcdmafec.c +0 -2
@@ -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 */
drivers/net/mcffec.c +0 -3
@@ -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 */
PATCH 10/10 net: Conditional COBJS inclusino of remainings
net: Conditional COBJS inclusino of remainings
From: Shinya Kuribayashi <[email protected]>
---
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(-)
drivers/net/3c589.c +0 -5
@@ -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 */
drivers/net/Makefile +13 -13
@@ -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
drivers/net/cs8900.c +0 -8
@@ -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 */
drivers/net/dc2114x.c +0 -6
@@ -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
drivers/net/dm9000x.c +0 -3
@@ -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 */
drivers/net/enc28j60.c +0 -3
@@ -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 */
drivers/net/ks8695eth.c +0 -4
@@ -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 */
drivers/net/macb.c +0 -5
@@ -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 */
drivers/net/netconsole.c +0 -5
@@ -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 */
drivers/net/pcnet.c +0 -4
@@ -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
drivers/net/plb2800_eth.c +0 -6
@@ -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 */
drivers/net/s3c4510b_eth.c +0 -5
@@ -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
drivers/net/tsi108_eth.c +0 -5
@@ -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
drivers/net/uli526x.c +0 -4
@@ -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
PATCH 10/10 net: Conditional COBJS inclusino of remainings
Hi Shinya,
Quoted 2 lines · Shinya Kuribayashi
net: Conditional COBJS inclusino of remainings
s/inclusino/inclusion/
"remainings" isn't a word. Please use something like "remaining Ethernet controllers"
Quoted 161 lines
From: Shinya Kuribayashi <[email protected]>
Signed-off-by Shinya Kuribayashi <[email protected]>---
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(-)drivers/net/3c589.c +0
-5@@ -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 */ drivers/net/Makefile +0
-0@@ -25,21 +25,21 @@ include $(TOPDIR)/config.mkLIB := $(obj)libnet.a
drivers/net/Makefile +1
-1-COBJS-y += 3c589.o +COBJS-$(CONFIG_DRIVER_3C589) += 3c589.oCOBJS-$(CONFIG_BCM570x) += bcm570x.o bcm570x_autoneg.o 5701rls.o COBJS-$(CONFIG_BFIN_MAC) += bfin_mac.o
drivers/net/Makefile +3
-3-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.oCOBJS-$(CONFIG_E1000) += e1000.o
COBJS-$(CONFIG_EEPRO100) += eepro100.odrivers/net/Makefile +1
-1-COBJS-y += enc28j60.o +COBJS-$(CONFIG_ENC28J60) += enc28j60.oCOBJS-$(CONFIG_FSLDMAFEC) += fsl_mcdmafec.o
COBJS-$(CONFIG_GRETH) += greth.o
COBJS-$(CONFIG_INCA_IP_SWITCH) += inca-ip_sw.odrivers/net/Makefile +1
-1-COBJS-y += ks8695eth.o +COBJS-$(CONFIG_DRIVER_KS8695ETH) += ks8695eth.oCOBJS-$(CONFIG_DRIVER_LAN91C96) += lan91c96.o
drivers/net/Makefile +1
-1-COBJS-y += macb.o +COBJS-$(CONFIG_MACB) += macb.oCOBJS-$(CONFIG_MCFFEC) += mcffec.o
COBJS-$(CONFIG_NATSEMI) += natsemi.o
ifeq ($(CONFIG_DRIVER_NE2000),y)drivers/net/Makefile +0
-0@@ -47,22 +47,22 @@ COBJS-y += ne2000.oCOBJS-$(CONFIG_DRIVER_AX88796L) += ax88796.o
endif
COBJS-$(CONFIG_DRIVER_NETARMETH) += netarm_eth.odrivers/net/Makefile +1
-1-COBJS-y += netconsole.o +COBJS-$(CONFIG_NETCONSOLE) += netconsole.oCOBJS-$(CONFIG_DRIVER_NS7520_ETHERNET) += ns7520_eth.o COBJS-$(CONFIG_NS8382X) += ns8382x.o COBJS-$(CONFIG_DRIVER_NS9750_ETHERNET) += ns9750_eth.o
drivers/net/Makefile +2
-2-COBJS-y += pcnet.o -COBJS-y += plb2800_eth.o +COBJS-$(CONFIG_PCNET) += pcnet.o +COBJS-$(CONFIG_PLB2800_ETHER) += plb2800_eth.oCOBJS-$(CONFIG_DRIVER_RTL8019) += rtl8019.o
COBJS-$(CONFIG_RTL8139) += rtl8139.o
COBJS-$(CONFIG_RTL8169) += rtl8169.odrivers/net/Makefile +1
-1-COBJS-y += s3c4510b_eth.o +COBJS-$(CONFIG_DRIVER_S3C4510_ETH) += s3c4510b_eth.oCOBJS-$(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
drivers/net/Makefile +2
-2-COBJS-y += tsi108_eth.o -COBJS-y += uli526x.o +COBJS-$(CONFIG_TSI108_ETH) += tsi108_eth.o +COBJS-$(CONFIG_ULI526X) += uli526x.oCOBJS-$(CONFIG_VSC7385_ENET) += vsc7385.o COBJS-$(CONFIG_XILINX_EMAC) += xilinx_emac.o COBJS-$(CONFIG_XILINX_EMACLITE) += xilinx_emaclite.o
drivers/net/cs8900.c +0
-4@@ -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 ;}
drivers/net/cs8900.c +0
-4- -#endif /* CONFIG_CMD_NET */ - -#endif /* CONFIG_DRIVER_CS8900 */ drivers/net/dc2114x.c +0
-4@@ -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*/drivers/net/dc2114x.c +0
-2- -#endif drivers/net/dm9000x.c +0
-0@@ -47,8 +47,6 @@ TODO: Homerun NIC and longrun NIC are not functional, onlyinternal at the
#include <net.h>
#include <asm/io.h>drivers/net/dm9000x.c +0
-2-#ifdef CONFIG_DRIVER_DM9000 -
Quoted 2 lines
#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
PATCH 10/10 net: Conditional COBJS inclusino of remainings
Quoted 9 lines · Ben Warren
Quoted 9 lines
drivers/net/dm9000x.c +0
-0@@ -47,8 +47,6 @@ TODO: Homerun NIC and longrun NIC are not functional, onlyinternal at the
#include <net.h>
#include <asm/io.h>
Quoted 8 lines
Quoted 4 lines
drivers/net/dm9000x.c +0
-2-#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.
Quoted 2 lines
thanks for doing all this
Makefilefixing! 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
PATCH v2 1/1 net: Conditional COBJS inclusion of network drivers
In reply to Shinya KuribayashiReplace COBJS-y with appropriate driver config names.
---
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(-)
drivers/net/3c589.c +0 -5
@@ -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 */
drivers/net/Makefile +33 -33
78 lines not on this page · raw message
drivers/net/bcm570x.c +0 -5
@@ -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
drivers/net/cs8900.c +0 -8
@@ -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 */
drivers/net/dc2114x.c +0 -6
@@ -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
drivers/net/dm9000x.c +0 -3
@@ -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 */
drivers/net/e1000.c +0 -5
@@ -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
drivers/net/eepro100.c +0 -5
@@ -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
drivers/net/enc28j60.c +0 -3
@@ -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 */
drivers/net/fsl_mcdmafec.c +0 -5
@@ -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 */
drivers/net/inca-ip_sw.c +0 -5
@@ -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
drivers/net/ks8695eth.c +0 -4
@@ -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 */
drivers/net/lan91c96.c +0 -9
@@ -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 */
drivers/net/macb.c +0 -5
@@ -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 */
drivers/net/mcffec.c +0 -7
@@ -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 */
drivers/net/natsemi.c +0 -5
@@ -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
drivers/net/netarm_eth.c +0 -8
@@ -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 */
drivers/net/netconsole.c +0 -5
@@ -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 */
drivers/net/ns7520_eth.c +0 -5
@@ -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 ; }
drivers/net/ns8382x.c +0 -5
@@ -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
drivers/net/ns9750_eth.c +0 -4
@@ -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 */
drivers/net/pcnet.c +0 -4
@@ -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
drivers/net/plb2800_eth.c +0 -6
@@ -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 */
drivers/net/rtl8019.c +0 -8
@@ -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 */
drivers/net/rtl8139.c +0 -4
@@ -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
drivers/net/rtl8169.c +0 -5
@@ -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
drivers/net/s3c4510b_eth.c +0 -5
@@ -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
drivers/net/smc91111.c +0 -3
@@ -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 */
drivers/net/smc911x.c +0 -5
@@ -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 */
drivers/net/tigon3.c +1 -4
@@ -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
drivers/net/tsec.c +0 -3
@@ -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 */
drivers/net/tsi108_eth.c +0 -5
@@ -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
drivers/net/uli526x.c +0 -4
@@ -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
drivers/net/vsc7385.c +0 -5
@@ -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
PATCH v2 1/1 net: Conditional COBJS inclusion of network drivers
Quoted 5 lines · In message <[email protected]> you wrote:
Replace COBJS-y with appropriate driver config names.
Signed-off-by Shinya Kuribayashi <[email protected]>---
Quoted 8 lines
Changes v2:
* Kill more
CONFIG_CMD_NETandCONFIG_NET_MULTIdefines 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...
...
Quoted 1 line
+COBJS-$(CONFIG_E1000) += e1000.o
...
... if CONFIG_E1000 is set.
However, the old code:
...
drivers/net/e1000.c tested on both gig copper and gig fiber boards · line 49
Quoted 3 lines
drivers/net/e1000.c +0
-3-#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
Signature · 4 lines
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.
PATCH v2 1/1 net: Conditional COBJS inclusion of network drivers
Quoted 3 lines · Wolfgang Denk
Hm... Are you absolutely sure your changes, especially the
CONFIG_CMD_NETand even more theCONFIG_NET_MULTIrelated ones, do not cause any trouble on any systems?
[...]
Quoted 4 lines
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
PATCH v2 1/1 net: Conditional COBJS inclusion of network drivers
In reply to Wolfgang DenkHi Wolfgang,
welcome back...
Quoted 49 lines · Wolfgang Denk
Quoted 5 lines · In message <[email protected]> you wrote:
Replace COBJS-y with appropriate driver config names.
Signed-off-by Shinya Kuribayashi <[email protected]>---
Quoted 9 lines
Changes v2:
* Kill more
CONFIG_CMD_NETandCONFIG_NET_MULTIdefines 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_NETand even more theCONFIG_NET_MULTIrelated 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...
...
Quoted 2 lines
+COBJS-$(CONFIG_E1000) += e1000.o
...
... if
CONFIG_E1000is set.However, the old code:
...
drivers/net/e1000.c tested on both gig copper and gig fiber boards · line 49
Quoted 4 lines
drivers/net/e1000.c +0
-3-#if defined(CONFIG_CMD_NET ) \ - && defined(CONFIG_NET_MULTI ) && defined(CONFIG_E1000 ) -...*also* required that
CONFIG_CMD_NET*AND*CONFIG_NET_MULTIwere 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...]
Quoted 9 lines
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.
Quoted 5 lines
Best regards,
Wolfgang Denk
regards,
Ben
PATCH v2 1/1 net: Conditional COBJS inclusion of network drivers
Dear Ben,
Quoted 2 lines · in message <[email protected]> you wrote:
welcome back...
Thanks (I already feel again as if I could need a good vacation :-)
Quoted 3 lines
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.
Quoted 2 lines
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
Signature · 6 lines
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.
PATCH v2 1/1 net: Conditional COBJS inclusion of network drivers
In reply to Shinya KuribayashiQuoted 10 lines · Shinya Kuribayashi
Quoted 3 lines · Wolfgang Denk
Hm... Are you absolutely sure your changes, especially the
CONFIG_CMD_NETand even more theCONFIG_NET_MULTIrelated ones, do not cause any trouble on any systems?[...]
Quoted 3 lines
It seems not obvious to me that your change is really harmless, or tested.
Quoted 9 lines
Quoted 1 line
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_NETandCONFIG_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.
PATCH v2 1/1 net: Conditional COBJS inclusion of network drivers
Quoted 3 lines · Jean-Christophe PLAGNIOL-VILLARD
Quoted 2 lines
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.
Quoted 2 lines
Best Regards,
J.
Signature · 2 lines
Shinya Kuribayashi NEC Electronics