]> git.sur5r.net Git - u-boot/commitdiff
Moved initialization of TSI108 Ethernet controller to board_eth_init()
authorBen Warren <biggerbadderben@gmail.com>
Sun, 31 Aug 2008 16:59:33 +0000 (09:59 -0700)
committerBen Warren <biggerbadderben@gmail.com>
Wed, 3 Sep 2008 04:18:16 +0000 (21:18 -0700)
Affected boards:
mpc7448hpc2

Removed initialization of the driver from net/eth.c

Signed-off-by: Ben Warren <biggerbadderben@gmail.com>
board/freescale/mpc7448hpc2/mpc7448hpc2.c
drivers/net/tsi108_eth.c
include/netdev.h
net/eth.c

index 6f74c314ebf129e5191c8ac80a016b57ab2fc151..cfdbed539394875bfff82886a8cdb9ee85602a33 100644 (file)
@@ -32,6 +32,7 @@
 #include <common.h>
 #include <74xx_7xx.h>
 #include <fdt_support.h>
+#include <netdev.h>
 
 #undef DEBUG
 
@@ -92,3 +93,12 @@ ft_board_setup(void *blob, bd_t *bd)
        fdt_fixup_memory(blob, (u64)bd->bi_memstart, (u64)bd->bi_memsize);
 }
 #endif
+
+int board_eth_init(bd_t *bis)
+{
+       int rc = 0;
+#if defined(CONFIG_TSI108_ETH)
+       rc = tsi108_eth_initialize(bis);
+#endif
+       return rc;
+}
index 2534097df5577e01250728feb7e921b8ab5fa6aa..50fa765f7019aef3c2de40e19ec3a12a062bb50f 100644 (file)
@@ -34,6 +34,7 @@
 #include <common.h>
 #include <malloc.h>
 #include <net.h>
+#include <netdev.h>
 #include <asm/cache.h>
 
 #ifdef DEBUG
index b333755ba09bf21123e9080e3e2798630ddfe977..5f6b38f3dbc6b25897f70e57a80804ac6a35cf36 100644 (file)
@@ -49,6 +49,7 @@ 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 tsi108_eth_initialize(bd_t *bis);
 int uli526x_initialize(bd_t *bis);
 
 /* Boards with PCI network controllers can call this from their board_eth_init()
index 092d42681ee0189cb3bbc99fad5a77af80316f08..65ebf2df02f562622cd09e5b362bfa57b617355e 100644 (file)
--- a/net/eth.c
+++ b/net/eth.c
@@ -61,7 +61,6 @@ extern int pcnet_initialize(bd_t*);
 extern int plb2800_eth_initialize(bd_t*);
 extern int ppc_4xx_eth_initialize(bd_t *);
 extern int scc_initialize(bd_t*);
-extern int tsi108_eth_initialize(bd_t*);
 extern int npe_initialize(bd_t *);
 extern int uec_initialize(int);
 
@@ -241,9 +240,6 @@ int eth_initialize(bd_t *bis)
 #endif
 #ifdef CONFIG_NS8382X
        ns8382x_initialize(bis);
-#endif
-#if defined(CONFIG_TSI108_ETH)
-       tsi108_eth_initialize(bis);
 #endif
        if (!eth_devices) {
                puts ("No ethernet found.\n");