]> git.sur5r.net Git - u-boot/commitdiff
net ppc: fix ethernet device names with spaces
authorHeiko Schocher <heiko.schocher@invitel.hu>
Tue, 20 Jul 2010 15:45:02 +0000 (17:45 +0200)
committerBen Warren <biggerbadderben@gmail.com>
Mon, 9 Aug 2010 18:52:28 +0000 (11:52 -0700)
since commit 1384f3bb8a4f9066805b70c1418eda78ecb73fdd ethernet names
with spaces drop a

Warning: eth device name has a space!

message. This patch fix it for:

- "FEC ETHERNET" devices found on
  mpc512x, mpc5xxx, mpc8xx and mpc8220 boards.
  renamed to "FEC".
- "SCC ETHERNET" devices found on
  mpc8xx, mpc82xx based boards. Renamed to "SCC".
- "HDLC ETHERNET" devices found on mpc8xx boards
  Renamed to "HDLC"
- "FCC ETHERNET" devices found on mpc8260 and mpc85xx based
  boards. Renamed to "FCC"

Tested on the kup4k board.

Signed-off-by: Heiko Schocher <hs@denx.de>
Signed-off-by: Ben Warren <biggerbadderben@gmail.com>
34 files changed:
README
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/mpc8xx/fec.c
arch/powerpc/cpu/mpc8xx/scc.c
board/freescale/mpc8560ads/mpc8560ads.c
board/funkwerk/vovpn-gw/vovpn-gw.c
board/keymile/common/keymile_hdlc_enet.c
board/keymile/km8xx/km8xx_hdlc_enet.c
board/motionpro/motionpro.c
board/sbc8560/sbc8560.c
board/stx/stxgp3/stxgp3.c
board/stx/stxssa/stxssa.c
board/stx/stxxtc/stxxtc.c
board/tqc/tqm8xx/tqm8xx.c
doc/uImage.FIT/howto.txt
drivers/net/mpc512x_fec.c
include/configs/NSCU.h
include/configs/TK885D.h
include/configs/TQM855L.h
include/configs/TQM855M.h
include/configs/TQM860L.h
include/configs/TQM860M.h
include/configs/TQM862L.h
include/configs/TQM862M.h
include/configs/TQM866M.h
include/configs/TQM885D.h
include/configs/ep82xxm.h
include/configs/idmr.h
include/configs/keymile-common.h
include/configs/km8xx.h
include/configs/v38b.h

diff --git a/README b/README
index b6bf451400e9e0f94497d9e08b02e4fd51174a8b..ccaace797f125f6b971451f5797684a510e44db3 100644 (file)
--- a/README
+++ b/README
@@ -3158,10 +3158,10 @@ List of environment variables (most likely not complete):
                  interface is currently active. For example you
                  can do the following
 
-                 => setenv ethact FEC ETHERNET
-                 => ping 192.168.0.1 # traffic sent on FEC ETHERNET
-                 => setenv ethact SCC ETHERNET
-                 => ping 10.0.0.1 # traffic sent on SCC ETHERNET
+                 => setenv ethact FEC
+                 => ping 192.168.0.1 # traffic sent on FEC
+                 => setenv ethact SCC
+                 => ping 10.0.0.1 # traffic sent on SCC
 
   ethrotate    - When set to "no" U-Boot does not go through all
                  available network interfaces.
index 5df973533287955839ffafb7991a8d17fe720a7f..9a6d434dba6e544eefcabf91a60367bde0ab2392 100644 (file)
@@ -840,7 +840,7 @@ int mpc8220_fec_initialize (bd_t * bis)
        dev->send = mpc8220_fec_send;
        dev->recv = mpc8220_fec_recv;
 
-       sprintf (dev->name, "FEC ETHERNET");
+       sprintf (dev->name, "FEC");
        eth_register (dev);
 
 #if defined(CONFIG_MII) || defined(CONFIG_CMD_MII)
index 5ac02a09c025b5132bd44dd4ea7c180e0371abea..c82958db1b69a920dddcbd8c84222dbd2fe809d6 100644 (file)
@@ -383,7 +383,7 @@ int fec_initialize(bd_t *bis)
                dev = (struct eth_device*) malloc(sizeof *dev);
                memset(dev, 0, sizeof *dev);
 
-               sprintf(dev->name, "FCC%d ETHERNET",
+               sprintf(dev->name, "FCC%d",
                        ether_fcc_info[i].ether_index + 1);
                dev->priv   = &ether_fcc_info[i];
                dev->init   = fec_init;
index 432111df4cd6ef152b22b0ab80974ae4551e4af0..2870a9cf94998242760d90839311c9af861586ae 100644 (file)
@@ -375,7 +375,7 @@ int mpc82xx_scc_enet_initialize(bd_t *bis)
        dev = (struct eth_device *) malloc(sizeof *dev);
        memset(dev, 0, sizeof *dev);
 
-       sprintf(dev->name, "SCC ETHERNET");
+       sprintf(dev->name, "SCC");
        dev->init   = sec_init;
        dev->halt   = sec_halt;
        dev->send   = sec_send;
index 5f1414d7581f22d693a55f4c12f58989fe8a79de..f69b2e649f344ca2227c57508dc9f729d8b4749b 100644 (file)
@@ -446,7 +446,7 @@ int fec_initialize(bd_t *bis)
                dev = (struct eth_device*) malloc(sizeof *dev);
                memset(dev, 0, sizeof *dev);
 
-               sprintf(dev->name, "FCC%d ETHERNET",
+               sprintf(dev->name, "FCC%d",
                        ether_fcc_info[i].ether_index + 1);
                dev->priv   = &ether_fcc_info[i];
                dev->init   = fec_init;
index 89c1ff939d2a7c7279732b467d79a1c104e1de4b..754f8db9ed1f8d7f03a339cc6e687f4774e88b7e 100644 (file)
@@ -164,9 +164,9 @@ int fec_initialize(bd_t *bis)
                /* for FEC1 make sure that the name of the interface is the same
                   as the old one for compatibility reasons */
                if (i == 0) {
-                       sprintf (dev->name, "FEC ETHERNET");
+                       sprintf (dev->name, "FEC");
                } else {
-                       sprintf (dev->name, "FEC%d ETHERNET",
+                       sprintf (dev->name, "FEC%d",
                                ether_fcc_info[i].ether_index + 1);
                }
 
index effb967e3254d24d819280ce225e04c879304db4..e376c64d52706b74645a462c00b7e05ff82057d1 100644 (file)
@@ -77,7 +77,7 @@ int scc_initialize(bd_t *bis)
        dev = (struct eth_device*) malloc(sizeof *dev);
        memset(dev, 0, sizeof *dev);
 
-       sprintf(dev->name, "SCC ETHERNET");
+       sprintf(dev->name, "SCC");
        dev->iobase = 0;
        dev->priv   = 0;
        dev->init   = scc_init;
index 489f90b14be2c7133ccee8f36df60227fbee8157..423e9d72a761b56b8b024c1190fc832a411a354f 100644 (file)
@@ -236,7 +236,7 @@ void reset_phy (void)
 #endif
 #if defined(CONFIG_MII) && defined(CONFIG_ETHER_ON_FCC)
        /* reset PHY */
-       miiphy_reset("FCC1 ETHERNET", 0x0);
+       miiphy_reset("FCC1", 0x0);
 
        /* change PHY address to 0x02 */
        bb_miiphy_write(NULL, 0, PHY_MIPSCR, 0xf028);
index 889ba3f07441d303e06a48abd65d77c42bf11270..e856adaee50e39c294903c7d17ebc7fc8b3cf2a7 100644 (file)
@@ -198,7 +198,7 @@ void reset_phy (void)
        iop->pdat |= 0x00080000;
        for (i=0; i<100; i++) {
                udelay(20000);
-               if (bb_miiphy_read("FCC1 ETHERNET", CONFIG_SYS_PHY_ADDR,2,&val ) == 0) {
+               if (bb_miiphy_read("FCC1", CONFIG_SYS_PHY_ADDR,2,&val ) == 0) {
                        break;
                }
        }
index ce5e4d6a45ed502aedfff600fe85272cadef1c99..a545211d1942538cb20aa54719a48c45f42e24ad 100644 (file)
@@ -40,7 +40,7 @@ extern char keymile_slot;     /* our slot number in the backplane */
 #define TOUT_LOOP      50000
 
 /*
- * Since, except during initialization, ethact is always HDLC ETHERNET
+ * Since, except during initialization, ethact is always HDLC
  * while we're in the driver, just use serial_printf() everywhere for
  * output.  This avoids possible conflicts when netconsole is being
  * used.
@@ -124,7 +124,7 @@ int keymile_hdlc_enet_initialize(bd_t *bis)
        seth = dev;
 #endif
 
-       sprintf(dev->name, "HDLC ETHERNET");
+       sprintf(dev->name, "HDLC");
        dev->init   = keymile_hdlc_enet_init;
        dev->halt   = keymile_hdlc_enet_halt;
        dev->send   = keymile_hdlc_enet_send;
index 04782884e43ed149e49b98d94e66a38656fa705a..ca00576925c4a5f8891b534b3bcb8dcf3449d84b 100644 (file)
@@ -34,7 +34,7 @@
 char keymile_slot;     /* our slot number in the backplane */
 
 /*
- * Since, except during initialization, ethact is always HDLC ETHERNET
+ * Since, except during initialization, ethact is always HDLC
  * while we're in the driver, just use serial_printf() everywhere for
  * output.  This avoids possible conflicts when netconsole is being
  * used.
index b3692190b999ce08350ae8aaa91331d1a3ba2f0c..47ef6e53eda2b5ae3958073f0135fe8265bfa6b9 100644 (file)
@@ -90,8 +90,8 @@ void reset_phy(void)
 {
        unsigned short mode_control;
 
-       miiphy_read("FEC ETHERNET", CONFIG_PHY_ADDR, 0x15, &mode_control);
-       miiphy_write("FEC ETHERNET", CONFIG_PHY_ADDR, 0x15,
+       miiphy_read("FEC", CONFIG_PHY_ADDR, 0x15, &mode_control);
+       miiphy_write("FEC", CONFIG_PHY_ADDR, 0x15,
                        mode_control & 0xfffe);
        return;
 }
index 10ba62fa4938a99a858f9adc967c2de870568b99..77abde5d41d0a9876cd41d331b4874916b8fdc7a 100644 (file)
@@ -225,7 +225,7 @@ void reset_phy (void)
 #endif
 #if defined(CONFIG_MII) && defined(CONFIG_ETHER_ON_FCC)
        /* reset PHY */
-       miiphy_reset("FCC1 ETHERNET", 0x0);
+       miiphy_reset("FCC1", 0x0);
 
        /* change PHY address to 0x02 */
        bb_miiphy_write(NULL, 0, PHY_MIPSCR, 0xf028);
index 3804fe080044919fbd3c676a14e2eeddfccbacba..25d52117009d46b02734ecd983b82f5ef6f7e5d7 100644 (file)
@@ -239,7 +239,7 @@ reset_phy(void)
 #endif
 #if defined(CONFIG_MII) && defined(CONFIG_ETHER_ON_FCC)
        /* reset PHY */
-       miiphy_reset("FCC1 ETHERNET", 0x0);
+       miiphy_reset("FCC1", 0x0);
 
        /* change PHY address to 0x02 */
        bb_miiphy_write(NULL, 0, PHY_MIPSCR, 0xf028);
index 0b2584c6b1c572794271b7ced8f83b995f397854..1e0acab5464ea6844b38791bc2ea57c55b111c83 100644 (file)
@@ -238,7 +238,7 @@ reset_phy(void)
 #endif
 #if defined(CONFIG_MII) && defined(CONFIG_ETHER_ON_FCC)
        /* reset PHY */
-       miiphy_reset("FCC1 ETHERNET", 0x0);
+       miiphy_reset("FCC1", 0x0);
 
        /* change PHY address to 0x02 */
        bb_miiphy_write(NULL, 0, PHY_MIPSCR, 0xf028);
index 717dbe20846b5b77eefb41578713b536a87dadef..6693a7051b268d846c7058ec4496e69e4a0348fc 100644 (file)
@@ -481,12 +481,12 @@ void reset_phys(void)
        mii_init();
 
        for (phyno = 0; phyno < 32; ++phyno) {
-               miiphy_read("FEC ETHERNET", phyno, PHY_PHYIDR1, &v);
+               miiphy_read("FEC", phyno, PHY_PHYIDR1, &v);
                if (v == 0xFFFF)
                        continue;
-               miiphy_write("FEC ETHERNET", phyno, PHY_BMCR, PHY_BMCR_POWD);
+               miiphy_write("FEC", phyno, PHY_BMCR, PHY_BMCR_POWD);
                udelay(10000);
-               miiphy_write("FEC ETHERNET", phyno, PHY_BMCR, PHY_BMCR_RESET | PHY_BMCR_AUTON);
+               miiphy_write("FEC", phyno, PHY_BMCR, PHY_BMCR_RESET | PHY_BMCR_AUTON);
                udelay(10000);
        }
 }
index 53f79e8b80f6429ba76a65f0f38d3a6b53b6d0aa..cde780b2df126a72f1bd996f8f6ed185526f5c9f 100644 (file)
@@ -745,13 +745,13 @@ int last_stage_init(void)
                return 0;
 
        for (i = 0; i < 2; i++) {
-               ret = miiphy_read("FEC ETHERNET", phy[i], PHY_BMCR, &reg);
+               ret = miiphy_read("FEC", phy[i], PHY_BMCR, &reg);
                if (ret) {
                        printf("Cannot read BMCR on PHY %d\n", phy[i]);
                        return 0;
                }
                /* Auto-negotiation off, hard set full duplex, 100Mbps */
-               ret = miiphy_write("FEC ETHERNET", phy[i],
+               ret = miiphy_write("FEC", phy[i],
                                   PHY_BMCR, (reg | PHY_BMCR_100MB |
                                              PHY_BMCR_DPLX) & ~PHY_BMCR_AUTON);
                if (ret) {
index 8065e9e1d8d4d65a9b5fe0fce08d3709183d0ee4..59e21e91e3471a177d8c0eb2c727b4e8584ac730 100644 (file)
@@ -93,7 +93,7 @@ nfsargs=setenv bootargs root=/dev/nfs rw nfsroot=${serverip}:${rootpath}
 addip=setenv bootargs ${bootargs} ip=${ipaddr}:${serverip}:${gatewayip}:${netmask}:${hostname}:${netdev}:off panic=1
 => run nfsargs addip
 => tftp 900000 /path/to/tftp/location/kernel.itb
-Using FEC ETHERNET device
+Using FEC device
 TFTP from server 192.168.1.1; our IP address is 192.168.160.5
 Filename '/path/to/tftp/location/kernel.itb'.
 Load address: 0x900000
@@ -207,7 +207,7 @@ inspected and booted:
 
 [on the target system]
 => tftp 900000 /path/to/tftp/location/kernel_fdt.itb
-Using FEC ETHERNET device
+Using FEC device
 TFTP from server 192.168.1.1; our IP address is 192.168.160.5
 Filename '/path/to/tftp/location/kernel_fdt.itb'.
 Load address: 0x900000
index c580c827a6e8b1c173e089a340a1f0a2c7e93b77..6ea4a2b342f0023c301c05f04d22694bb9b4bc24 100644 (file)
@@ -637,7 +637,7 @@ int mpc512x_fec_initialize (bd_t * bis)
        dev->send = mpc512x_fec_send;
        dev->recv = mpc512x_fec_recv;
 
-       sprintf (dev->name, "FEC ETHERNET");
+       sprintf (dev->name, "FEC");
        eth_register (dev);
 
 #if defined(CONFIG_MII) || defined(CONFIG_CMD_MII)
index 5724f45a8d3c9edba53a61ba90e66ec8a53fe918..6a4c47d8887b0b6b8fef9fb9655408b7e039d311 100644 (file)
 
 #undef CONFIG_SCC1_ENET
 #define CONFIG_FEC_ENET
-/* #define CONFIG_ETHPRIME             "FEC ETHERNET" */
 
 /* pass open firmware flat tree */
 #define CONFIG_OF_LIBFDT       1
index 0df1b6e0425acf2a493717f9e645b4138e5e43e2..7cefa32d7a1b7d7667accf8dcb509f1cdf63ed24 100644 (file)
@@ -65,8 +65,8 @@
 #undef CONFIG_BOOTARGS
 
 #define CONFIG_EXTRA_ENV_SETTINGS                                      \
-       "ethprime=FEC ETHERNET\0"                                       \
-       "ethact=FEC ETHERNET\0"                                         \
+       "ethprime=FEC\0"                                                \
+       "ethact=FEC\0"                                                  \
        "netdev=eth0\0"                                                 \
        "nfsargs=setenv bootargs root=/dev/nfs rw "                     \
                "nfsroot=${serverip}:${rootpath}\0"                     \
 #define CONFIG_MII_INIT        1
 
 #define CONFIG_NET_RETRY_COUNT 3
-#define CONFIG_ETHPRIME                "FEC ETHERNET"
+#define CONFIG_ETHPRIME                "FEC"
 
 /* pass open firmware flat tree */
 #define CONFIG_OF_LIBFDT       1
index 32a7e79a4bfa3866f06a15a615f4a99c87376acc..5bf8f0239d12614a93b7d048d436fe2173266d39 100644 (file)
 
 #define CONFIG_SCC1_ENET
 #define CONFIG_FEC_ENET
-#define CONFIG_ETHPRIME                "SCC ETHERNET"
+#define CONFIG_ETHPRIME                "SCC"
 
 /* pass open firmware flat tree */
 #define CONFIG_OF_LIBFDT       1
index 4f44be31bba59f060e3ac0b2fb82ffcda9324297..456ed7e473501c3f8ed21d9749f2f60855cb96d0 100644 (file)
 
 #define CONFIG_SCC1_ENET
 #define CONFIG_FEC_ENET
-#define CONFIG_ETHPRIME                "SCC ETHERNET"
+#define CONFIG_ETHPRIME                "SCC"
 
 /* pass open firmware flat tree */
 #define CONFIG_OF_LIBFDT       1
index e86fe5ef9636c06d332fdcb6e3ca934404a8f591..94b9a3b1ebc01578a775f205c7b6849ee0cd0438 100644 (file)
 
 #define CONFIG_SCC1_ENET
 #define CONFIG_FEC_ENET
-#define CONFIG_ETHPRIME                "SCC ETHERNET"
+#define CONFIG_ETHPRIME                "SCC"
 
 /* pass open firmware flat tree */
 #define CONFIG_OF_LIBFDT       1
index 4fd873b1bda248c1b8629a1df3ef704259fe2df6..ce5e6917c798a5b8aac23c0b5b20e2a4c715c357 100644 (file)
 
 #define CONFIG_SCC1_ENET
 #define CONFIG_FEC_ENET
-#define CONFIG_ETHPRIME                "SCC ETHERNET"
+#define CONFIG_ETHPRIME                "SCC"
 
 /* pass open firmware flat tree */
 #define CONFIG_OF_LIBFDT       1
index 0c966c9e0c143ddaf03131cbcf43b95b4ceae083..d77df9cad204081ed5eb7a583a8c0bb6d489c22f 100644 (file)
 #define CONFIG_NET_MULTI
 #define CONFIG_SCC1_ENET
 #define CONFIG_FEC_ENET
-#define CONFIG_ETHPRIME                "SCC ETHERNET"
+#define CONFIG_ETHPRIME                "SCC"
 
 /* pass open firmware flat tree */
 #define CONFIG_OF_LIBFDT       1
index 178e6e2137900539132e47325e90f542ff2a8e3a..a6c465b31864ea6686b832ad136f48e5ff336c13 100644 (file)
 #define CONFIG_NET_MULTI
 #define CONFIG_SCC1_ENET
 #define CONFIG_FEC_ENET
-#define CONFIG_ETHPRIME                "SCC ETHERNET"
+#define CONFIG_ETHPRIME                "SCC"
 
 /* pass open firmware flat tree */
 #define CONFIG_OF_LIBFDT       1
index a65946deb2bd11141e512a6462e3e293f6674ce4..9ec815c6004265cabe9cd11b5e210c82fbc57758 100644 (file)
 
 #define CONFIG_SCC1_ENET
 #define CONFIG_FEC_ENET
-#define CONFIG_ETHPRIME                "SCC ETHERNET"
+#define CONFIG_ETHPRIME                "SCC"
 
 /* pass open firmware flat tree */
 #define CONFIG_OF_LIBFDT       1
index 0fc4b69acf3dc5f54c55a6f582bb9130d51db05f..c715c0783eb7bcbdfcc9a5d7ef2ef71b50191937 100644 (file)
                                           switching to another netwok (if the
                                           tried network is unreachable) */
 
-#define CONFIG_ETHPRIME                "SCC ETHERNET"
+#define CONFIG_ETHPRIME                "SCC"
 
 /* pass open firmware flat tree */
 #define CONFIG_OF_LIBFDT       1
index c737f10ec91193f454470b581457889a3b07ae19..b52b94179f14067bb08d70bdb1dcea8067828b49 100644 (file)
 #define CONFIG_BOOTDELAY       5       /* autoboot after 5 seconds */
 #define CONFIG_ENV_IN_OWN_SECT 1
 #define CONFIG_AUTO_COMPLETE   1
-#define        CONFIG_EXTRA_ENV_SETTINGS       "ethprime=FCC3 ETHERNET"
+#define        CONFIG_EXTRA_ENV_SETTINGS       "ethprime=FCC3"
 
 #if defined(CONFIG_CMD_KGDB)
 #undef CONFIG_KGDB_ON_SMC              /* define if kgdb on SMC */
index 61e3bad4f38c361d65820de63768230dc09414d0..8105876e4ead49843dbf095548c1d60f48958bc8 100644 (file)
@@ -74,7 +74,7 @@
        "net_nfs=tftp 200000 $(bootfile);run nfsargs addip;bootm\0"     \
        "nfsargs=setenv bootargs root=/dev/nfs rw "                     \
                "nfsroot=$(serverip):$(rootpath)\0"                     \
-       "ethact=FEC ETHERNET\0"                                         \
+       "ethact=FEC\0   "                                               \
        "update=prot off ff800000 ff81ffff; era ff800000 ff81ffff; "    \
                "cp.b 200000 ff800000 $(filesize);"                     \
                "prot on ff800000 ff81ffff\0"                           \
index 3a9f790f3f7a6c33b1ea9f200099e7fb3e0cce86..6c14ca00c53dc00020a615e5c9918227d55b3740 100644 (file)
 
 #ifdef CONFIG_IO_MUXING
 #define        CONFIG_KM_DEF_ENV_IOMUX \
-       "nc=setenv ethact HDLC ETHERNET \0" \
-       "nce=setenv ethact SCC ETHERNET \0"     \
+       "nc=setenv ethact HDLC \0" \
+       "nce=setenv ethact SCC \0"      \
        "stderr=serial,nc \0"   \
        "stdin=serial,nc \0" \
        "stdout=serial,nc \0" \
index b5552d217ce007a57f30b1871e7e584bdf5754ce..a10744e882af9ba3375a68a637e243194d8686d4 100644 (file)
 #define BOOTFLAG_WARM  0x02    /* Software reboot                  */
 
 #define CONFIG_SCC3_ENET
-#define CONFIG_ETHPRIME                "SCC ETHERNET"
+#define CONFIG_ETHPRIME                "SCC"
 #define CONFIG_HAS_ETH0
 
 /* pass open firmware flat tree */
index d462ed0f1eba7944cdfcd9f0a407b568d0fb1701..600ccfbab16d9437025d6c88182c9cdfbae44316 100644 (file)
        "nfsargs=setenv bootargs root=/dev/nfs rw "                     \
                "nfsroot=$(serverip):$(rootpath) wdt=off\0"             \
        "hostname=v38b\0"                                               \
-       "ethact=FEC ETHERNET\0"                                         \
+       "ethact=FEC\0"                                                  \
        "rootpath=/opt/eldk-3.1.1/ppc_6xx\0"                            \
        "update=prot off ff000000 ff03ffff; era ff000000 ff03ffff; "    \
                "cp.b 200000 ff000000 $(filesize);"                     \