[U-Boot] [PATCH] net, fec: fix "Warning: eth device name has a space!" for FEC devices

Heiko Schocher hs at denx.de
Mon Jul 19 14:15:13 CEST 2010


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.

Tested on the kup4k board.

Signed-off-by: Heiko Schocher <hs at denx.de>

---
 arch/powerpc/cpu/mpc8220/fec.c |    2 +-
 arch/powerpc/cpu/mpc8xx/fec.c  |    4 ++--
 board/motionpro/motionpro.c    |    4 ++--
 board/stx/stxxtc/stxxtc.c      |    6 +++---
 board/tqc/tqm8xx/tqm8xx.c      |    4 ++--
 drivers/net/mpc512x_fec.c      |    2 +-
 drivers/net/mpc5xxx_fec.c      |    2 +-
 include/configs/NSCU.h         |    1 -
 include/configs/TK885D.h       |    6 +++---
 include/configs/idmr.h         |    2 +-
 include/configs/v38b.h         |    2 +-
 11 files changed, 17 insertions(+), 18 deletions(-)

diff --git a/arch/powerpc/cpu/mpc8220/fec.c b/arch/powerpc/cpu/mpc8220/fec.c
index 5df9735..cf0ce4a 100644
--- a/arch/powerpc/cpu/mpc8220/fec.c
+++ b/arch/powerpc/cpu/mpc8220/fec.c
@@ -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_ETHERNET");
 	eth_register (dev);

 #if defined(CONFIG_MII) || defined(CONFIG_CMD_MII)
diff --git a/arch/powerpc/cpu/mpc8xx/fec.c b/arch/powerpc/cpu/mpc8xx/fec.c
index 89c1ff9..73f1f98 100644
--- a/arch/powerpc/cpu/mpc8xx/fec.c
+++ b/arch/powerpc/cpu/mpc8xx/fec.c
@@ -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_ETHERNET");
 		} else {
-			sprintf (dev->name, "FEC%d ETHERNET",
+			sprintf (dev->name, "FEC%d_ETHERNET",
 				ether_fcc_info[i].ether_index + 1);
 		}

diff --git a/board/motionpro/motionpro.c b/board/motionpro/motionpro.c
index b369219..3616791 100644
--- a/board/motionpro/motionpro.c
+++ b/board/motionpro/motionpro.c
@@ -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_ETHERNET", CONFIG_PHY_ADDR, 0x15, &mode_control);
+	miiphy_write("FEC_ETHERNET", CONFIG_PHY_ADDR, 0x15,
 			mode_control & 0xfffe);
 	return;
 }
diff --git a/board/stx/stxxtc/stxxtc.c b/board/stx/stxxtc/stxxtc.c
index 717dbe2..d9f7a2d 100644
--- a/board/stx/stxxtc/stxxtc.c
+++ b/board/stx/stxxtc/stxxtc.c
@@ -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("FECETHERNET", phyno, PHY_PHYIDR1, &v);
 		if (v == 0xFFFF)
 			continue;
-		miiphy_write("FEC ETHERNET", phyno, PHY_BMCR, PHY_BMCR_POWD);
+		miiphy_write("FEC_ETHERNET", phyno, PHY_BMCR, PHY_BMCR_POWD);
 		udelay(10000);
-		miiphy_write("FEC ETHERNET", phyno, PHY_BMCR, PHY_BMCR_RESET | PHY_BMCR_AUTON);
+		miiphy_write("FEC_ETHERNET", phyno, PHY_BMCR, PHY_BMCR_RESET | PHY_BMCR_AUTON);
 		udelay(10000);
 	}
 }
diff --git a/board/tqc/tqm8xx/tqm8xx.c b/board/tqc/tqm8xx/tqm8xx.c
index 53f79e8..3ca2ee7 100644
--- a/board/tqc/tqm8xx/tqm8xx.c
+++ b/board/tqc/tqm8xx/tqm8xx.c
@@ -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_ETHERNET", 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_ETHERNET", phy[i],
 				   PHY_BMCR, (reg | PHY_BMCR_100MB |
 					      PHY_BMCR_DPLX) & ~PHY_BMCR_AUTON);
 		if (ret) {
diff --git a/drivers/net/mpc512x_fec.c b/drivers/net/mpc512x_fec.c
index c580c82..1f7392e 100644
--- a/drivers/net/mpc512x_fec.c
+++ b/drivers/net/mpc512x_fec.c
@@ -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_ETHERNET");
 	eth_register (dev);

 #if defined(CONFIG_MII) || defined(CONFIG_CMD_MII)
diff --git a/drivers/net/mpc5xxx_fec.c b/drivers/net/mpc5xxx_fec.c
index 1681e26..94c9277 100644
--- a/drivers/net/mpc5xxx_fec.c
+++ b/drivers/net/mpc5xxx_fec.c
@@ -913,7 +913,7 @@ int mpc5xxx_fec_initialize(bd_t * bis)
 	dev->send = mpc5xxx_fec_send;
 	dev->recv = mpc5xxx_fec_recv;

-	sprintf(dev->name, "FEC ETHERNET");
+	sprintf(dev->name, "FEC_ETHERNET");
 	eth_register(dev);

 #if defined(CONFIG_MII) || defined(CONFIG_CMD_MII)
diff --git a/include/configs/NSCU.h b/include/configs/NSCU.h
index 5724f45..6a4c47d 100644
--- a/include/configs/NSCU.h
+++ b/include/configs/NSCU.h
@@ -485,7 +485,6 @@

 #undef CONFIG_SCC1_ENET
 #define CONFIG_FEC_ENET
-/* #define CONFIG_ETHPRIME		"FEC ETHERNET" */

 /* pass open firmware flat tree */
 #define CONFIG_OF_LIBFDT	1
diff --git a/include/configs/TK885D.h b/include/configs/TK885D.h
index 0df1b6e..f34039c 100644
--- a/include/configs/TK885D.h
+++ b/include/configs/TK885D.h
@@ -65,8 +65,8 @@
 #undef	CONFIG_BOOTARGS

 #define CONFIG_EXTRA_ENV_SETTINGS					\
-	"ethprime=FEC ETHERNET\0"					\
-	"ethact=FEC ETHERNET\0"						\
+	"ethprime=FEC_ETHERNET\0"					\
+	"ethact=FEC_ETHERNET\0"						\
 	"netdev=eth0\0"							\
 	"nfsargs=setenv bootargs root=/dev/nfs rw "			\
 		"nfsroot=${serverip}:${rootpath}\0"			\
@@ -514,7 +514,7 @@
 #define CONFIG_MII_INIT	1

 #define CONFIG_NET_RETRY_COUNT	3
-#define CONFIG_ETHPRIME		"FEC ETHERNET"
+#define CONFIG_ETHPRIME		"FEC_ETHERNET"

 /* pass open firmware flat tree */
 #define CONFIG_OF_LIBFDT	1
diff --git a/include/configs/idmr.h b/include/configs/idmr.h
index 61e3bad..d3017e2 100644
--- a/include/configs/idmr.h
+++ b/include/configs/idmr.h
@@ -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_ETHERNET\0"						\
 	"update=prot off ff800000 ff81ffff; era ff800000 ff81ffff; "	\
 		"cp.b 200000 ff800000 $(filesize);"			\
 		"prot on ff800000 ff81ffff\0"				\
diff --git a/include/configs/v38b.h b/include/configs/v38b.h
index d462ed0..4d19d98 100644
--- a/include/configs/v38b.h
+++ b/include/configs/v38b.h
@@ -154,7 +154,7 @@
 	"nfsargs=setenv bootargs root=/dev/nfs rw "			\
 		"nfsroot=$(serverip):$(rootpath) wdt=off\0"		\
 	"hostname=v38b\0"						\
-	"ethact=FEC ETHERNET\0"						\
+	"ethact=FEC_ETHERNET\0"						\
 	"rootpath=/opt/eldk-3.1.1/ppc_6xx\0"				\
 	"update=prot off ff000000 ff03ffff; era ff000000 ff03ffff; "	\
 		"cp.b 200000 ff000000 $(filesize);"			\
-- 
1.6.2.5

-- 
DENX Software Engineering GmbH,     MD: Wolfgang Denk & Detlev Zundel
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany


More information about the U-Boot mailing list