]> git.kernelconcepts.de Git - karo-tx-uboot.git/commitdiff
Moved initialization of E1000 Ethernet controller to board_eth_init()
authorBen Warren <biggerbadderben@gmail.com>
Sun, 31 Aug 2008 17:44:19 +0000 (10:44 -0700)
committerBen Warren <biggerbadderben@gmail.com>
Wed, 3 Sep 2008 04:18:18 +0000 (21:18 -0700)
Affected boards:
ap1000
mvbc_p
PM854

Removed initialization of the driver from net/eth.c

Signed-off-by: Ben Warren <biggerbadderben@gmail.com>
board/amirix/ap1000/ap1000.c
board/matrix_vision/mvbc_p/mvbc_p.c
board/pm854/pm854.c
drivers/net/e1000.c
drivers/net/e1000.h
include/netdev.h
net/eth.c

index 55277e72d544623cb247629d5e2fabb245cb9da0..8f30ed966bedbd96742355ba6142f5e6665e6af2 100644 (file)
@@ -23,6 +23,7 @@
 
 #include <common.h>
 #include <command.h>
+#include <netdev.h>
 #include <asm/processor.h>
 
 #include "powerspan.h"
@@ -697,3 +698,9 @@ U_BOOT_CMD (swrecon, 1, 0, do_swreconfig,
            "swrecon - trigger a board reconfigure to the software selected configuration\n",
            "\n"
            "    - trigger a board reconfigure to the software selected configuration\n");
+
+int board_eth_init(bd_t *bis)
+{
+       return pci_eth_init(bis);
+}
+
index 648b45e43489b951e4edb0b313bf948d5ff74b60..c88c4a60430443555e52aa40eeffb8db7a60adb2 100644 (file)
@@ -328,5 +328,6 @@ void ft_board_setup(void *blob, bd_t *bd)
 
 int board_eth_init(bd_t *bis)
 {
-       return cpu_eth_init(bis); /* Built in FEC comes first */
+       cpu_eth_init(bis); /* Built in FEC comes first */
+       return pci_eth_init(bis);
 }
index 7dbafb9a83b49ce42f7389a4c4b1017561d8b8ce..f366814618fc69f93d0af84ea5d58dc0a0cc1c10 100644 (file)
@@ -27,6 +27,7 @@
 
 #include <common.h>
 #include <pci.h>
+#include <netdev.h>
 #include <asm/processor.h>
 #include <asm/mmu.h>
 #include <asm/immap_85xx.h>
@@ -289,3 +290,8 @@ pci_init_board(void)
        pci_mpc85xx_init(&hose);
 #endif /* CONFIG_PCI */
 }
+
+int board_eth_init(bd_t *bis)
+{
+       return pci_eth_init(bis);
+}
index c8b4e98c669e60f315791b1b049a9d172425c1e9..2dcaa2c910fd6b56790c2c6c735f348f00a276f6 100644 (file)
@@ -3059,5 +3059,5 @@ e1000_initialize(bd_t * bis)
 
                card_number++;
        }
-       return 1;
+       return card_number;
 }
index c258bc2383e6526ab0bf1e12a18ee4cd0569c19f..08042a8cc3ce268199d7ce4d58835b594c3f69c2 100644 (file)
@@ -36,6 +36,7 @@
 #include <common.h>
 #include <malloc.h>
 #include <net.h>
+#include <netdev.h>
 #include <asm/io.h>
 #include <pci.h>
 
index 1013a803abd292cc28dccf24da3d85bc9bc13ead..fa4d92d755ee4d6fd875c9afcbd4c5d4b1c6808e 100644 (file)
@@ -42,6 +42,7 @@ int cpu_eth_init(bd_t *bis);
 
 /* Driver initialization prototypes */
 int bfin_EMAC_initialize(bd_t *bis);
+int e1000_initialize(bd_t *bis);
 int eth_3com_initialize (bd_t * bis);
 int greth_initialize(bd_t *bis);
 void gt6426x_eth_initialize(bd_t *bis);
@@ -69,6 +70,9 @@ static inline int pci_eth_init(bd_t *bis)
 {
        int num = 0;
 
+#ifdef CONFIG_E1000
+       num += e1000_initialize(bis);
+#endif
 #ifdef CONFIG_PCNET
        num += pcnet_initialize(bis);
 #endif
index 42c370b7dfb56b62d297c8e2dd9f966d8af08486..f9a99576a8196a596e3a666abfbb60b1e539ab29 100644 (file)
--- a/net/eth.c
+++ b/net/eth.c
@@ -41,7 +41,6 @@ int board_eth_init(bd_t *bis) __attribute((weak, alias("__def_eth_init")));
 
 extern int au1x00_enet_initialize(bd_t*);
 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 mpc8220_fec_initialize(bd_t*);
@@ -193,9 +192,6 @@ int eth_initialize(bd_t *bis)
 #if defined(CONFIG_IXP4XX_NPE)
        npe_initialize(bis);
 #endif
-#ifdef CONFIG_E1000
-       e1000_initialize(bis);
-#endif
 #ifdef CONFIG_EEPRO100
        eepro100_initialize(bis);
 #endif