From 48690d8024eeeaee3120db702e54fcb238e6d9c7 Mon Sep 17 00:00:00 2001 From: Heiko Schocher Date: Tue, 20 Jul 2010 17:45:02 +0200 Subject: net ppc: fix ethernet device names with spaces 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 Signed-off-by: Ben Warren --- include/configs/NSCU.h | 1 - include/configs/TK885D.h | 6 +++--- include/configs/TQM855L.h | 2 +- include/configs/TQM855M.h | 2 +- include/configs/TQM860L.h | 2 +- include/configs/TQM860M.h | 2 +- include/configs/TQM862L.h | 2 +- include/configs/TQM862M.h | 2 +- include/configs/TQM866M.h | 2 +- include/configs/TQM885D.h | 2 +- include/configs/ep82xxm.h | 2 +- include/configs/idmr.h | 2 +- include/configs/keymile-common.h | 4 ++-- include/configs/km8xx.h | 2 +- include/configs/v38b.h | 2 +- 15 files changed, 17 insertions(+), 18 deletions(-) (limited to 'include') 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..7cefa32 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\0" \ + "ethact=FEC\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" /* pass open firmware flat tree */ #define CONFIG_OF_LIBFDT 1 diff --git a/include/configs/TQM855L.h b/include/configs/TQM855L.h index 32a7e79..5bf8f02 100644 --- a/include/configs/TQM855L.h +++ b/include/configs/TQM855L.h @@ -481,7 +481,7 @@ #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 diff --git a/include/configs/TQM855M.h b/include/configs/TQM855M.h index 4f44be3..456ed7e 100644 --- a/include/configs/TQM855M.h +++ b/include/configs/TQM855M.h @@ -516,7 +516,7 @@ #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 diff --git a/include/configs/TQM860L.h b/include/configs/TQM860L.h index e86fe5e..94b9a3b 100644 --- a/include/configs/TQM860L.h +++ b/include/configs/TQM860L.h @@ -480,7 +480,7 @@ #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 diff --git a/include/configs/TQM860M.h b/include/configs/TQM860M.h index 4fd873b..ce5e691 100644 --- a/include/configs/TQM860M.h +++ b/include/configs/TQM860M.h @@ -484,7 +484,7 @@ #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 diff --git a/include/configs/TQM862L.h b/include/configs/TQM862L.h index 0c966c9..d77df9c 100644 --- a/include/configs/TQM862L.h +++ b/include/configs/TQM862L.h @@ -486,7 +486,7 @@ #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 diff --git a/include/configs/TQM862M.h b/include/configs/TQM862M.h index 178e6e2..a6c465b 100644 --- a/include/configs/TQM862M.h +++ b/include/configs/TQM862M.h @@ -487,7 +487,7 @@ #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 diff --git a/include/configs/TQM866M.h b/include/configs/TQM866M.h index a65946d..9ec815c 100644 --- a/include/configs/TQM866M.h +++ b/include/configs/TQM866M.h @@ -506,7 +506,7 @@ #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 diff --git a/include/configs/TQM885D.h b/include/configs/TQM885D.h index 0fc4b69..c715c07 100644 --- a/include/configs/TQM885D.h +++ b/include/configs/TQM885D.h @@ -506,7 +506,7 @@ 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 diff --git a/include/configs/ep82xxm.h b/include/configs/ep82xxm.h index c737f10..b52b941 100644 --- a/include/configs/ep82xxm.h +++ b/include/configs/ep82xxm.h @@ -147,7 +147,7 @@ #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 */ diff --git a/include/configs/idmr.h b/include/configs/idmr.h index 61e3bad..8105876 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\0 " \ "update=prot off ff800000 ff81ffff; era ff800000 ff81ffff; " \ "cp.b 200000 ff800000 $(filesize);" \ "prot on ff800000 ff81ffff\0" \ diff --git a/include/configs/keymile-common.h b/include/configs/keymile-common.h index 3a9f790..6c14ca0 100644 --- a/include/configs/keymile-common.h +++ b/include/configs/keymile-common.h @@ -139,8 +139,8 @@ #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" \ diff --git a/include/configs/km8xx.h b/include/configs/km8xx.h index b5552d2..a10744e 100644 --- a/include/configs/km8xx.h +++ b/include/configs/km8xx.h @@ -280,7 +280,7 @@ #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 */ diff --git a/include/configs/v38b.h b/include/configs/v38b.h index d462ed0..600ccfb 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\0" \ "rootpath=/opt/eldk-3.1.1/ppc_6xx\0" \ "update=prot off ff000000 ff03ffff; era ff000000 ff03ffff; " \ "cp.b 200000 ff000000 $(filesize);" \ -- cgit v1.1 From 78b7a8ef8b37582a37a5c2381191061380b42831 Mon Sep 17 00:00:00 2001 From: Kim Phillips Date: Mon, 26 Jul 2010 18:34:57 -0500 Subject: net: rename "FSL UECx" net interfaces "UECx" continuation of commit 2ecc2262d66a286e3aac79005bcb5f461312dea8 "net ppc: fix ethernet device names with spaces" (currently in u-boot-net.git) for QE based parts. Signed-off-by: Kim Phillips Acked-by: Dave Liu Signed-off-by: Ben Warren --- include/configs/MPC8323ERDB.h | 2 +- include/configs/MPC832XEMDS.h | 2 +- include/configs/MPC8360EMDS.h | 2 +- include/configs/MPC8360ERDK.h | 2 +- include/configs/MPC8568MDS.h | 2 +- include/configs/MPC8569MDS.h | 2 +- include/configs/kmeter1.h | 2 +- 7 files changed, 7 insertions(+), 7 deletions(-) (limited to 'include') diff --git a/include/configs/MPC8323ERDB.h b/include/configs/MPC8323ERDB.h index 7c84393..9a296a1 100644 --- a/include/configs/MPC8323ERDB.h +++ b/include/configs/MPC8323ERDB.h @@ -338,7 +338,7 @@ * QE UEC ethernet configuration */ #define CONFIG_UEC_ETH -#define CONFIG_ETHPRIME "FSL UEC0" +#define CONFIG_ETHPRIME "UEC0" #define CONFIG_UEC_ETH1 /* ETH3 */ diff --git a/include/configs/MPC832XEMDS.h b/include/configs/MPC832XEMDS.h index 7bd2793..68ff191 100644 --- a/include/configs/MPC832XEMDS.h +++ b/include/configs/MPC832XEMDS.h @@ -353,7 +353,7 @@ * QE UEC ethernet configuration */ #define CONFIG_UEC_ETH -#define CONFIG_ETHPRIME "FSL UEC0" +#define CONFIG_ETHPRIME "UEC0" #define CONFIG_UEC_ETH1 /* ETH3 */ diff --git a/include/configs/MPC8360EMDS.h b/include/configs/MPC8360EMDS.h index 87a137b..c58e003 100644 --- a/include/configs/MPC8360EMDS.h +++ b/include/configs/MPC8360EMDS.h @@ -390,7 +390,7 @@ * QE UEC ethernet configuration */ #define CONFIG_UEC_ETH -#define CONFIG_ETHPRIME "FSL UEC0" +#define CONFIG_ETHPRIME "UEC0" #define CONFIG_PHY_MODE_NEED_CHANGE #define CONFIG_UEC_ETH1 /* GETH1 */ diff --git a/include/configs/MPC8360ERDK.h b/include/configs/MPC8360ERDK.h index e78cf60..9fa577d 100644 --- a/include/configs/MPC8360ERDK.h +++ b/include/configs/MPC8360ERDK.h @@ -309,7 +309,7 @@ * QE UEC ethernet configuration */ #define CONFIG_UEC_ETH -#define CONFIG_ETHPRIME "FSL UEC0" +#define CONFIG_ETHPRIME "UEC0" #define CONFIG_UEC_ETH1 /* GETH1 */ diff --git a/include/configs/MPC8568MDS.h b/include/configs/MPC8568MDS.h index ea7a134..2dc2932 100644 --- a/include/configs/MPC8568MDS.h +++ b/include/configs/MPC8568MDS.h @@ -313,7 +313,7 @@ extern unsigned long get_clock_freq(void); */ #define CONFIG_UEC_ETH #ifndef CONFIG_TSEC_ENET -#define CONFIG_ETHPRIME "FSL UEC0" +#define CONFIG_ETHPRIME "UEC0" #endif #define CONFIG_PHY_MODE_NEED_CHANGE #define CONFIG_eTSEC_MDIO_BUS diff --git a/include/configs/MPC8569MDS.h b/include/configs/MPC8569MDS.h index f69b650..8177db3 100644 --- a/include/configs/MPC8569MDS.h +++ b/include/configs/MPC8569MDS.h @@ -363,7 +363,7 @@ extern unsigned long get_clock_freq(void); #define CONFIG_MIIM_ADDRESS (CONFIG_SYS_CCSRBAR + 0x82120) #define CONFIG_UEC_ETH -#define CONFIG_ETHPRIME "FSL UEC0" +#define CONFIG_ETHPRIME "UEC0" #define CONFIG_PHY_MODE_NEED_CHANGE #define CONFIG_UEC_ETH1 /* GETH1 */ diff --git a/include/configs/kmeter1.h b/include/configs/kmeter1.h index 6497231..f7d36b1 100644 --- a/include/configs/kmeter1.h +++ b/include/configs/kmeter1.h @@ -284,7 +284,7 @@ * QE UEC ethernet configuration */ #define CONFIG_UEC_ETH -#define CONFIG_ETHPRIME "FSL UEC0" +#define CONFIG_ETHPRIME "UEC0" #define CONFIG_UEC_ETH1 /* GETH1 */ #define UEC_VERBOSE_DEBUG 1 -- cgit v1.1 From 5700bb63522c2af9276f25a15448b61f19d72841 Mon Sep 17 00:00:00 2001 From: Mike Frysinger Date: Tue, 27 Jul 2010 18:35:08 -0400 Subject: miiphy: constify device name The driver name does not need to be writable, so constify it. Signed-off-by: Mike Frysinger Signed-off-by: Ben Warren --- include/miiphy.h | 30 +++++++++++++++--------------- 1 file changed, 15 insertions(+), 15 deletions(-) (limited to 'include') diff --git a/include/miiphy.h b/include/miiphy.h index 5362125..2f7d915 100644 --- a/include/miiphy.h +++ b/include/miiphy.h @@ -36,30 +36,30 @@ #include -int miiphy_read (char *devname, unsigned char addr, unsigned char reg, +int miiphy_read (const char *devname, unsigned char addr, unsigned char reg, unsigned short *value); -int miiphy_write (char *devname, unsigned char addr, unsigned char reg, +int miiphy_write (const char *devname, unsigned char addr, unsigned char reg, unsigned short value); -int miiphy_info (char *devname, unsigned char addr, unsigned int *oui, +int miiphy_info (const char *devname, unsigned char addr, unsigned int *oui, unsigned char *model, unsigned char *rev); -int miiphy_reset (char *devname, unsigned char addr); -int miiphy_speed (char *devname, unsigned char addr); -int miiphy_duplex (char *devname, unsigned char addr); -int miiphy_is_1000base_x (char *devname, unsigned char addr); +int miiphy_reset (const char *devname, unsigned char addr); +int miiphy_speed (const char *devname, unsigned char addr); +int miiphy_duplex (const char *devname, unsigned char addr); +int miiphy_is_1000base_x (const char *devname, unsigned char addr); #ifdef CONFIG_SYS_FAULT_ECHO_LINK_DOWN -int miiphy_link (char *devname, unsigned char addr); +int miiphy_link (const char *devname, unsigned char addr); #endif void miiphy_init (void); -void miiphy_register (char *devname, - int (*read) (char *devname, unsigned char addr, +void miiphy_register (const char *devname, + int (*read) (const char *devname, unsigned char addr, unsigned char reg, unsigned short *value), - int (*write) (char *devname, unsigned char addr, + int (*write) (const char *devname, unsigned char addr, unsigned char reg, unsigned short value)); -int miiphy_set_current_dev (char *devname); -char *miiphy_get_current_dev (void); +int miiphy_set_current_dev (const char *devname); +const char *miiphy_get_current_dev (void); void miiphy_listdev (void); @@ -85,9 +85,9 @@ extern struct bb_miiphy_bus bb_miiphy_buses[]; extern int bb_miiphy_buses_num; void bb_miiphy_init (void); -int bb_miiphy_read (char *devname, unsigned char addr, +int bb_miiphy_read (const char *devname, unsigned char addr, unsigned char reg, unsigned short *value); -int bb_miiphy_write (char *devname, unsigned char addr, +int bb_miiphy_write (const char *devname, unsigned char addr, unsigned char reg, unsigned short value); #endif -- cgit v1.1 From d7fb9bcfb29a1cbdbda7006658e76c2d9da0f66f Mon Sep 17 00:00:00 2001 From: Ben Warren Date: Thu, 29 Jul 2010 12:56:11 -0700 Subject: Fix compile warnings for const correctness Commit 6e37b1a3a25004d3df5867de49fff6b3fc9c4f04 modifies several net calls to take a (const char *) parameter instead of (char *), but in some cases the modified functions call other functions taking (char *). The end result is warnings about discarding the const qualifier. This patch fixes these other function signatures. Signed-off-by: Ben Warren --- include/net.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'include') diff --git a/include/net.h b/include/net.h index a180881..ab571eb 100644 --- a/include/net.h +++ b/include/net.h @@ -117,7 +117,7 @@ extern void eth_try_another(int first_restart); /* Change the device */ 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(char *devname); /* get device */ +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 */ extern int eth_get_dev_index (void); /* get the device index */ extern void eth_parse_enetaddr(const char *addr, uchar *enetaddr); -- cgit v1.1