]> git.kernelconcepts.de Git - karo-tx-uboot.git/commitdiff
Moved initialization of MPC5xxx_FEC Ethernet driver to CPU directory
authorBen Warren <biggerbadderben@gmail.com>
Sun, 31 Aug 2008 17:39:12 +0000 (10:39 -0700)
committerBen Warren <biggerbadderben@gmail.com>
Wed, 3 Sep 2008 04:18:18 +0000 (21:18 -0700)
Modified board_eth_init() functions of boards that have this FEC in addition
to other Ethernet controllers.

Affected boards:
bc3450
icecube
mvbc_p
o2dnt
pm520
total5200
tq5200

Removed initialization of controller from net/eth.c

Signed-off-by: Ben Warren <biggerbadderben@gmail.com>
board/bc3450/bc3450.c
board/icecube/icecube.c
board/matrix_vision/mvbc_p/mvbc_p.c
board/o2dnt/o2dnt.c
board/pm520/pm520.c
board/total5200/total5200.c
board/tqc/tqm5200/tqm5200.c
cpu/mpc5xxx/cpu.c
drivers/net/mpc5xxx_fec.c
include/netdev.h
net/eth.c

index e27c23416f3df3ad54093beedf12692afe31b9aa..7ddf74c1c8dea99e5b680f0bfd01dc2b3cbf704c 100644 (file)
@@ -673,5 +673,6 @@ int board_get_height (void)
 
 int board_eth_init(bd_t *bis)
 {
+       cpu_eth_init(bis); /* Built in FEC comes first */
        return pci_eth_init(bis);
 }
index 2ab86be300a596129018ffc6d4b1a813fbfbc1b0..d84ab3adce53f9e7e4d5b323dee44561b01b9f95 100644 (file)
@@ -394,5 +394,6 @@ ft_board_setup(void *blob, bd_t *bd)
 
 int board_eth_init(bd_t *bis)
 {
+       cpu_eth_init(bis); /* Built in FEC comes first */
        return pci_eth_init(bis);
 }
index 3332f5aca6348ea45184ba95b4e4c3efafd40e15..648b45e43489b951e4edb0b313bf948d5ff74b60 100644 (file)
@@ -35,6 +35,7 @@
 #include <fpga.h>
 #include <environment.h>
 #include <fdt_support.h>
+#include <netdev.h>
 #include <asm/io.h>
 #include "fpga.h"
 #include "mvbc_p.h"
@@ -324,3 +325,8 @@ void ft_board_setup(void *blob, bd_t *bd)
        ft_cpu_setup(blob, bd);
        fdt_fixup_memory(blob, (u64)bd->bi_memstart, (u64)bd->bi_memsize);
 }
+
+int board_eth_init(bd_t *bis)
+{
+       return cpu_eth_init(bis); /* Built in FEC comes first */
+}
index 37832dea8c1d845b3a4b01c1da5e5d0c08b3dcfd..19faf52aff1966c1f2a13e905de4368531f05839 100644 (file)
@@ -184,5 +184,6 @@ void pci_init_board(void)
 
 int board_eth_init(bd_t *bis)
 {
+       cpu_eth_init(bis); /* Built in FEC comes first */
        return pci_eth_init(bis);
 }
index c9610fbafbf762cfa231f0ef38d708b56938fb4f..a9d63cc35ad36bb436b5fbdf889f5c6133e63c18 100644 (file)
@@ -325,5 +325,6 @@ void doc_init (void)
 
 int board_eth_init(bd_t *bis)
 {
+       cpu_eth_init(bis); /* Built in FEC comes first */
        return pci_eth_init(bis);
 }
index c1848fc5a11d6f3e8923fac6fc8e2df3e7f0f15d..ec00a67df16f5f77c41ac7c6cf71fb5a15e1b06b 100644 (file)
@@ -312,5 +312,6 @@ int board_get_height (void)
 
 int board_eth_init(bd_t *bis)
 {
+       cpu_eth_init(bis); /* Built in FEC comes first */
        return pci_eth_init(bis);
 }
index d75aa9b879dff700a160c77c01c4ba3271827ade..5152331abdbadaf20d9f87ca774a12941b452903 100644 (file)
@@ -753,5 +753,6 @@ void ft_board_setup(void *blob, bd_t *bd)
 
 int board_eth_init(bd_t *bis)
 {
+       cpu_eth_init(bis); /* Built in FEC comes first */
        return pci_eth_init(bis);
 }
index 0ed2899630a5aaac0b3ed2c0a2cba590dfa8b1c8..1326c3cc99e72c51ff0c8e2ac9b139dfafbeb01a 100644 (file)
@@ -29,6 +29,7 @@
 #include <watchdog.h>
 #include <command.h>
 #include <mpc5xxx.h>
+#include <netdev.h>
 #include <asm/io.h>
 #include <asm/processor.h>
 
@@ -155,3 +156,15 @@ ulong bootcount_load (void)
                return (*save_addr & 0x0000ffff);
 }
 #endif /* CONFIG_BOOTCOUNT_LIMIT */
+
+#ifdef CONFIG_MPC5xxx_FEC
+/* Default initializations for FEC controllers.  To override,
+ * create a board-specific function called:
+ *     int board_eth_init(bd_t *bis)
+ */
+
+int cpu_eth_init(bd_t *bis)
+{
+       return mpc5xxx_fec_initialize(bis);
+}
+#endif
index 3d3eb8bae83dc22deb1f41257e98cb314ff3c214..f8618b1726e6761597fa326ed3fe7d674fe9603f 100644 (file)
@@ -11,6 +11,7 @@
 #include <mpc5xxx_sdma.h>
 #include <malloc.h>
 #include <net.h>
+#include <netdev.h>
 #include <miiphy.h>
 #include "mpc5xxx_fec.h"
 
index 487d319b781f16b61cc4e434773125074cd4f45d..f7738cc4631b73999fdfea1d29af151552bfc520 100644 (file)
@@ -50,6 +50,7 @@ int macb_eth_initialize(int id, void *regs, unsigned int phy_addr);
 int mcdmafec_initialize(bd_t *bis);
 int mcffec_initialize(bd_t *bis);
 int mpc512x_fec_initialize(bd_t *bis);
+int mpc5xxx_fec_initialize(bd_t *bis);
 int natsemi_initialize(bd_t *bis);
 int ns8382x_initialize(bd_t *bis);
 int pcnet_initialize(bd_t *bis);
index b61d0fc34f3a920bd658695c633b0e134c282fc8..053179e4314bdb9f9f1f222924a84af508ed9dc2 100644 (file)
--- a/net/eth.c
+++ b/net/eth.c
@@ -44,7 +44,6 @@ extern int dc21x4x_initialize(bd_t*);
 extern int e1000_initialize(bd_t*);
 extern int eepro100_initialize(bd_t*);
 extern int fec_initialize(bd_t*);
-extern int mpc5xxx_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 *);
@@ -173,9 +172,6 @@ int eth_initialize(bd_t *bis)
 #ifdef SCC_ENET
        scc_initialize(bis);
 #endif
-#if defined(CONFIG_MPC5xxx_FEC)
-       mpc5xxx_fec_initialize(bis);
-#endif
 #if defined(CONFIG_MPC8220_FEC)
        mpc8220_fec_initialize(bis);
 #endif