Skip to content

Commit

Permalink
net: drop !NET_MULTI code
Browse files Browse the repository at this point in the history
This is long over due.  All but two net drivers have been converted, but
those have now been dropped.

The only thing left to do is actually delete all references to NET_MULTI
and code that is compiled when that is not defined.  So here we scrub the
core code.

Signed-off-by: Mike Frysinger <[email protected]>
  • Loading branch information
vapier authored and wdenx committed Oct 5, 2011
1 parent d90f0c1 commit e2a5345
Show file tree
Hide file tree
Showing 35 changed files with 23 additions and 198 deletions.
8 changes: 3 additions & 5 deletions README
Original file line number Diff line number Diff line change
Expand Up @@ -3511,12 +3511,10 @@ List of environment variables (most likely not complete):

bootstopkey - see CONFIG_AUTOBOOT_STOP_STR

ethprime - When CONFIG_NET_MULTI is enabled controls which
interface is used first.
ethprime - controls which interface is used first.

ethact - When CONFIG_NET_MULTI is enabled controls which
interface is currently active. For example you
can do the following
ethact - controls which interface is currently active.
For example you can do the following

=> setenv ethact FEC
=> ping 192.168.0.1 # traffic sent on FEC
Expand Down
4 changes: 0 additions & 4 deletions api/api_net.c
Original file line number Diff line number Diff line change
Expand Up @@ -34,10 +34,6 @@ DECLARE_GLOBAL_DATA_PTR;
#define DEBUG
#undef DEBUG

#if !defined(CONFIG_NET_MULTI)
#error "API/net is currently only available for platforms with CONFIG_NET_MULTI"
#endif

#ifdef DEBUG
#define debugf(fmt, args...) do { printf("%s(): ", __func__); printf(fmt, ##args); } while (0)
#else
Expand Down
2 changes: 0 additions & 2 deletions arch/arm/lib/board.c
Original file line number Diff line number Diff line change
Expand Up @@ -588,9 +588,7 @@ void board_init_r(gd_t *id, ulong dest_addr)
bb_miiphy_init();
#endif
#if defined(CONFIG_CMD_NET)
#if defined(CONFIG_NET_MULTI)
puts("Net: ");
#endif
eth_initialize(gd->bd);
#if defined(CONFIG_RESET_PHY_R)
debug("Reset Ethernet PHY\n");
Expand Down
2 changes: 0 additions & 2 deletions arch/avr32/lib/board.c
Original file line number Diff line number Diff line change
Expand Up @@ -330,9 +330,7 @@ void board_init_r(gd_t *new_gd, ulong dest_addr)
s = getenv("bootfile");
if (s)
copy_filename(BootFile, s, sizeof(BootFile));
#if defined(CONFIG_NET_MULTI)
puts("Net: ");
#endif
eth_initialize(gd->bd);
#endif

Expand Down
2 changes: 0 additions & 2 deletions arch/m68k/lib/board.c
Original file line number Diff line number Diff line change
Expand Up @@ -606,11 +606,9 @@ void board_init_r (gd_t *id, ulong dest_addr)
#if defined(FEC_ENET)
eth_init(bd);
#endif
#if defined(CONFIG_NET_MULTI)
puts ("Net: ");
eth_initialize (bd);
#endif
#endif

#ifdef CONFIG_POST
post_run (NULL, POST_RAM | post_bootmode_get(0));
Expand Down
2 changes: 0 additions & 2 deletions arch/mips/lib/board.c
Original file line number Diff line number Diff line change
Expand Up @@ -372,9 +372,7 @@ void board_init_r (gd_t *id, ulong dest_addr)
bb_miiphy_init();
#endif
#if defined(CONFIG_CMD_NET)
#if defined(CONFIG_NET_MULTI)
puts ("Net: ");
#endif
eth_initialize(gd->bd);
#endif

Expand Down
2 changes: 0 additions & 2 deletions arch/nios2/lib/board.c
Original file line number Diff line number Diff line change
Expand Up @@ -158,9 +158,7 @@ void board_init (void)
#endif

#if defined(CONFIG_CMD_NET)
#if defined(CONFIG_NET_MULTI)
puts ("Net: ");
#endif
eth_initialize (bd);
#endif

Expand Down
3 changes: 1 addition & 2 deletions arch/powerpc/cpu/mpc8220/fec.c
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,7 @@
#include "fec.h"

#undef DEBUG
#if defined(CONFIG_CMD_NET) && defined(CONFIG_NET_MULTI) && \
defined(CONFIG_MPC8220_FEC)
#if defined(CONFIG_CMD_NET) && defined(CONFIG_MPC8220_FEC)

#if !(defined(CONFIG_MII) || defined(CONFIG_CMD_MII))
#error "CONFIG_MII has to be defined!"
Expand Down
3 changes: 1 addition & 2 deletions arch/powerpc/cpu/mpc8260/ether_fcc.c
Original file line number Diff line number Diff line change
Expand Up @@ -53,8 +53,7 @@

DECLARE_GLOBAL_DATA_PTR;

#if defined(CONFIG_ETHER_ON_FCC) && defined(CONFIG_CMD_NET) && \
defined(CONFIG_NET_MULTI)
#if defined(CONFIG_ETHER_ON_FCC) && defined(CONFIG_CMD_NET)

static struct ether_fcc_info_s
{
Expand Down
4 changes: 0 additions & 4 deletions arch/powerpc/cpu/mpc8260/ether_scc.c
Original file line number Diff line number Diff line change
Expand Up @@ -43,10 +43,6 @@
#include <command.h>
#include <config.h>

#ifndef CONFIG_NET_MULTI
#error "CONFIG_NET_MULTI must be defined."
#endif

#if (CONFIG_ETHER_INDEX == 1)
# define PROFF_ENET PROFF_SCC1
# define CPM_CR_ENET_PAGE CPM_CR_SCC1_PAGE
Expand Down
3 changes: 1 addition & 2 deletions arch/powerpc/cpu/mpc85xx/ether_fcc.c
Original file line number Diff line number Diff line change
Expand Up @@ -52,8 +52,7 @@
#include <miiphy.h>
#endif

#if defined(CONFIG_ETHER_ON_FCC) && defined(CONFIG_CMD_NET) && \
defined(CONFIG_NET_MULTI)
#if defined(CONFIG_ETHER_ON_FCC) && defined(CONFIG_CMD_NET)

static struct ether_fcc_info_s
{
Expand Down
7 changes: 3 additions & 4 deletions arch/powerpc/cpu/ppc4xx/miiphy.c
Original file line number Diff line number Diff line change
Expand Up @@ -187,10 +187,9 @@ int phy_setup_aneg (char *devname, unsigned char addr)
*/
unsigned int miiphy_getemac_offset(u8 addr)
{
#if (defined(CONFIG_440) && \
#if defined(CONFIG_440) && \
!defined(CONFIG_440SP) && !defined(CONFIG_440SPE) && \
!defined(CONFIG_460EX) && !defined(CONFIG_460GT)) && \
defined(CONFIG_NET_MULTI)
!defined(CONFIG_460EX) && !defined(CONFIG_460GT)
unsigned long zmii;
unsigned long eoffset;

Expand Down Expand Up @@ -228,7 +227,7 @@ unsigned int miiphy_getemac_offset(u8 addr)
return (eoffset);
#else

#if defined(CONFIG_NET_MULTI) && defined(CONFIG_405EX)
#if defined(CONFIG_405EX)
unsigned long rgmii;
int devnum = 1;

Expand Down
1 change: 0 additions & 1 deletion arch/powerpc/include/asm/ppc4xx-emac.h
Original file line number Diff line number Diff line change
Expand Up @@ -136,7 +136,6 @@ typedef struct emac_4xx_hw_st {
#if defined(CONFIG_440GX) || defined(CONFIG_460GT)
#define EMAC_NUM_DEV 4
#elif (defined(CONFIG_440) || defined(CONFIG_405EP)) && \
defined(CONFIG_NET_MULTI) && \
!defined(CONFIG_440SP) && !defined(CONFIG_440SPE)
#define EMAC_NUM_DEV 2
#else
Expand Down
2 changes: 0 additions & 2 deletions arch/powerpc/lib/board.c
Original file line number Diff line number Diff line change
Expand Up @@ -960,10 +960,8 @@ void board_init_r (gd_t *id, ulong dest_addr)
bb_miiphy_init();
#endif
#if defined(CONFIG_CMD_NET)
#if defined(CONFIG_NET_MULTI)
WATCHDOG_RESET ();
puts ("Net: ");
#endif
eth_initialize (bd);
#endif

Expand Down
2 changes: 0 additions & 2 deletions arch/sparc/lib/board.c
Original file line number Diff line number Diff line change
Expand Up @@ -387,10 +387,8 @@ void board_init_f(ulong bootflag)
bb_miiphy_init();
#endif
#if defined(CONFIG_CMD_NET)
#if defined(CONFIG_NET_MULTI)
WATCHDOG_RESET();
puts("Net: ");
#endif
eth_initialize(bd);
#endif

Expand Down
2 changes: 0 additions & 2 deletions arch/x86/lib/board.c
Original file line number Diff line number Diff line change
Expand Up @@ -393,10 +393,8 @@ void board_init_r(gd_t *id, ulong dest_addr)
bb_miiphy_init();
#endif
#if defined(CONFIG_CMD_NET)
#if defined(CONFIG_NET_MULTI)
WATCHDOG_RESET();
puts("Net: ");
#endif
eth_initialize(gd->bd);
#endif

Expand Down
2 changes: 0 additions & 2 deletions board/BuS/eb_cpux9k2/cpux9k2.c
Original file line number Diff line number Diff line change
Expand Up @@ -93,7 +93,6 @@ int misc_init_r(void)
uchar midx;
uchar macn6, macn7;

#ifdef CONFIG_NET_MULTI
if (getenv("ethaddr") == NULL) {
if (i2c_read(CONFIG_SYS_I2C_EEPROM_ADDR, 0x00,
CONFIG_SYS_I2C_EEPROM_ADDR_LEN,
Expand All @@ -117,7 +116,6 @@ int misc_init_r(void)
puts("Error: invalid MAC at EEPROM\n");
}
}
#endif
gd->jt[XF_do_reset] = (void *) do_reset;

#ifdef CONFIG_STATUS_LED
Expand Down
2 changes: 0 additions & 2 deletions board/cm-bf537e/cm-bf537e.c
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,6 @@ int checkboard(void)

static void board_init_enetaddr(char *var)
{
#ifdef CONFIG_NET_MULTI
uchar enetaddr[6];

if (eth_getenv_enetaddr(var, enetaddr))
Expand All @@ -35,7 +34,6 @@ static void board_init_enetaddr(char *var)
printf("Warning: %s: generating 'random' MAC address\n", var);
bfin_gen_rand_mac(enetaddr);
eth_setenv_enetaddr(var, enetaddr);
#endif
}

#ifndef CONFIG_BFIN_MAC
Expand Down
2 changes: 0 additions & 2 deletions board/cm-bf537u/cm-bf537u.c
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,6 @@ int checkboard(void)

static void board_init_enetaddr(char *var)
{
#ifdef CONFIG_NET_MULTI
uchar enetaddr[6];

if (eth_getenv_enetaddr(var, enetaddr))
Expand All @@ -35,7 +34,6 @@ static void board_init_enetaddr(char *var)
printf("Warning: %s: generating 'random' MAC address\n", var);
bfin_gen_rand_mac(enetaddr);
eth_setenv_enetaddr(var, enetaddr);
#endif
}

#ifndef CONFIG_BFIN_MAC
Expand Down
2 changes: 1 addition & 1 deletion board/evb64260/eth.c
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ Skeleton NIC driver for Etherboot
#include "eth.h"
#include "eth_addrtbl.h"

#if defined(CONFIG_CMD_NET) && defined(CONFIG_NET_MULTI)
#if defined(CONFIG_CMD_NET)

#define GT6426x_ETH_BUF_SIZE 1536

Expand Down
2 changes: 0 additions & 2 deletions board/tcm-bf537/tcm-bf537.c
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,6 @@ int checkboard(void)

static void board_init_enetaddr(char *var)
{
#ifdef CONFIG_NET_MULTI
uchar enetaddr[6];

if (eth_getenv_enetaddr(var, enetaddr))
Expand All @@ -35,7 +34,6 @@ static void board_init_enetaddr(char *var)
printf("Warning: %s: generating 'random' MAC address\n", var);
bfin_gen_rand_mac(enetaddr);
eth_setenv_enetaddr(var, enetaddr);
#endif
}

#ifndef CONFIG_BFIN_MAC
Expand Down
1 change: 0 additions & 1 deletion doc/README.m53017evb
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,6 @@ RTC_DEBUG -- define to show RTC debug message
CONFIG_CMD_DATE -- enable to use date feature in u-boot

CONFIG_MCFFEC -- define to use common CF FEC driver
CONFIG_NET_MULTI -- define to use multi FEC in u-boot
CONFIG_MII -- enable to use MII driver
CONFIG_CF_DOMII -- enable to use MII feature in cmd_mii.c
CONFIG_SYS_DISCOVER_PHY -- enable PHY discovery
Expand Down
1 change: 0 additions & 1 deletion doc/README.m5373evb
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,6 @@ RTC_DEBUG -- define to show RTC debug message
CONFIG_CMD_DATE -- enable to use date feature in u-boot

CONFIG_MCFFEC -- define to use common CF FEC driver
CONFIG_NET_MULTI -- define to use multi FEC in u-boot
CONFIG_MII -- enable to use MII driver
CONFIG_CF_DOMII -- enable to use MII feature in cmd_mii.c
CONFIG_SYS_DISCOVER_PHY -- enable PHY discovery
Expand Down
1 change: 0 additions & 1 deletion doc/README.m54455evb
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,6 @@ RTC_DEBUG -- define to show RTC debug message
CONFIG_CMD_DATE -- enable to use date feature in u-boot

CONFIG_MCFFEC -- define to use common CF FEC driver
CONFIG_NET_MULTI -- define to use multi FEC in u-boot
CONFIG_MII -- enable to use MII driver
CONFIG_CF_DOMII -- enable to use MII feature in cmd_mii.c
CONFIG_SYS_DISCOVER_PHY -- enable PHY discovery
Expand Down
1 change: 0 additions & 1 deletion doc/README.m5475evb
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,6 @@ CONFIG_SYS_UART_PORT -- define UART port number, start with 0, 1 and 2
CONFIG_BAUDRATE -- define UART baudrate

CONFIG_FSLDMAFEC -- define to use common dma FEC driver
CONFIG_NET_MULTI -- define to use multi FEC in u-boot
CONFIG_MII -- enable to use MII driver
CONFIG_CF_DOMII -- enable to use MII feature in cmd_mii.c
CONFIG_SYS_DISCOVER_PHY -- enable PHY discovery
Expand Down
1 change: 0 additions & 1 deletion doc/README.usb
Original file line number Diff line number Diff line change
Expand Up @@ -151,7 +151,6 @@ As with built-in networking, you will also want to enable some network
commands, for example:

#define CONFIG_CMD_NET
#define CONFIG_NET_MULTI
#define CONFIG_CMD_PING
#define CONFIG_CMD_DHCP

Expand Down
19 changes: 0 additions & 19 deletions doc/feature-removal-schedule.txt
Original file line number Diff line number Diff line change
Expand Up @@ -23,25 +23,6 @@ Who: Mike Frysinger <[email protected]>

---------------------------

What: CONFIG_NET_MULTI option
When: Release 2009-11

Why: U-boot currently implements two network driver APIs. New drivers with
the older-style implementation have not been accepted for a while, and
this parallel system makes the code confusing and hard to augment.

All existing in-tree boards will be converted to use CONFIG_NET_MULTI
over the span of two releases (2009-07 and 2009-09).
In the 2009-11 release, all code that is compiled when CONFIG_NET_MULTI
is not set will be removed, and all references to CONFIG_NET_MULTI
will be removed, effectively making it the only API. This should
provide ample time for out-of-tree users to adjust, and for tools on
all architectures to be made to work with weak functions.

Who: Ben Warren <[email protected]>

---------------------------

What: GPL cleanup
When: August 2009
Why: Over time, a couple of files have sneaked in into the U-Boot
Expand Down
4 changes: 0 additions & 4 deletions drivers/net/4xx_enet.c
Original file line number Diff line number Diff line change
Expand Up @@ -97,10 +97,6 @@
#error "CONFIG_MII has to be defined!"
#endif

#if defined(CONFIG_NETCONSOLE) && !defined(CONFIG_NET_MULTI)
#error "CONFIG_NET_MULTI has to be defined for NetConsole"
#endif

#define EMAC_RESET_TIMEOUT 1000 /* 1000 ms reset timeout */
#define PHY_AUTONEGOTIATE_TIMEOUT 5000 /* 5000 ms autonegotiate timeout */

Expand Down
4 changes: 2 additions & 2 deletions drivers/net/mcfmii.c
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@

DECLARE_GLOBAL_DATA_PTR;

#if defined(CONFIG_CMD_NET) && defined(CONFIG_NET_MULTI)
#if defined(CONFIG_CMD_NET)
#undef MII_DEBUG
#undef ET_DEBUG

Expand Down Expand Up @@ -330,4 +330,4 @@ int mcffec_miiphy_write(const char *devname, unsigned char addr, unsigned char r
return 0;
}

#endif /* CONFIG_CMD_NET, FEC_ENET & NET_MULTI */
#endif /* CONFIG_CMD_NET */
5 changes: 0 additions & 5 deletions drivers/net/mpc512x_fec.c
Original file line number Diff line number Diff line change
Expand Up @@ -18,9 +18,6 @@ DECLARE_GLOBAL_DATA_PTR;

#define DEBUG 0

#if defined(CONFIG_CMD_NET) && defined(CONFIG_NET_MULTI) && \
defined(CONFIG_MPC512x_FEC)

#if !(defined(CONFIG_MII) || defined(CONFIG_CMD_MII))
#error "CONFIG_MII has to be defined!"
#endif
Expand Down Expand Up @@ -755,5 +752,3 @@ int fec512x_miiphy_write(const char *devname, u8 phyAddr, u8 regAddr, u16 data)

return 0;
}

#endif /* CONFIG_MPC512x_FEC */
Loading

0 comments on commit e2a5345

Please sign in to comment.