Moved initialization of Blackfin EMAC Ethernet controller to board_eth_init()
authorBen Warren <biggerbadderben@gmail.com>
Sat, 12 Jul 2008 06:15:28 +0000 (23:15 -0700)
committerBen Warren <biggerbadderben@gmail.com>
Wed, 27 Aug 2008 05:17:36 +0000 (22:17 -0700)
Added board_eth_init() function to bf537-stamp board.
Removed initialization for the Blackin EMAC driver from net/eth.c

Signed-off-by: Ben Warren <biggerbadderben@gmail.com>
board/bf537-stamp/bf537-stamp.c
drivers/net/bfin_mac.c
net/eth.c

index cd7a04dbfa031b23880ef575a05cf465c4c60422..a9b7a68c549914c5840576ca07ffe8ecb0270932 100644 (file)
@@ -154,6 +154,16 @@ int misc_init_r(void)
 }
 #endif                         /* CONFIG_MISC_INIT_R */
 
+#if defined(CONFIG_BFIN_MAC)
+
+extern int bfin_EMAC_initialize(bd_t *bis);
+
+int board_eth_init(bd_t *bis)
+{
+       return bfin_EMAC_initialize(bis);
+}
+#endif
+
 #ifdef CONFIG_POST
 /* Using sw10-PF5 as the hotkey */
 int post_hotkeys_pressed(void)
index fe56949989f2b1729d37855e26b87a602ba922e0..3ee5d9603a55cdd3256e89b631c3fc974eb9f979 100644 (file)
@@ -88,7 +88,7 @@ int bfin_EMAC_initialize(bd_t *bis)
 
        eth_register(dev);
 
-       return 1;
+       return 0;
 }
 
 static int bfin_EMAC_send(struct eth_device *dev, volatile void *packet,
index c40a19ce2ee866570a520774058b7ff94318922a..1db9ab5fe80d253c39c6b6044823a85699081196 100644 (file)
--- a/net/eth.c
+++ b/net/eth.c
@@ -68,7 +68,6 @@ extern int tsi108_eth_initialize(bd_t*);
 extern int uli526x_initialize(bd_t *);
 extern int npe_initialize(bd_t *);
 extern int uec_initialize(int);
-extern int bfin_EMAC_initialize(bd_t *);
 extern int at91sam9_eth_initialize(bd_t *);
 
 #ifdef CONFIG_API
@@ -263,9 +262,6 @@ int eth_initialize(bd_t *bis)
 #if defined(CONFIG_RTL8169)
        rtl8169_initialize(bis);
 #endif
-#if defined(CONFIG_BF537)
-       bfin_EMAC_initialize(bis);
-#endif
 #if defined(CONFIG_AT91CAP9) || defined(CONFIG_AT91SAM9260) || \
     defined(CONFIG_AT91SAM9263)
        at91sam9_eth_initialize(bis);