summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBen Warren <biggerbadderben@gmail.com>2008-07-11 23:15:28 -0700
committerBen Warren <biggerbadderben@gmail.com>2008-08-26 22:17:36 -0700
commit914947313a710f5dcf06beaf7f2aa24f1ebcce4f (patch)
tree696bb8c7426f1be5847d2ff8cb00c3e75da8a505
parentfc363ce35408f348cacced68505f3747a53e3d7c (diff)
downloadu-boot-imx-914947313a710f5dcf06beaf7f2aa24f1ebcce4f.zip
u-boot-imx-914947313a710f5dcf06beaf7f2aa24f1ebcce4f.tar.gz
u-boot-imx-914947313a710f5dcf06beaf7f2aa24f1ebcce4f.tar.bz2
Moved initialization of Blackfin EMAC Ethernet controller to board_eth_init()
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>
-rw-r--r--board/bf537-stamp/bf537-stamp.c10
-rw-r--r--drivers/net/bfin_mac.c2
-rw-r--r--net/eth.c4
3 files changed, 11 insertions, 5 deletions
diff --git a/board/bf537-stamp/bf537-stamp.c b/board/bf537-stamp/bf537-stamp.c
index cd7a04d..a9b7a68 100644
--- a/board/bf537-stamp/bf537-stamp.c
+++ b/board/bf537-stamp/bf537-stamp.c
@@ -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)
diff --git a/drivers/net/bfin_mac.c b/drivers/net/bfin_mac.c
index fe56949..3ee5d96 100644
--- a/drivers/net/bfin_mac.c
+++ b/drivers/net/bfin_mac.c
@@ -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,
diff --git a/net/eth.c b/net/eth.c
index c40a19c..1db9ab5 100644
--- 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);