]> git.ipfire.org Git - people/ms/u-boot.git/commitdiff
Moved initialization of RTL8139 Ethernet controller to board_eth_init()
authorBen Warren <biggerbadderben@gmail.com>
Mon, 1 Sep 2008 04:41:08 +0000 (21:41 -0700)
committerBen Warren <biggerbadderben@gmail.com>
Wed, 3 Sep 2008 04:18:16 +0000 (21:18 -0700)
Affected boards:
hidden_dragon
MPC8544DS
MPC8610HPCN
R2DPLUS
TB0229

Removed initialization of the driver from net/eth.c

Signed-off-by: Ben Warren <biggerbadderben@gmail.com>
board/freescale/mpc8544ds/mpc8544ds.c
board/freescale/mpc8641hpcn/mpc8641hpcn.c
board/hidden_dragon/hidden_dragon.c
board/r2dplus/r2dplus.c
board/tb0229/tb0229.c
drivers/net/rtl8139.c
include/netdev.h
net/eth.c

index 1e29773cbe8dea004eeadb468d7ec6dd7c45414d..eaf6fa320052140c946c49d814642c60fd202b73 100644 (file)
@@ -33,6 +33,7 @@
 #include <libfdt.h>
 #include <fdt_support.h>
 #include <tsec.h>
+#include <netdev.h>
 
 #include "../common/pixis.h"
 #include "../common/sgmii_riser.h"
@@ -465,9 +466,9 @@ get_board_sys_clk(ulong dummy)
        return val;
 }
 
-#ifdef CONFIG_TSEC_ENET
 int board_eth_init(bd_t *bis)
 {
+#ifdef CONFIG_TSEC_ENET
        struct tsec_info_struct tsec_info[2];
        volatile ccsr_gur_t *gur = (void *)(CFG_MPC85xx_GUTS_ADDR);
        uint io_sel = (gur->pordevsr & MPC85xx_PORDEVSR_IO_SEL) >> 19;
@@ -497,10 +498,9 @@ int board_eth_init(bd_t *bis)
 
 
        tsec_eth_init(bis, tsec_info, num);
-
-       return 0;
-}
 #endif
+       return pci_eth_init(bis);
+}
 
 #if defined(CONFIG_OF_BOARD_SETUP)
 
index 1bb563e41de0a8702f97fb8d63bf023870bca120..97f7f49e4955c03c437579a89390a6ffc6c8d180 100644 (file)
@@ -29,6 +29,7 @@
 #include <asm/io.h>
 #include <libfdt.h>
 #include <fdt_support.h>
+#include <netdev.h>
 
 #include "../common/pixis.h"
 
@@ -379,3 +380,10 @@ get_board_sys_clk(ulong dummy)
 
        return val;
 }
+
+int board_eth_init(bd_t *bis)
+{
+       /* Initialize TSECs */
+       cpu_eth_init(bis);
+       return pci_eth_init(bis);
+}
index 5713a3384feef9502cc1e9f453f09ee9c5f287c4..2d7a7870e5296669cef6c0082cf3f5c87812623b 100644 (file)
@@ -27,6 +27,7 @@
 #include <common.h>
 #include <mpc824x.h>
 #include <pci.h>
+#include <netdev.h>
 
 int checkboard (void)
 {
@@ -93,3 +94,8 @@ void pci_init_board(void)
 {
        pci_mpc824x_init(&hose);
 }
+
+int board_eth_init(bd_t *bis)
+{
+       return pci_eth_init(bis);
+}
index 8fb8ff667a328a026895507fa708fd6162c7616f..b962dd1fe7df9de881d5b7ba4b8d5611a81c3084 100644 (file)
@@ -76,3 +76,8 @@ void pci_init_board(void)
 {
        pci_sh7751_init(&hose);
 }
+
+int board_eth_init(bd_t *bis)
+{
+       return pci_eth_init(bis);
+}
index 921bd3adcdb524cde53362e54541e88452d8ccc6..2abb4a7e2dc6373e9b1b4955b930e432f0d42acd 100644 (file)
@@ -46,3 +46,8 @@ int checkboard (void)
 
        return 0;
 }
+
+int board_eth_init(bd_t *bis)
+{
+       return pci_eth_init(bis);
+}
index 4fd20ac4fe1efed50b177d7bc6e95002fdab41b8..d378ce39b4822ca76c10cfaa76c7f8b5a315435c 100644 (file)
@@ -74,6 +74,7 @@
 #include <common.h>
 #include <malloc.h>
 #include <net.h>
+#include <netdev.h>
 #include <asm/io.h>
 #include <pci.h>
 
index 954de39185f6c9f5b3e5abacfec9075b91cb042b..b333755ba09bf21123e9080e3e2798630ddfe977 100644 (file)
@@ -46,6 +46,7 @@ int greth_initialize(bd_t *bis);
 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 rtl8139_initialize(bd_t *bis);
 int rtl8169_initialize(bd_t *bis);
 int skge_initialize(bd_t *bis);
 int uli526x_initialize(bd_t *bis);
@@ -57,6 +58,9 @@ int uli526x_initialize(bd_t *bis);
 static inline int pci_eth_init(bd_t *bis)
 {
        int num = 0;
+#if defined(CONFIG_RTL8139)
+       num += rtl8139_initialize(bis);
+#endif
 #if defined(CONFIG_RTL8169)
        num += rtl8169_initialize(bis);
 #endif
index 69f66b49fa0975d266abe42d8e68a4b47d8fd6da..092d42681ee0189cb3bbc99fad5a77af80316f08 100644 (file)
--- a/net/eth.c
+++ b/net/eth.c
@@ -60,7 +60,6 @@ extern int ns8382x_initialize(bd_t*);
 extern int pcnet_initialize(bd_t*);
 extern int plb2800_eth_initialize(bd_t*);
 extern int ppc_4xx_eth_initialize(bd_t *);
-extern int rtl8139_initialize(bd_t*);
 extern int scc_initialize(bd_t*);
 extern int tsi108_eth_initialize(bd_t*);
 extern int npe_initialize(bd_t *);
@@ -245,9 +244,6 @@ int eth_initialize(bd_t *bis)
 #endif
 #if defined(CONFIG_TSI108_ETH)
        tsi108_eth_initialize(bis);
-#endif
-#if defined(CONFIG_RTL8139)
-       rtl8139_initialize(bis);
 #endif
        if (!eth_devices) {
                puts ("No ethernet found.\n");