Changed PPC4xx EMAC driver to require CONFIG_PPC4xx_EMAC
Subsystems (2)
PATCH 1/3 Changed PPC4xx EMAC driver to require CONFIG_PPC4xx_EMAC
All in-tree IBM/AMCC PPC4xx boards using the EMAC get this new CONFIG
---
Rebased against 4xx tree. Please test and ACK/NAK.
cpu/ppc4xx/4xx_enet.c | 9 --------- cpu/ppc4xx/Makefile | 1 + include/configs/AR405.h | 1 + include/configs/ASH405.h | 1 + include/configs/CMS700.h | 1 + include/configs/CPCI405.h | 1 + include/configs/CPCI4052.h | 1 + include/configs/CPCI405AB.h | 1 + include/configs/CPCI405DT.h | 1 + include/configs/CPCIISER4.h | 1 + include/configs/CRAYL1.h | 2 ++ include/configs/DP405.h | 1 + include/configs/DU405.h | 1 + include/configs/DU440.h | 1 + include/configs/ERIC.h | 1 + include/configs/EXBITGEN.h | 1 + include/configs/G2000.h | 1 + include/configs/HH405.h | 1 + include/configs/HUB405.h | 1 + include/configs/JSE.h | 1 + include/configs/KAREF.h | 1 + include/configs/METROBOX.h | 1 + include/configs/MIP405.h | 1 + include/configs/OCRTC.h | 1 + include/configs/ORSG.h | 1 + include/configs/PCI405.h | 1 + include/configs/PIP405.h | 1 + include/configs/PLU405.h | 1 + include/configs/PMC405.h | 1 + include/configs/PMC440.h | 1 + include/configs/PPChameleonEVB.h | 1 + include/configs/VOH405.h | 1 + include/configs/VOM405.h | 1 + include/configs/W7OLMC.h | 1 + include/configs/W7OLMG.h | 1 + include/configs/WUH405.h | 1 + include/configs/XPEDITE1K.h | 1 + include/configs/alpr.h | 1 + include/configs/amcc-common.h | 1 + include/configs/csb272.h | 1 + include/configs/csb472.h | 1 + include/configs/korat.h | 1 + include/configs/lwmon5.h | 1 + include/configs/netstal-common.h | 1 + include/configs/p3p440.h | 1 + include/configs/pcs440ep.h | 1 + include/configs/quad100hd.h | 1 + include/configs/sbc405.h | 1 + include/configs/sc3.h | 2 ++ include/configs/zeus.h | 1 + net/eth.c | 5 ++--- 51 files changed, 53 insertions(+), 12 deletions(-)
cpu/ppc4xx/4xx_enet.c +0 -9
@@ -91,13 +91,6 @@#include <miiphy.h> #include <malloc.h> -/* -* Only compile for platform with AMCC EMAC ethernet controller and -* network support enabled. -* Remark: CONFIG_405 describes Xilinx PPC405 FPGA without EMAC controller! -*/ -#if defined(CONFIG_CMD_NET ) && !defined(CONFIG_405 ) && !defined(CONFIG_IOP480 ) -#if !(defined(CONFIG_MII ) || defined(CONFIG_CMD_MII ))#error "CONFIG_MII has to be defined!"#endif
@@ -2131,5 +2124,3 @@ int emac4xx_miiphy_initialize (bd_t * bis) return 0; }#endif /* !defined(CONFIG_NET_MULTI) */ - -#endif
cpu/ppc4xx/Makefile +1 -0
@@ -38,6 +38,7 @@ COBJS += 44x_spd_ddr2.o ifdef CONFIG_PPC4xx_DDR_AUTOCALIBRATION COBJS += 4xx_ibm_ddr2_autocalib.o endif +COBJS-$(CONFIG_PPC4xx_EMAC) += 4xx_enet.o COBJS += 4xx_pci.o COBJS += 4xx_pcie.o COBJS += bedbug_405.o
include/configs/AR405.h +1 -0
@@ -67,6 +67,7 @@#define CONFIG_LOADS_ECHO 1/* echo on for serial download */ #define CONFIG_SYS_LOADS_BAUD_CHANGE 1/* allow baudrate change */ +#define CONFIG_PPC4xx_EMAC#define CONFIG_MII 1/* MII PHY management */ #define CONFIG_PHY_ADDR 0/* PHY address */ #define CONFIG_LXT971_NO_SLEEP 1/* disable sleep mode in LXT971 */
include/configs/ASH405.h +1 -0
@@ -56,6 +56,7 @@#define CONFIG_NET_MULTI 1#undef CONFIG_HAS_ETH1 +#define CONFIG_PPC4xx_EMAC#define CONFIG_MII 1/* MII PHY management */ #define CONFIG_PHY_ADDR 0/* PHY address */ #define CONFIG_LXT971_NO_SLEEP 1/* disable sleep mode in LXT971 */
include/configs/CMS700.h +1 -0
@@ -52,6 +52,7 @@#define CONFIG_SYS_LOADS_BAUD_CHANGE 1/* allow baudrate change */ +#define CONFIG_PPC4xx_EMAC#define CONFIG_NET_MULTI 1#undef CONFIG_HAS_ETH1
include/configs/CPCI405.h +1 -0
@@ -52,6 +52,7 @@#define CONFIG_LOADS_ECHO 1/* echo on for serial download */ #define CONFIG_SYS_LOADS_BAUD_CHANGE 1/* allow baudrate change */ +#define CONFIG_PPC4xx_EMAC#define CONFIG_MII 1/* MII PHY management */ #define CONFIG_PHY_ADDR 0/* PHY address */ #define CONFIG_LXT971_NO_SLEEP 1/* disable sleep mode in LXT971 */
include/configs/CPCI4052.h +1 -0
@@ -54,6 +54,7 @@#define CONFIG_LOADS_ECHO 1/* echo on for serial download */ #define CONFIG_SYS_LOADS_BAUD_CHANGE 1/* allow baudrate change */ +#define CONFIG_PPC4xx_EMAC#define CONFIG_MII 1/* MII PHY management */ #define CONFIG_PHY_ADDR 0/* PHY address */ #define CONFIG_LXT971_NO_SLEEP 1/* disable sleep mode in LXT971 */
include/configs/CPCI405AB.h +1 -0
@@ -54,6 +54,7 @@#undef CONFIG_LOADS_ECHO/* echo on for serial download */ #define CONFIG_SYS_LOADS_BAUD_CHANGE 1/* allow baudrate change */ +#define CONFIG_PPC4xx_EMAC#define CONFIG_MII 1/* MII PHY management */ #define CONFIG_PHY_ADDR 0/* PHY address */ #define CONFIG_LXT971_NO_SLEEP 1/* disable sleep mode in LXT971 */
include/configs/CPCI405DT.h +1 -0
@@ -53,6 +53,7 @@#define CONFIG_LOADS_ECHO 1/* echo on for serial download */ #define CONFIG_SYS_LOADS_BAUD_CHANGE 1/* allow baudrate change */ +#define CONFIG_PPC4xx_EMAC#define CONFIG_MII 1/* MII PHY management */ #define CONFIG_PHY_ADDR 0/* PHY address */ #define CONFIG_LXT971_NO_SLEEP 1/* disable sleep mode in LXT971 */
include/configs/CPCIISER4.h +1 -0
@@ -50,6 +50,7 @@#define CONFIG_LOADS_ECHO 1/* echo on for serial download */ #define CONFIG_SYS_LOADS_BAUD_CHANGE 1/* allow baudrate change */ +#define CONFIG_PPC4xx_EMAC#define CONFIG_MII 1/* MII PHY management */ #define CONFIG_PHY_ADDR 0/* PHY address */ #define CONFIG_LXT971_NO_SLEEP 1/* disable sleep mode in LXT971 */
include/configs/CRAYL1.h +2 -0
@@ -39,6 +39,8 @@#define CONFIG_SYS_CLK_FREQ 25000000#define CONFIG_BAUDRATE 9600#define CONFIG_BOOTDELAY 5/* autoboot after 5 seconds */ + +#define CONFIG_PPC4xx_EMAC#define CONFIG_MII 1/* MII PHY management */ #define CONFIG_PHY_ADDR 1/* PHY address; handling of ENET */ #define CONFIG_BOARD_EARLY_INIT_F 1/* early setup for 405gp */
include/configs/DP405.h +1 -0
@@ -52,6 +52,7 @@#define CONFIG_SYS_LOADS_BAUD_CHANGE 1/* allow baudrate change */ +#define CONFIG_PPC4xx_EMAC#define CONFIG_MII 1/* MII PHY management */ #define CONFIG_PHY_ADDR 0/* PHY address */
include/configs/DU405.h +1 -0
@@ -54,6 +54,7 @@#define CONFIG_LOADS_ECHO 1/* echo on for serial download */ #define CONFIG_SYS_LOADS_BAUD_CHANGE 1/* allow baudrate change */ +#define CONFIG_PPC4xx_EMAC#define CONFIG_MII 1/* MII PHY management */ #define CONFIG_PHY_ADDR 0/* PHY address */ #define CONFIG_LXT971_NO_SLEEP 1/* disable sleep mode in LXT971 */
include/configs/DU440.h +1 -0
@@ -253,6 +253,7 @@int du440_phy_addr (int devnum);#endif +#define CONFIG_PPC4xx_EMAC#define CONFIG_IBM_EMAC4_V4 1#define CONFIG_MII 1/* MII PHY management */ #define CONFIG_PHY_ADDR du440_phy_addr(0)/* PHY address */
include/configs/ERIC.h +1 -0
@@ -93,6 +93,7 @@#define CONFIG_LOADS_ECHO 1/* echo on for serial download */ #define CONFIG_SYS_LOADS_BAUD_CHANGE 1/* allow baudrate change */ +#define CONFIG_PPC4xx_EMAC#define CONFIG_MII 1/* MII PHY management */ #define CONFIG_PHY_ADDR 1/* PHY address */
include/configs/EXBITGEN.h +1 -0
@@ -88,6 +88,7 @@*/ #define CONFIG_BOOTP_BOOTFILESIZE #define CONFIG_BOOTP_BOOTPATH +#define CONFIG_PPC4xx_EMAC#define CONFIG_BOOTP_GATEWAY #define CONFIG_BOOTP_HOSTNAME
include/configs/G2000.h +1 -0
@@ -80,6 +80,7 @@#define CONFIG_NET_MULTI 1 +#define CONFIG_PPC4xx_EMAC#define CONFIG_MII 1/* MII PHY management */ #define CONFIG_PHY_ADDR 0/* PHY address */ #define CONFIG_PHY1_ADDR 1/* PHY address */
include/configs/HH405.h +1 -0
@@ -64,6 +64,7 @@#define CONFIG_SYS_LOADS_BAUD_CHANGE 1/* allow baudrate change */ +#define CONFIG_PPC4xx_EMAC#define CONFIG_NET_MULTI 1#undef CONFIG_HAS_ETH1
include/configs/HUB405.h +1 -0
@@ -54,6 +54,7 @@#define CONFIG_SYS_LOADS_BAUD_CHANGE 1/* allow baudrate change */ +#define CONFIG_PPC4xx_EMAC#define CONFIG_MII 1/* MII PHY management */ #define CONFIG_PHY_ADDR 0/* PHY address */ #define CONFIG_LXT971_NO_SLEEP 1/* disable sleep mode in LXT971 */
include/configs/JSE.h +1 -0
@@ -132,6 +132,7 @@#define CONFIG_LOADS_ECHO 1/* echo on for serial download */ #define CONFIG_SYS_LOADS_BAUD_CHANGE 1/* allow baudrate change */ +#define CONFIG_PPC4xx_EMAC#define CONFIG_MII 1/* MII PHY management */ #define CONFIG_PHY_ADDR 1/* PHY address */
include/configs/KAREF.h +1 -0
@@ -157,6 +157,7 @@/*----------------------------------------------------------------------- * Networking *----------------------------------------------------------------------*/ +#define CONFIG_PPC4xx_EMAC#define CONFIG_MII 1/* MII PHY management */ #define CONFIG_NET_MULTI 1#define CONFIG_PHY_ADDR 0xff/* no phy on EMAC0 */
include/configs/METROBOX.h +1 -0
@@ -221,6 +221,7 @@/*----------------------------------------------------------------------- * Networking *----------------------------------------------------------------------*/ +#define CONFIG_PPC4xx_EMAC#define CONFIG_MII 1/* MII PHY management */ #define CONFIG_NET_MULTI 1#define CONFIG_PHY_ADDR 0xff/* no phy on EMAC0 */
include/configs/MIP405.h +1 -0
@@ -336,6 +336,7 @@/************************************************************ * Ethernet Stuff ***********************************************************/ +#define CONFIG_PPC4xx_EMAC#define CONFIG_MII 1/* MII PHY management */ #define CONFIG_PHY_ADDR 1/* PHY address */ #define CONFIG_PHY_RESET_DELAY 300/* Intel LXT971A needs this */
include/configs/OCRTC.h +1 -0
@@ -50,6 +50,7 @@#define CONFIG_LOADS_ECHO 1/* echo on for serial download */ #define CONFIG_SYS_LOADS_BAUD_CHANGE 1/* allow baudrate change */ +#define CONFIG_PPC4xx_EMAC#define CONFIG_MII 1/* MII PHY management */ #define CONFIG_PHY_ADDR 0/* PHY address */ #define CONFIG_LXT971_NO_SLEEP 1/* disable sleep mode in LXT971 */
include/configs/ORSG.h +1 -0
@@ -50,6 +50,7 @@#define CONFIG_LOADS_ECHO 1/* echo on for serial download */ #define CONFIG_SYS_LOADS_BAUD_CHANGE 1/* allow baudrate change */ +#define CONFIG_PPC4xx_EMAC#define CONFIG_MII 1/* MII PHY management */ #define CONFIG_PHY_ADDR 0/* PHY address */ #define CONFIG_LXT971_NO_SLEEP 1/* disable sleep mode in LXT971 */
include/configs/PCI405.h +1 -0
@@ -63,6 +63,7 @@#define CONFIG_LOADS_ECHO 1/* echo on for serial download */ #define CONFIG_SYS_LOADS_BAUD_CHANGE 1/* allow baudrate change */ +#define CONFIG_PPC4xx_EMAC#define CONFIG_MII 1/* MII PHY management */ #define CONFIG_PHY_ADDR 0/* PHY address */
include/configs/PIP405.h +1 -0
@@ -278,6 +278,7 @@/************************************************************ * Ethernet Stuff ***********************************************************/ +#define CONFIG_PPC4xx_EMAC#define CONFIG_MII 1/* MII PHY management */ #define CONFIG_PHY_ADDR 1/* PHY address */ /************************************************************
include/configs/PLU405.h +1 -0
@@ -54,6 +54,7 @@#define CONFIG_NET_MULTI 1#undef CONFIG_HAS_ETH1 +#define CONFIG_PPC4xx_EMAC#define CONFIG_MII 1/* MII PHY management */ #define CONFIG_PHY_ADDR 0/* PHY address */ #define CONFIG_LXT971_NO_SLEEP 1/* disable sleep mode in LXT971 */
include/configs/PMC405.h +1 -0
@@ -56,6 +56,7 @@#define CONFIG_NET_MULTI 1#undef CONFIG_HAS_ETH1 +#define CONFIG_PPC4xx_EMAC#define CONFIG_MII 1/* MII PHY management */ #define CONFIG_PHY_ADDR 0/* PHY address */ #define CONFIG_LXT971_NO_SLEEP 1/* disable sleep mode in LXT971 */
include/configs/PMC440.h +1 -0
@@ -315,6 +315,7 @@#define CONFIG_LOADS_ECHO 1/* echo on for serial download */ #define CONFIG_SYS_LOADS_BAUD_CHANGE 1/* allow baudrate change */ +#define CONFIG_PPC4xx_EMAC#define CONFIG_IBM_EMAC4_V4 1#define CONFIG_MII 1/* MII PHY management */ #define CONFIG_PHY_ADDR 0/* PHY address, See schematics */
include/configs/PPChameleonEVB.h +1 -0
@@ -104,6 +104,7 @@#undef CONFIG_EXT_PHY#define CONFIG_NET_MULTI 1 +#define CONFIG_PPC4xx_EMAC#define CONFIG_MII 1/* MII PHY management */ #ifndef CONFIG_EXT_PHY #define CONFIG_PHY_ADDR 1/* EMAC0 PHY address */
include/configs/VOH405.h +1 -0
@@ -55,6 +55,7 @@#define CONFIG_NET_MULTI 1#undef CONFIG_HAS_ETH1 +#define CONFIG_PPC4xx_EMAC#define CONFIG_MII 1/* MII PHY management */ #define CONFIG_PHY_ADDR 0/* PHY address */ #define CONFIG_LXT971_NO_SLEEP 1/* disable sleep mode in LXT971 */
include/configs/VOM405.h +1 -0
@@ -53,6 +53,7 @@#define CONFIG_NET_MULTI 1#undef CONFIG_HAS_ETH1 +#define CONFIG_PPC4xx_EMAC#define CONFIG_MII 1/* MII PHY management */ #define CONFIG_PHY_ADDR 0/* PHY address */ #define CONFIG_LXT971_NO_SLEEP 1/* disable sleep mode in LXT971 */
include/configs/W7OLMC.h +1 -0
@@ -65,6 +65,7 @@#define CONFIG_LOADS_ECHO 1/* echo on for serial download */ #undef CONFIG_SYS_LOADS_BAUD_CHANGE/* disallow baudrate change */ +#define CONFIG_PPC4xx_EMAC#define CONFIG_MII 1/* MII PHY management */ #define CONFIG_PHY_ADDR 0/* PHY address */
include/configs/W7OLMG.h +1 -0
@@ -65,6 +65,7 @@#define CONFIG_LOADS_ECHO 1/* echo on for serial download */ #undef CONFIG_SYS_LOADS_BAUD_CHANGE/* disallow baudrate change */ +#define CONFIG_PPC4xx_EMAC#define CONFIG_MII 1/* MII PHY management */ #define CONFIG_PHY_ADDR 0/* PHY address */
include/configs/WUH405.h +1 -0
@@ -54,6 +54,7 @@#define CONFIG_LOADS_ECHO 1/* echo on for serial download */ #define CONFIG_SYS_LOADS_BAUD_CHANGE 1/* allow baudrate change */ +#define CONFIG_PPC4xx_EMAC#define CONFIG_MII 1/* MII PHY management */ #define CONFIG_PHY_ADDR 0/* PHY address */ #define CONFIG_LXT971_NO_SLEEP 1/* disable sleep mode in LXT971 */
include/configs/XPEDITE1K.h +1 -0
@@ -167,6 +167,7 @@ extern void out32(unsigned int, unsigned long);#define CONFIG_LOADS_ECHO 1/* echo on for serial download */ #define CONFIG_SYS_LOADS_BAUD_CHANGE 1/* allow baudrate change */ +#define CONFIG_PPC4xx_EMAC#define CONFIG_MII 1/* MII PHY management */ #define CONFIG_PHY_ADDR 0/* PHY address phy0 not populated */ #define CONFIG_PHY1_ADDR 1/* PHY address phy1 not populated */
include/configs/alpr.h +1 -0
@@ -198,6 +198,7 @@#define CONFIG_LOADS_ECHO 1/* echo on for serial download */ #define CONFIG_SYS_LOADS_BAUD_CHANGE 1/* allow baudrate change */ +#define CONFIG_PPC4xx_EMAC#define CONFIG_MII 1/* MII PHY management */ #define CONFIG_NET_MULTI 1#define CONFIG_PHY_ADDR 0x02/* dummy setting, no EMAC0 used */
include/configs/amcc-common.h +1 -0
@@ -45,6 +45,7 @@/* * Ethernet/EMAC/PHY */ +#define CONFIG_PPC4xx_EMAC#define CONFIG_MII /* MII PHY management */ #define CONFIG_NET_MULTI #define CONFIG_NETCONSOLE /* include NetConsole support */
include/configs/csb272.h +1 -0
@@ -180,6 +180,7 @@* MII PHY configuration * */ +#define CONFIG_PPC4xx_EMAC#define CONFIG_MII 1/* MII PHY management */ #define CONFIG_PHY_ADDR 0/* PHY address */ #define CONFIG_PHY_CMD_DELAY 40/* PHY COMMAND delay */
include/configs/csb472.h +1 -0
@@ -179,6 +179,7 @@* MII PHY configuration * */ +#define CONFIG_PPC4xx_EMAC#define CONFIG_MII 1/* MII PHY management */ #define CONFIG_PHY_ADDR 0/* PHY address */ #define CONFIG_PHY_CMD_DELAY 40/* PHY COMMAND delay */
include/configs/korat.h +1 -0
@@ -215,6 +215,7 @@#define CONFIG_LOADS_ECHO 1/* echo on for serial download */ #define CONFIG_SYS_LOADS_BAUD_CHANGE 1/* allow baudrate change */ +#define CONFIG_PPC4xx_EMAC#define CONFIG_IBM_EMAC4_V4 1#define CONFIG_MII 1/* MII PHY management */ #define CONFIG_PHY_ADDR 2/* PHY address, See schematics */
include/configs/lwmon5.h +1 -0
@@ -326,6 +326,7 @@#define CONFIG_LOADS_ECHO 1/* echo on for serial download */ #define CONFIG_SYS_LOADS_BAUD_CHANGE 1/* allow baudrate change */ +#define CONFIG_PPC4xx_EMAC#define CONFIG_IBM_EMAC4_V4 1#define CONFIG_MII 1/* MII PHY management */ #define CONFIG_PHY_ADDR 3/* PHY address, See schematics */
include/configs/netstal-common.h +1 -0
@@ -58,6 +58,7 @@/* * Ethernet/EMAC/PHY */ +#define CONFIG_PPC4xx_EMAC#define CONFIG_MII /* MII PHY management */ #define CONFIG_PHY_ADDR 1/* PHY address */ #if defined(CONFIG_440 )
include/configs/p3p440.h +1 -0
@@ -158,6 +158,7 @@#define CONFIG_LOADS_ECHO 1/* echo on for serial download */ #define CONFIG_SYS_LOADS_BAUD_CHANGE 1/* allow baudrate change */ +#define CONFIG_PPC4xx_EMAC#define CONFIG_MII 1/* MII PHY management */ #define CONFIG_PHY_ADDR 0x1c/* PHY address */ #define CONFIG_HAS_ETH1
include/configs/pcs440ep.h +1 -0
@@ -218,6 +218,7 @@#define CONFIG_LOADS_ECHO 1/* echo on for serial download */ #define CONFIG_SYS_LOADS_BAUD_CHANGE 1/* allow baudrate change */ +#define CONFIG_PPC4xx_EMAC#define CONFIG_MII 1/* MII PHY management */ #define CONFIG_NET_MULTI 1/* required for netconsole */ #define CONFIG_HAS_ETH1 1/* add support for "eth1addr" */
include/configs/quad100hd.h +1 -0
@@ -45,6 +45,7 @@#define CONFIG_ENV_IS_IN_EEPROM #undef CONFIG_ENV_IS_IN_FLASH +#define CONFIG_PPC4xx_EMAC#define CONFIG_NET_MULTI 1#define CONFIG_HAS_ETH1 1#define CONFIG_MII 1/* MII PHY management */
include/configs/sbc405.h +1 -0
@@ -58,6 +58,7 @@#define CONFIG_BOOTCOMMAND "version;echo;tftpboot ${loadaddr} ${loadfile};bootvx"/* autoboot command */ +#define CONFIG_PPC4xx_EMAC#define CONFIG_MII 1/* MII PHY management */ #define CONFIG_PHY_ADDR 0/* PHY address */ #define CONFIG_PHY_RESET_DELAY 300/* Intel LXT971A needs this */
include/configs/sc3.h +2 -0
@@ -166,6 +166,8 @@/* #define CONFIG_EEPRO100_SROM_WRITE */ /* #define CONFIG_SHOW_MAC */ #define CONFIG_EEPRO100 + +#define CONFIG_PPC4xx_EMAC#define CONFIG_MII 1/* add 405GP MII PHY management */ #define CONFIG_PHY_ADDR 1/* the connected Phy defaults to address 1 */
include/configs/zeus.h +1 -0
@@ -46,6 +46,7 @@#define CONFIG_OVERWRITE_ETHADDR_ONCE 1 +#define CONFIG_PPC4xx_EMAC#define CONFIG_MII 1/* MII PHY management */ #define CONFIG_PHY_ADDR 0x01/* PHY address */ #define CONFIG_HAS_ETH1 1
net/eth.c +2 -3
@@ -159,7 +159,7 @@ int eth_initialize(bd_t *bis)#if defined(CONFIG_DB64460 ) || defined(CONFIG_P3Mx)mv6446x_eth_initialize (bis);#endif -#if defined(CONFIG_4xx) && !defined(CONFIG_IOP480 ) && !defined(CONFIG_AP1000 ) +#if defined(CONFIG_PPC4xx_EMAC)ppc_4xx_eth_initialize (bis);#endif #ifdef SCC_ENET
@@ -525,8 +525,7 @@ int eth_initialize(bd_t *bis)#if defined(CONFIG_AT91RM9200 )at91rm9200_miiphy_initialize (bis);#endif -#if defined(CONFIG_4xx) && !defined(CONFIG_IOP480 ) \ - && !defined(CONFIG_AP1000 ) && !defined(CONFIG_405 ) +#if defined(CONFIG_PPC4xx_EMAC)emac4xx_miiphy_initialize (bis);#endif #if defined(CONFIG_MCF52x2)
Signature · 1 line
1.5.4.3
PATCH 2/3 Moved PPC4xx EMAC driver to drivers/net
---
Rebased against 4xx tree. Please test and ACK/NAK.
cpu/ppc4xx/Makefile | 1 -
{cpu/ppc4xx => drivers/net}/4xx_enet.c | 0
drivers/net/Makefile | 1 +
3 files changed, 1 insertions(+), 1 deletions(-)
rename {cpu/ppc4xx => drivers/net}/4xx_enet.c (100%)cpu/ppc4xx/Makefile +0 -1
@@ -38,7 +38,6 @@ COBJS += 44x_spd_ddr2.o ifdef CONFIG_PPC4xx_DDR_AUTOCALIBRATION COBJS += 4xx_ibm_ddr2_autocalib.o endif -COBJS-$(CONFIG_PPC4xx_EMAC) += 4xx_enet.o COBJS += 4xx_pci.o COBJS += 4xx_pcie.o COBJS += bedbug_405.o
drivers/net/4xx_enet.c renamed from cpu/ppc4xx/4xx_enet.c +0 -0
drivers/net/Makefile +1 -0
@@ -54,6 +54,7 @@ COBJS-$(CONFIG_NS8382X) += ns8382x.o COBJS-$(CONFIG_DRIVER_NS9750_ETHERNET) += ns9750_eth.o COBJS-$(CONFIG_PCNET) += pcnet.o COBJS-$(CONFIG_PLB2800_ETHER) += plb2800_eth.o +COBJS-$(CONFIG_PPC4xx_EMAC) += 4xx_enet.o COBJS-$(CONFIG_DRIVER_RTL8019) += rtl8019.o COBJS-$(CONFIG_RTL8139) += rtl8139.o COBJS-$(CONFIG_RTL8169) += rtl8169.o
Signature · 1 line
1.5.4.3
PATCH 3/3 Moved initialization of PPC4xx EMAC to cpu_eth_init()
Removed initialization of the driver from net/eth.c
---
Rebased against 4xx tree. Please test and ACK/NAK.
cpu/ppc4xx/cpu.c | 14 ++++++++++++++ include/netdev.h | 1 + net/eth.c | 4 ---- 3 files changed, 15 insertions(+), 4 deletions(-)
cpu/ppc4xx/cpu.c +14 -0
@@ -36,6 +36,7 @@#include <command.h> #include <asm/cache.h> #include <ppc4xx.h> +#include <netdev.h> DECLARE_GLOBAL_DATA_PTR ;
@@ -693,3 +694,16 @@ void reset_4xx_watchdog(void) mtspr(tsr, 0x40000000); }#endif /* CONFIG_WATCHDOG */ + +/* +* Initializes on-chip ethernet controllers. +* to override, implement board_eth_init() +*/ +int cpu_eth_init (bd_t *bis) +{ +#if defined(CONFIG_PPC4xx_EMAC) +ppc_4xx_eth_initialize (bis); +#endif +return 0 ; +} +
include/netdev.h +1 -0
@@ -58,6 +58,7 @@ int natsemi_initialize(bd_t *bis);int ns8382x_initialize (bd_t *bis);int pcnet_initialize (bd_t *bis);int plb2800_eth_initialize (bd_t *bis); +int ppc_4xx_eth_initialize (bd_t *bis);int rtl8139_initialize (bd_t *bis);int rtl8169_initialize (bd_t *bis);int skge_initialize (bd_t *bis);
net/eth.c +0 -4
@@ -44,7 +44,6 @@ extern int fec_initialize(bd_t*);extern int mpc8220_fec_initialize (bd_t *);extern int mv6436x_eth_initialize (bd_t *);extern int mv6446x_eth_initialize (bd_t *); -extern int ppc_4xx_eth_initialize (bd_t *);extern int scc_initialize (bd_t *);extern int npe_initialize (bd_t *);extern int uec_initialize (int );
@@ -159,9 +158,6 @@ int eth_initialize(bd_t *bis)#if defined(CONFIG_DB64460 ) || defined(CONFIG_P3Mx)mv6446x_eth_initialize (bis);#endif -#if defined(CONFIG_PPC4xx_EMAC) -ppc_4xx_eth_initialize (bis); -#endif #ifdef SCC_ENET scc_initialize (bis);#endif
Signature · 1 line
1.5.4.3
PATCH 1/3 Changed PPC4xx EMAC driver to require CONFIG_PPC4xx_EMAC
In reply to Ben WarrenQuoted 6 lines · Ben Warren
All in-tree IBM/AMCC PPC4xx boards using the EMAC get this new CONFIG
Signed-off-by Ben Warren <[email protected]>---
Rebased against 4xx tree. Please test and ACK/NAK.
I'm testing right now. It seems to work on "most" boards. Here a small patch that you should incorporate:
cpu/ppc4xx/Makefile +0 -1
@@ -60,7 +60,6 @@ COBJS += usb.o COBJS += usb_ohci.o COBJS += usbdev.o ifndef CONFIG_XILINX_440 -COBJS += 4xx_enet.o COBJS += 4xx_uart.o COBJS += gpio.o COBJS += miiphy.o
And also there are some boards that include the 4xx_enet object directly from their linker script:
[stefan at kubuntu u-boot-ppc4xx (master)]$ git grep "cpu/ppc4xx/4xx_enet.o"
board/cray/L1/u-boot.lds: cpu/ppc4xx/4xx_enet.o (.text) board/csb272/u-boot.lds: cpu/ppc4xx/4xx_enet.o (.text) board/csb472/u-boot.lds: cpu/ppc4xx/4xx_enet.o (.text) board/dave/PPChameleonEVB/u-boot.lds: cpu/ppc4xx/4xx_enet.o (.text) board/eric/u-boot.lds: cpu/ppc4xx/4xx_enet.o (.text) board/esd/ar405/u-boot.lds: cpu/ppc4xx/4xx_enet.o (.text) board/esd/dp405/u-boot.lds: cpu/ppc4xx/4xx_enet.o (.text) board/esd/hub405/u-boot.lds: cpu/ppc4xx/4xx_enet.o (.text) board/esd/voh405/u-boot.lds: cpu/ppc4xx/4xx_enet.o (.text) board/g2000/u-boot.lds: cpu/ppc4xx/4xx_enet.o (.text) board/ml2/u-boot.lds: cpu/ppc4xx/4xx_enet.o (.text) board/mpl/mip405/u-boot.lds: cpu/ppc4xx/4xx_enet.o (.text) board/sandburst/karef/u-boot.lds: cpu/ppc4xx/4xx_enet.o (.text)
board/sandburst/karef/u-boot.lds.debug: cpu/ppc4xx/4xx_enet.o
(.text)board/sandburst/metrobox/u-boot.lds: cpu/ppc4xx/4xx_enet.o (.text)
board/sandburst/metrobox/u-boot.lds.debug: cpu/ppc4xx/4xx_enet.o
(.text)
board/sbc405/u-boot.lds: cpu/ppc4xx/4xx_enet.o (.text) board/xilinx/ml300/u-boot.lds: cpu/ppc4xx/4xx_enet.o (.text)
It should be safe to remove this reference completely, but the fix with least consequences is the change to the new object location.
Please change this in your next patch submission and you can add my Acked-by and include it into your net repository.
Thanks for your work on this.
Best regards,
Stefan
=====================================================================
DENX Software Engineering GmbH, MD: Wolfgang Denk & Detlev Zundel
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: +49-8142-66989-0 Fax: +49-8142-66989-80 Email: office at denx.de
=====================================================================