Skip to contentSkip to conversation

Changed PPC4xx EMAC driver to require CONFIG_PPC4xx_EMAC

PATCH New Ben Warren 1 participant 3 messages Nov 10, 2008

Subsystems (3)
lore
Share & tools
lore

Ben Warren

author
#0 lore raw

PATCH v2 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

---
 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
index d7b16da..1978269 100644
@@ -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
index 463b575..adfe13c 100644
@@ -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
index 864774c..9f19269 100644
@@ -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
index bcc85ee..a694083 100644
@@ -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
index d58f508..d0e2464 100644
@@ -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
index 3493d75..1a2bc1c 100644
@@ -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
index 734ab95..e231fa7 100644
@@ -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
index 47ad89d..2319c58 100644
@@ -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
index 4e94dfc..be8c238 100644
@@ -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
index 2d60ebf..3263712 100644
@@ -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
index 1122d02..f1608e1 100644
@@ -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
index 0ff4f7d..884f3fe 100644
@@ -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
index 939e216..1d20efe 100644
@@ -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
index 508a0ca..729153c 100644
@@ -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
index c05945a..1b766a7 100644
@@ -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
index 9f5d3ca..1dd6e57 100644
@@ -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
index 4341f02..d299044 100644
@@ -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
index 1e7cc12..80e59bb 100644
@@ -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
index 3e58424..b3c7046 100644
@@ -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
index 508b5c8..8aca1f9 100644
@@ -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
index 403081d..4b67c94 100644
@@ -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
index c0ddd45..518173a 100644
@@ -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
index 7dcf185..c58ce05 100644
@@ -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
index ff11df9..32814d4 100644
@@ -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
index a635fca..58e9328 100644
@@ -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
index b55e383..0393366 100644
@@ -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
index 2966979..5c4d69b 100644
@@ -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
index 675dbe6..11ce008 100644
@@ -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
index 12e63b7..8d07d77 100644
@@ -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
index 7071ccb..7219bb8 100644
@@ -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
index e66f8ef..09a9641 100644
@@ -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
index fb1febc..10ef620 100644
@@ -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
index b6e3588..90efc6d 100644
@@ -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
index e546369..51d0a0a 100644
@@ -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
index 2260338..ca1a9d4 100644
@@ -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
index ec81564..01cdf3a 100644
@@ -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
index 569bb90..8d44ec6 100644
@@ -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
index 3158412..6e9f5e5 100644
@@ -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
index 8516571..d3dc3e5 100644
@@ -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
index 393e992..874f2c0 100644
@@ -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
index af38252..2e30e69 100644
@@ -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
index ca3e8a9..d56da14 100644
@@ -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
index e0dbd61..05055c8 100644
@@ -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
index 1fa4b00..0a75794 100644
@@ -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
index 1dc8656..729ca6a 100644
@@ -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
index 6e2d906..000ae5c 100644
@@ -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
index 1a76301..0f7fca3 100644
@@ -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
index d93ca2d..c156820 100644
@@ -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
index 44135df..d152a96 100644
@@ -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
index b75e8a1..1a77c71 100644
@@ -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
index 0b954ed..eab5104 100644
@@ -153,7 +153,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
 	if (!eth_devices) {
@@ -485,8 +485,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
author
#1 lore raw

PATCH v2 2/3 Moved PPC4xx EMAC driver to drivers/net

Also changed path in all linker scripts that reference this driver

---
 board/cray/L1/u-boot.lds                  |    2 +-
 board/csb272/u-boot.lds                   |    2 +-
 board/csb472/u-boot.lds                   |    2 +-
 board/dave/PPChameleonEVB/u-boot.lds      |    2 +-
 board/eric/u-boot.lds                     |    2 +-
 board/esd/ar405/u-boot.lds                |    2 +-
 board/esd/dp405/u-boot.lds                |    2 +-
 board/esd/hub405/u-boot.lds               |    2 +-
 board/esd/voh405/u-boot.lds               |    2 +-
 board/g2000/u-boot.lds                    |    2 +-
 board/ml2/u-boot.lds                      |    2 +-
 board/mpl/mip405/u-boot.lds               |    2 +-
 board/sandburst/karef/u-boot.lds          |    2 +-
 board/sandburst/karef/u-boot.lds.debug    |    2 +-
 board/sandburst/metrobox/u-boot.lds       |    2 +-
 board/sandburst/metrobox/u-boot.lds.debug |    2 +-
 board/sbc405/u-boot.lds                   |    2 +-
 board/xilinx/ml300/u-boot.lds             |    2 +-
 cpu/ppc4xx/Makefile                       |    2 --
 {cpu/ppc4xx => drivers/net}/4xx_enet.c    |    0 
 drivers/net/Makefile                      |    1 +
 21 files changed, 19 insertions(+), 20 deletions(-)
 rename {cpu/ppc4xx => drivers/net}/4xx_enet.c (100%)
board/cray/L1/u-boot.lds +1 -1
index 9d37257..f5b10f8 100644
@@ -68,7 +68,7 @@ SECTIONS
     cpu/ppc4xx/4xx_uart.o	(.text)
     cpu/ppc4xx/cpu_init.o	(.text)
     cpu/ppc4xx/speed.o	(.text)
-    cpu/ppc4xx/4xx_enet.o	(.text)
+    drivers/net/4xx_enet.o	(.text)
     common/dlmalloc.o	(.text)
     lib_generic/crc32.o		(.text)
     lib_ppc/extable.o	(.text)
board/csb272/u-boot.lds +1 -1
index be381e1..6c47555 100644
@@ -68,7 +68,7 @@ SECTIONS
     cpu/ppc4xx/4xx_uart.o	(.text)
     cpu/ppc4xx/cpu_init.o	(.text)
     cpu/ppc4xx/speed.o	(.text)
-    cpu/ppc4xx/4xx_enet.o	(.text)
+    drivers/net/4xx_enet.o	(.text)
     common/dlmalloc.o	(.text)
     lib_generic/crc32.o		(.text)
 
board/csb472/u-boot.lds +1 -1
index 375150d..fec2789 100644
@@ -68,7 +68,7 @@ SECTIONS
     cpu/ppc4xx/4xx_uart.o	(.text)
     cpu/ppc4xx/cpu_init.o	(.text)
     cpu/ppc4xx/speed.o	(.text)
-    cpu/ppc4xx/4xx_enet.o	(.text)
+    drivers/net/4xx_enet.o	(.text)
     common/dlmalloc.o	(.text)
     lib_generic/crc32.o		(.text)
 
board/dave/PPChameleonEVB/u-boot.lds +1 -1
index ed02cef..39bc654 100644
@@ -66,7 +66,7 @@ SECTIONS
     cpu/ppc4xx/4xx_uart.o	(.text)
     cpu/ppc4xx/cpu_init.o	(.text)
     cpu/ppc4xx/speed.o	(.text)
-    cpu/ppc4xx/4xx_enet.o	(.text)
+    drivers/net/4xx_enet.o	(.text)
     common/dlmalloc.o	(.text)
     lib_generic/crc32.o		(.text)
     lib_ppc/extable.o	(.text)
board/eric/u-boot.lds +1 -1
index 153e71f..42872b2 100644
@@ -68,7 +68,7 @@ SECTIONS
     cpu/ppc4xx/4xx_uart.o	(.text)
     cpu/ppc4xx/cpu_init.o	(.text)
     cpu/ppc4xx/speed.o	(.text)
-    cpu/ppc4xx/4xx_enet.o	(.text)
+    drivers/net/4xx_enet.o	(.text)
     common/dlmalloc.o	(.text)
     lib_generic/crc32.o		(.text)
     lib_ppc/extable.o	(.text)
board/esd/ar405/u-boot.lds +1 -1
index 4a881b6..cb58360 100644
@@ -66,7 +66,7 @@ SECTIONS
     cpu/ppc4xx/4xx_uart.o		(.text)
     cpu/ppc4xx/cpu_init.o	(.text)
     cpu/ppc4xx/speed.o		(.text)
-    cpu/ppc4xx/4xx_enet.o	(.text)
+    drivers/net/4xx_enet.o	(.text)
     common/dlmalloc.o		(.text)
     lib_generic/crc32.o		(.text)
     lib_ppc/extable.o		(.text)
board/esd/dp405/u-boot.lds +1 -1
index 7ff074c..131166b 100644
@@ -66,7 +66,7 @@ SECTIONS
     cpu/ppc4xx/4xx_uart.o	(.text)
     cpu/ppc4xx/cpu_init.o	(.text)
     cpu/ppc4xx/speed.o	(.text)
-    cpu/ppc4xx/4xx_enet.o	(.text)
+    drivers/net/4xx_enet.o	(.text)
     common/dlmalloc.o	(.text)
     lib_generic/crc32.o		(.text)
     lib_ppc/extable.o	(.text)
board/esd/hub405/u-boot.lds +1 -1
index c4a1a4b..3692412 100644
@@ -66,7 +66,7 @@ SECTIONS
     cpu/ppc4xx/4xx_uart.o	(.text)
     cpu/ppc4xx/cpu_init.o	(.text)
     cpu/ppc4xx/speed.o	(.text)
-    cpu/ppc4xx/4xx_enet.o	(.text)
+    drivers/net/4xx_enet.o	(.text)
     common/dlmalloc.o	(.text)
     lib_generic/crc32.o		(.text)
     lib_ppc/extable.o	(.text)
board/esd/voh405/u-boot.lds +1 -1
index 7ff074c..131166b 100644
@@ -66,7 +66,7 @@ SECTIONS
     cpu/ppc4xx/4xx_uart.o	(.text)
     cpu/ppc4xx/cpu_init.o	(.text)
     cpu/ppc4xx/speed.o	(.text)
-    cpu/ppc4xx/4xx_enet.o	(.text)
+    drivers/net/4xx_enet.o	(.text)
     common/dlmalloc.o	(.text)
     lib_generic/crc32.o		(.text)
     lib_ppc/extable.o	(.text)
board/g2000/u-boot.lds +1 -1
index 7ff074c..131166b 100644
@@ -66,7 +66,7 @@ SECTIONS
     cpu/ppc4xx/4xx_uart.o	(.text)
     cpu/ppc4xx/cpu_init.o	(.text)
     cpu/ppc4xx/speed.o	(.text)
-    cpu/ppc4xx/4xx_enet.o	(.text)
+    drivers/net/4xx_enet.o	(.text)
     common/dlmalloc.o	(.text)
     lib_generic/crc32.o		(.text)
     lib_ppc/extable.o	(.text)
board/ml2/u-boot.lds +1 -1
index 1182f74..80bf644 100644
@@ -63,7 +63,7 @@ SECTIONS
     cpu/ppc4xx/4xx_uart.o	(.text)
     cpu/ppc4xx/cpu_init.o	(.text)
     cpu/ppc4xx/speed.o	(.text)
-    cpu/ppc4xx/4xx_enet.o	(.text)
+    drivers/net/4xx_enet.o	(.text)
     common/dlmalloc.o	(.text)
     lib_generic/crc32.o		(.text)
     lib_ppc/extable.o	(.text)
board/mpl/mip405/u-boot.lds +1 -1
index 717f0d2..8b67fef 100644
@@ -72,7 +72,7 @@ SECTIONS
     cpu/ppc4xx/4xx_uart.o	(.text)
     cpu/ppc4xx/cpu_init.o	(.text)
     cpu/ppc4xx/speed.o	(.text)
-    cpu/ppc4xx/4xx_enet.o	(.text)
+    drivers/net/4xx_enet.o	(.text)
     common/dlmalloc.o	(.text)
     lib_generic/crc32.o		(.text)
     lib_ppc/extable.o	(.text)
board/sandburst/karef/u-boot.lds +1 -1
index 9b2c078..2439adb 100644
@@ -74,7 +74,7 @@ SECTIONS
     cpu/ppc4xx/4xx_uart.o	(.text)
     cpu/ppc4xx/cpu_init.o	(.text)
     cpu/ppc4xx/speed.o	(.text)
-    cpu/ppc4xx/4xx_enet.o	(.text)
+    drivers/net/4xx_enet.o	(.text)
     common/dlmalloc.o	(.text)
     lib_generic/crc32.o		(.text)
     lib_ppc/extable.o	(.text)
board/sandburst/karef/u-boot.lds.debug +1 -1
index 15fe1e3..d00e252 100644
@@ -64,7 +64,7 @@ SECTIONS
     cpu/ppc4xx/4xx_uart.o	(.text)
     cpu/ppc4xx/cpu_init.o	(.text)
     cpu/ppc4xx/speed.o	(.text)
-    cpu/ppc4xx/4xx_enet.o	(.text)
+    drivers/net/4xx_enet.o	(.text)
     common/dlmalloc.o	(.text)
     lib_generic/crc32.o		(.text)
     lib_ppc/extable.o	(.text)
board/sandburst/metrobox/u-boot.lds +1 -1
index 16e0709..8c59a95 100644
@@ -74,7 +74,7 @@ SECTIONS
     cpu/ppc4xx/4xx_uart.o	(.text)
     cpu/ppc4xx/cpu_init.o	(.text)
     cpu/ppc4xx/speed.o	(.text)
-    cpu/ppc4xx/4xx_enet.o	(.text)
+    drivers/net/4xx_enet.o	(.text)
     common/dlmalloc.o	(.text)
     lib_generic/crc32.o		(.text)
     lib_ppc/extable.o	(.text)
board/sandburst/metrobox/u-boot.lds.debug +1 -1
index d122c05..a3350f2 100644
@@ -64,7 +64,7 @@ SECTIONS
     cpu/ppc4xx/4xx_uart.o	(.text)
     cpu/ppc4xx/cpu_init.o	(.text)
     cpu/ppc4xx/speed.o	(.text)
-    cpu/ppc4xx/4xx_enet.o	(.text)
+    drivers/net/4xx_enet.o	(.text)
     common/dlmalloc.o	(.text)
     lib_generic/crc32.o		(.text)
     lib_ppc/extable.o	(.text)
board/sbc405/u-boot.lds +1 -1
index f3fd56f..08d6f0a 100644
@@ -66,7 +66,7 @@ SECTIONS
     cpu/ppc4xx/4xx_uart.o	(.text)
     cpu/ppc4xx/cpu_init.o	(.text)
     cpu/ppc4xx/speed.o	(.text)
-    cpu/ppc4xx/4xx_enet.o	(.text)
+    drivers/net/4xx_enet.o	(.text)
     common/dlmalloc.o	(.text)
     lib_generic/crc32.o		(.text)
     lib_ppc/extable.o	(.text)
board/xilinx/ml300/u-boot.lds +1 -1
index f05c7a6..9c2174b 100644
@@ -64,7 +64,7 @@ SECTIONS
     cpu/ppc4xx/4xx_uart.o	(.text)
     cpu/ppc4xx/cpu_init.o	(.text)
     cpu/ppc4xx/speed.o	(.text)
-    cpu/ppc4xx/4xx_enet.o	(.text)
+    drivers/net/4xx_enet.o	(.text)
     common/dlmalloc.o	(.text)
     lib_generic/crc32.o		(.text)
     lib_ppc/extable.o	(.text)
cpu/ppc4xx/Makefile +0 -2
index adfe13c..96ab5c6 100644
@@ -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
@@ -61,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
drivers/net/4xx_enet.c renamed from cpu/ppc4xx/4xx_enet.c +0 -0
similarity index 100%
rename from cpu/ppc4xx/4xx_enet.c
rename to drivers/net/4xx_enet.c
drivers/net/Makefile +1 -0
index 439c354..9e4a854 100644
@@ -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
author
#2 lore raw

PATCH v2 3/3 Moved initialization of PPC4xx EMAC to cpu_eth_init()

Removed initialization of the driver from net/eth.c

---
 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
index a676b30..1f0b56c 100644
@@ -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
index 45e59b6..751f0da 100644
@@ -62,6 +62,7 @@ int npe_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 scc_initialize(bd_t *bis);
net/eth.c +0 -4
index eab5104..b7ef09f 100644
@@ -41,7 +41,6 @@ int board_eth_init(bd_t *bis) __attribute((weak, alias("__def_eth_init")));
 
 extern int mv6436x_eth_initialize(bd_t *);
 extern int mv6446x_eth_initialize(bd_t *);
-extern int ppc_4xx_eth_initialize(bd_t *);
 
 #ifdef CONFIG_API
 extern void (*push_packet)(volatile void *, int);
@@ -153,9 +152,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
 	if (!eth_devices) {
 		puts ("No ethernet found.\n");
 		show_boot_progress (-64);
Signature · 1 line
1.5.4.3