Commit 3b904ccb authored by Shinya Kuribayashi's avatar Shinya Kuribayashi Committed by Ben Warren
Browse files

net: Conditional COBJS inclusion of network drivers



Replace COBJS-y with appropriate driver config names.
Signed-off-by: default avatarShinya Kuribayashi <skuribay@ruby.dti.ne.jp>
Signed-off-by: default avatarBen Warren <biggerbadderben@gmail.com>
parent e44f3ea4
......@@ -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 */
......@@ -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
......
......@@ -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
......@@ -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 */
......@@ -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
......@@ -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 ---------------- */
......@@ -760,4 +758,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 */
......@@ -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
......@@ -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
......@@ -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 */
......@@ -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 */
......@@ -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
......@@ -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 */
......@@ -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 */
......@@ -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 */
......@@ -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 */
......@@ -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
......@@ -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 */
......@@ -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 */
......@@ -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;
}
......@@ -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
......@@ -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 */
......@@ -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
......@@ -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 */
......@@ -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 */
......@@ -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
......@@ -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
......@@ -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
......@@ -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 */
......@@ -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 */
......@@ -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
......@@ -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 */
......@@ -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
......@@ -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
......@@ -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