]> git.kernelconcepts.de Git - karo-tx-uboot.git/commitdiff
net: drop !NET_MULTI code
authorMike Frysinger <vapier@gentoo.org>
Sun, 2 Oct 2011 10:01:27 +0000 (10:01 +0000)
committerWolfgang Denk <wd@denx.de>
Wed, 5 Oct 2011 20:22:16 +0000 (22:22 +0200)
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 <vapier@gentoo.org>
35 files changed:
README
api/api_net.c
arch/arm/lib/board.c
arch/avr32/lib/board.c
arch/m68k/lib/board.c
arch/mips/lib/board.c
arch/nios2/lib/board.c
arch/powerpc/cpu/mpc8220/fec.c
arch/powerpc/cpu/mpc8260/ether_fcc.c
arch/powerpc/cpu/mpc8260/ether_scc.c
arch/powerpc/cpu/mpc85xx/ether_fcc.c
arch/powerpc/cpu/ppc4xx/miiphy.c
arch/powerpc/include/asm/ppc4xx-emac.h
arch/powerpc/lib/board.c
arch/sparc/lib/board.c
arch/x86/lib/board.c
board/BuS/eb_cpux9k2/cpux9k2.c
board/cm-bf537e/cm-bf537e.c
board/cm-bf537u/cm-bf537u.c
board/evb64260/eth.c
board/tcm-bf537/tcm-bf537.c
doc/README.m53017evb
doc/README.m5373evb
doc/README.m54455evb
doc/README.m5475evb
doc/README.usb
doc/feature-removal-schedule.txt
drivers/net/4xx_enet.c
drivers/net/mcfmii.c
drivers/net/mpc512x_fec.c
include/net.h
net/eth.c
net/net.c
net/nfs.c
net/tftp.c

diff --git a/README b/README
index dfc7ada61e1e9cc418f3fd8f8648b0382ac000fa..08685316ebc4385501c115964ccaa01ed8c4179d 100644 (file)
--- a/README
+++ b/README
@@ -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
index afe072e76acec152f9bdd744efaf1e2c93e6a917..cd80ea509a0fa9ad5ba90e1850cd33adc5fbd162 100644 (file)
@@ -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
index 0efea66ba818aa29bf0a647b9094130555db0f85..705d4d2f69f4255546cce7271bd3d5271da0bb14 100644 (file)
@@ -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");
index 65473a107bc025c1882aa662ab5810711b182853..3e1cc0d6c99888aecfd5736a6de3987f871c8cdb 100644 (file)
@@ -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
 
index 1df50f1fe5478452494d9379016b08e8386131b9..b9ccb6405995baf7947066cb29e03c91c8b11229 100644 (file)
@@ -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));
index 4f85bbdab2799307641b7e9b5aed1953b0744d44..cc75d3ffa1ac830090762c2709a75f4a166f98b4 100644 (file)
@@ -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
 
index f6c6bc166b766235059d459b5a2e684e3672fe0f..65de26e5c9351229d4461588a07efd6b694519d7 100644 (file)
@@ -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
 
index 00879dff5c95058462eeef50231c689582943097..bcda8a2b277c23ab6e2d4b2127ba306b15d7662b 100644 (file)
@@ -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!"
index b05f5762e535a23f924d0503728c271f8aaf7429..879ec0ea2318ad62f76c5c57d1fee8fe638ecee9 100644 (file)
@@ -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
 {
index 2870a9cf94998242760d90839311c9af861586ae..1c040f0f5b09958233ab51611ba13ebd5c5dee02 100644 (file)
 #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
index f69b2e649f344ca2227c57508dc9f729d8b4749b..41c3c84ae5c5df95457fccea57f7fe4da4c22a58 100644 (file)
@@ -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
 {
index 9f8f8fa18ceb9c1c4eb0a473d73eb35319a36ec0..297155fdafa064b955e53e9832de93bfb0cfb85b 100644 (file)
@@ -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;
 
@@ -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;
 
index 25a0512b74085a10d64488ec0590773790580793..a219fa97fa98745d062a1ac607f3113f0fcebae9 100644 (file)
@@ -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
index 9885b143ac244f5024ac8eeaa6efc0c6dd83673b..4fd01498052331b41d4e73a991d1cd43782f7dc4 100644 (file)
@@ -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
 
index 6b705e531900686a599c51fe9e08deea2b59a0ae..af4f0356a46f6e4afce10527922a6187942759ec 100644 (file)
@@ -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
 
index b1b8680ec772d5319a7e109e9856471e78c6d2da..2309e00be1cce94cff44c08a6e03669c86beafdc 100644 (file)
@@ -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
 
index 856d798a31e947edbe33eef52c41b348d9536dfc..54f9b64389fea9382b831f066a592e59f393d93e 100644 (file)
@@ -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,
@@ -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
index 38dbc6e7322a4fe366bc882612917369055ee861..8daf3ad06e875fe64ecab3fa50fb01dfff7d6de0 100644 (file)
@@ -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))
@@ -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
index a62ddd62b688b7bf6f06a01482dd18c68c4b7a88..5941b5fcbe00a85a7b9df65ef0c10eab1f057d15 100644 (file)
@@ -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))
@@ -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
index 352505a51f2c78bf927d88fe0ff4663066903562..1492ffce900f053d73c0ac6cbc8416f6ac343e01 100644 (file)
@@ -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
 
index 004e0d9bb121f7927df41c171df8a45a1c85d756..38aaae6870bdacf779a3b7ad9787544f21d1d10d 100644 (file)
@@ -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))
@@ -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
index 42798c20009fb4cea7977389bc5d48a578ad1e75..64a3d42f0ce31c4b875e7c38b42754a9bcf8bf9c 100644 (file)
@@ -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
index 62166712dc308ca942cadef54dde160beac0dcd3..419d4d6d1ec38942cf64f75890e95b8c9a59943c 100644 (file)
@@ -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
index 918a746eb888ecbefc41fee4405c725b58f57c7f..2bc6ce4bf3777bb41bf53b2ab77eb4be3f809b3b 100644 (file)
@@ -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
index f5658ea486b39f189fb77fff3713a356e542c327..d3aec20e4f15c64c3780829d0974f9baf3c17da9 100644 (file)
@@ -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
index 0771c71a850bb35a315484701be19371640ec28d..c4df9cd0512d203988cd33d27a9248301d9c67a8 100644 (file)
@@ -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
 
index 13d7d9aaa1bcfccdb1a507a271b88b70a17cf413..00d87e44123e0a2c03b426cb26d47fefb2bbc652 100644 (file)
@@ -23,25 +23,6 @@ Who: Mike Frysinger <vapier@gentoo.org>
 
 ---------------------------
 
-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 <biggerbadderben@gmail.com>
-
----------------------------
-
 What:  GPL cleanup
 When:  August 2009
 Why:   Over time, a couple of files have sneaked in into the U-Boot
index 07170f6831e32621d7b02f1c325bf02b4cba2e19..9ab5c8028c0bc7dff770e03cb056e94694709336 100644 (file)
 #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 */
 
index f959c00ca78c7fbdf3b4b10a261de2cc6a015307..471c5efea1dd1018cd543fd44cb0dd41e8776829 100644 (file)
@@ -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
 
@@ -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 */
index f56d940f915adeca9a305376079be12c166a0fc3..0d5efd56eab13898e5ed0c12461a94e56957aaad 100644 (file)
@@ -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
@@ -755,5 +752,3 @@ int fec512x_miiphy_write(const char *devname, u8 phyAddr, u8 regAddr, u16 data)
 
        return 0;
 }
-
-#endif /* CONFIG_MPC512x_FEC */
index ce54825085569a29c7242958a06956882b6138d6..d5d37b6506b05989f37d31cb08676edbab47fda1 100644 (file)
 
 #if defined(CONFIG_8xx)
 #include <commproc.h>
-# if !defined(CONFIG_NET_MULTI)
-#  if defined(FEC_ENET) || defined(SCC_ENET)
-#   define CONFIG_NET_MULTI
-#  endif
-# endif
 #endif /* CONFIG_8xx */
 
-#if defined(CONFIG_MPC5xxx)
-# if !defined(CONFIG_NET_MULTI)
-#  if defined(CONFIG_MPC5xxx_FEC)
-#   define CONFIG_NET_MULTI
-#  endif
-# endif
-#endif /* CONFIG_MPC5xxx */
-
-#if !defined(CONFIG_NET_MULTI) && defined(CONFIG_CPM2)
-#include <config.h>
-#if defined(CONFIG_ETHER_ON_FCC)
-#if defined(CONFIG_ETHER_ON_SCC)
-#error "Ethernet not correctly defined"
-#endif /* CONFIG_ETHER_ON_SCC */
-#define CONFIG_NET_MULTI
-#if (CONFIG_ETHER_INDEX == 1)
-#define        CONFIG_ETHER_ON_FCC1
-# define CONFIG_SYS_CMXFCR_MASK1       CONFIG_SYS_CMXFCR_MASK
-# define CONFIG_SYS_CMXFCR_VALUE1      CONFIG_SYS_CMXFCR_VALUE
-#elif (CONFIG_ETHER_INDEX == 2)
-#define        CONFIG_ETHER_ON_FCC2
-# define CONFIG_SYS_CMXFCR_MASK2       CONFIG_SYS_CMXFCR_MASK
-# define CONFIG_SYS_CMXFCR_VALUE2      CONFIG_SYS_CMXFCR_VALUE
-#elif (CONFIG_ETHER_INDEX == 3)
-#define        CONFIG_ETHER_ON_FCC3
-# define CONFIG_SYS_CMXFCR_MASK3       CONFIG_SYS_CMXFCR_MASK
-# define CONFIG_SYS_CMXFCR_VALUE3      CONFIG_SYS_CMXFCR_VALUE
-#endif /* CONFIG_ETHER_INDEX */
-#endif /* CONFIG_ETHER_ON_FCC */
-#endif /* !CONFIG_NET_MULTI && CONFIG_8260 */
-
 #include <asm/byteorder.h>     /* for nton* / ntoh* stuff */
 
 
@@ -118,9 +82,7 @@ struct eth_device {
 extern int eth_initialize(bd_t *bis);  /* Initialize network subsystem */
 extern int eth_register(struct eth_device* dev);/* Register network device */
 extern void eth_try_another(int first_restart);        /* Change the device */
-#ifdef CONFIG_NET_MULTI
 extern void eth_set_current(void);             /* set nterface to ethcur var */
-#endif
 extern struct eth_device *eth_get_dev(void);   /* get the current device MAC */
 extern struct eth_device *eth_get_dev_by_name(const char *devname);
 extern struct eth_device *eth_get_dev_by_index(int index); /* get dev @ index */
@@ -383,9 +345,7 @@ extern int          NetState;               /* Network loop state           */
 #define NETLOOP_SUCCESS                3
 #define NETLOOP_FAIL           4
 
-#ifdef CONFIG_NET_MULTI
 extern int             NetRestartWrap;         /* Tried all network devices    */
-#endif
 
 typedef enum { BOOTP, RARP, ARP, TFTP, DHCP, PING, DNS, NFS, CDP, NETCONS, SNTP,
               TFTPSRV } proto_t;
index fba3c1fdf8f99d79aa00b48452975376a459ad30..4280d6dbe77eff5f7e19e445f2a32ad75242e734 100644 (file)
--- a/net/eth.c
+++ b/net/eth.c
@@ -62,8 +62,6 @@ int eth_getenv_enetaddr_by_index(const char *base_name, int index,
        return eth_getenv_enetaddr(enetvar, enetaddr);
 }
 
-#ifdef CONFIG_NET_MULTI
-
 static int eth_mac_skip(int index)
 {
        char enetvar[15];
@@ -172,23 +170,18 @@ int eth_get_dev_index (void)
 
 static void eth_current_changed(void)
 {
-#ifdef CONFIG_NET_MULTI
-       {
-               char *act = getenv("ethact");
-               /* update current ethernet name */
-               if (eth_current)
-               {
-                       if (act == NULL || strcmp(act, eth_current->name) != 0)
-                               setenv("ethact", eth_current->name);
-               }
-               /*
-                * remove the variable completely if there is no active
-                * interface
-                */
-               else if (act != NULL)
-                       setenv("ethact", NULL);
+       char *act = getenv("ethact");
+       /* update current ethernet name */
+       if (eth_current) {
+               if (act == NULL || strcmp(act, eth_current->name) != 0)
+                       setenv("ethact", eth_current->name);
        }
-#endif
+       /*
+        * remove the variable completely if there is no active
+        * interface
+        */
+       else if (act != NULL)
+               setenv("ethact", NULL);
 }
 
 int eth_write_hwaddr(struct eth_device *dev, const char *base_name,
@@ -535,23 +528,3 @@ char *eth_get_name (void)
 {
        return (eth_current ? eth_current->name : "unknown");
 }
-
-#else /* !CONFIG_NET_MULTI */
-
-#warning Ethernet driver is deprecated.  Please update to use CONFIG_NET_MULTI
-
-extern int mcf52x2_miiphy_initialize(bd_t *bis);
-
-
-int eth_initialize(bd_t *bis)
-{
-#if defined(CONFIG_MII) || defined(CONFIG_CMD_MII)
-       miiphy_init();
-#endif
-
-#if defined(CONFIG_MCF52x2)
-       mcf52x2_miiphy_initialize(bis);
-#endif
-       return 0;
-}
-#endif
index 7a6058339cccaf8a21879a685c837a0a10fc5695..5e67886b6806d98b7fc000ae8c996d6dfe2003cd 100644 (file)
--- a/net/net.c
+++ b/net/net.c
@@ -169,14 +169,12 @@ uchar             NetCDPAddr[6] = { 0x01, 0x00, 0x0c, 0xcc, 0xcc, 0xcc };
 #endif
 /* Network loop state */
 int            NetState;
-#ifdef CONFIG_NET_MULTI
 /* Tried all network devices */
 int            NetRestartWrap;
 /* Network loop restarted */
 static int     NetRestarted;
 /* At least one device configured */
 static int     NetDevExists;
-#endif
 
 /* XXX in both little & big endian machines 0xFFFF == ntohs(-1) */
 /* default is without VLAN */
@@ -347,10 +345,8 @@ NetLoop(proto_t protocol)
 {
        bd_t *bd = gd->bd;
 
-#ifdef CONFIG_NET_MULTI
        NetRestarted = 0;
        NetDevExists = 0;
-#endif
 
        /* XXX problem with bss workaround */
        NetArpWaitPacketMAC = NULL;
@@ -379,20 +375,14 @@ NetLoop(proto_t protocol)
        }
 
        eth_halt();
-#ifdef CONFIG_NET_MULTI
        eth_set_current();
-#endif
        if (eth_init(bd) < 0) {
                eth_halt();
                return -1;
        }
 
 restart:
-#ifdef CONFIG_NET_MULTI
        memcpy(NetOurEther, eth_get_dev()->enetaddr, 6);
-#else
-       eth_getenv_enetaddr("ethaddr", NetOurEther);
-#endif
 
        NetState = NETLOOP_CONTINUE;
 
@@ -409,16 +399,12 @@ restart:
                eth_halt();
                return -1;
 
-#ifdef CONFIG_NET_MULTI
        case 2:
                /* network device not configured */
                break;
-#endif /* CONFIG_NET_MULTI */
 
        case 0:
-#ifdef CONFIG_NET_MULTI
                NetDevExists = 1;
-#endif
                switch (protocol) {
                case TFTP:
                        /* always use ARP to get server ethernet address */
@@ -562,9 +548,7 @@ restart:
                switch (NetState) {
 
                case NETLOOP_RESTART:
-#ifdef CONFIG_NET_MULTI
                        NetRestarted = 1;
-#endif
                        goto restart;
 
                case NETLOOP_SUCCESS:
@@ -630,10 +614,6 @@ void NetStartAgain(void)
 
        NetTryCount++;
 
-#ifndef CONFIG_NET_MULTI
-       NetSetTimeout(10000UL, startAgainTimeout);
-       NetSetHandler(startAgainHandler);
-#else  /* !CONFIG_NET_MULTI*/
        eth_halt();
 #if !defined(CONFIG_NET_DO_NOT_TRY_ANOTHER)
        eth_try_another(!NetRestarted);
@@ -650,7 +630,6 @@ void NetStartAgain(void)
        } else {
                NetState = NETLOOP_RESTART;
        }
-#endif /* CONFIG_NET_MULTI */
 }
 
 /**********************************************************************/
@@ -816,9 +795,7 @@ PingHandler(uchar *pkt, unsigned dest, IPaddr_t sip, unsigned src,
 
 static void PingStart(void)
 {
-#if defined(CONFIG_NET_MULTI)
        printf("Using %s device\n", eth_get_name());
-#endif /* CONFIG_NET_MULTI */
        NetSetTimeout(10000UL, PingTimeout);
        NetSetHandler(PingHandler);
 
@@ -1168,9 +1145,7 @@ CDPHandler(const uchar *pkt, unsigned len)
 
 static void CDPStart(void)
 {
-#if defined(CONFIG_NET_MULTI)
        printf("Using %s device\n", eth_get_name());
-#endif
        CDPSeq = 0;
        CDPOK = 0;
 
@@ -1810,7 +1785,6 @@ common:
        case CDP:
        case DHCP:
                if (memcmp(NetOurEther, "\0\0\0\0\0\0", 6) == 0) {
-#ifdef CONFIG_NET_MULTI
                        extern int eth_get_dev_index(void);
                        int num = eth_get_dev_index();
 
@@ -1829,10 +1803,6 @@ common:
 
                        NetStartAgain();
                        return 2;
-#else
-                       puts("*** ERROR: `ethaddr' not set\n");
-                       return 1;
-#endif
                }
                /* Fall through */
        default:
index f76f60d16270ba3b7de637c4455c53a38cbc2468..5e717e3c6d63221569ce94210afd5197dcd041db 100644 (file)
--- a/net/nfs.c
+++ b/net/nfs.c
@@ -714,9 +714,7 @@ NfsStart (void)
        nfs_filename = basename (nfs_path);
        nfs_path     = dirname (nfs_path);
 
-#if defined(CONFIG_NET_MULTI)
        printf ("Using %s device\n", eth_get_name());
-#endif
 
        printf("File transfer via NFS from server %pI4"
                "; our IP address is %pI4", &NfsServerIP, &NetOurIP);
index a893e020fd618f7d26d5966182f6e84c6b9badd1..da8eeaa58de179195e1151f95361269859cc9101 100644 (file)
@@ -615,9 +615,7 @@ TftpStart(void)
                }
        }
 
-#if defined(CONFIG_NET_MULTI)
        printf("Using %s device\n", eth_get_name());
-#endif
        printf("TFTP from server %pI4"
                "; our IP address is %pI4", &TftpRemoteIP, &NetOurIP);
 
@@ -687,9 +685,7 @@ TftpStartServer(void)
 {
        tftp_filename[0] = 0;
 
-#if defined(CONFIG_NET_MULTI)
        printf("Using %s device\n", eth_get_name());
-#endif
        printf("Listening for TFTP transfer on %pI4\n", &NetOurIP);
        printf("Load address: 0x%lx\n", load_addr);