summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBen Warren <biggerbadderben@gmail.com>2008-08-31 10:15:26 -0700
committerBen Warren <biggerbadderben@gmail.com>2008-09-02 21:18:17 -0700
commit164846eeb25cb2a5ede7ab9371fdca7f4831a055 (patch)
tree79ef10ad970b8395b48b973990207238a1e2e051
parent6aca145e067efe75398e9fac97822bd3700de0b2 (diff)
downloadu-boot-imx-164846eeb25cb2a5ede7ab9371fdca7f4831a055.zip
u-boot-imx-164846eeb25cb2a5ede7ab9371fdca7f4831a055.tar.gz
u-boot-imx-164846eeb25cb2a5ede7ab9371fdca7f4831a055.tar.bz2
Moved initialization of 3COM Ethernet controller (AmigaOne) to board_eth_init()
Affected boards: AmigaOneG3SE Removed initialization of the driver from net/eth.c Signed-off-by: Ben Warren <biggerbadderben@gmail.com>
-rw-r--r--board/MAI/AmigaOneG3SE/AmigaOneG3SE.c9
-rw-r--r--board/MAI/AmigaOneG3SE/enet.c1
-rw-r--r--include/netdev.h1
-rw-r--r--net/eth.c4
4 files changed, 11 insertions, 4 deletions
diff --git a/board/MAI/AmigaOneG3SE/AmigaOneG3SE.c b/board/MAI/AmigaOneG3SE/AmigaOneG3SE.c
index e118563..4d44001 100644
--- a/board/MAI/AmigaOneG3SE/AmigaOneG3SE.c
+++ b/board/MAI/AmigaOneG3SE/AmigaOneG3SE.c
@@ -26,6 +26,7 @@
#include <common.h>
#include <command.h>
#include <pci.h>
+#include <netdev.h>
#include "articiaS.h"
#include "memio.h"
#include "via686.h"
@@ -111,3 +112,11 @@ void pci_init_board (void)
articiaS_pci_init ();
#endif
}
+
+int board_eth_init(bd_t *bis)
+{
+#if defined(CONFIG_3COM)
+ eth_3com_initialize(bis);
+#endif
+ return 0;
+}
diff --git a/board/MAI/AmigaOneG3SE/enet.c b/board/MAI/AmigaOneG3SE/enet.c
index 5a90cc5..0b4dfe6 100644
--- a/board/MAI/AmigaOneG3SE/enet.c
+++ b/board/MAI/AmigaOneG3SE/enet.c
@@ -28,6 +28,7 @@
#include <common.h>
#include <malloc.h>
#include <net.h>
+#include <netdev.h>
#include <asm/io.h>
#include <pci.h>
diff --git a/include/netdev.h b/include/netdev.h
index 666d12d..0c16dd6 100644
--- a/include/netdev.h
+++ b/include/netdev.h
@@ -42,6 +42,7 @@ int cpu_eth_init(bd_t *bis);
/* Driver initialization prototypes */
int bfin_EMAC_initialize(bd_t *bis);
+int eth_3com_initialize (bd_t * bis);
int greth_initialize(bd_t *bis);
void gt6426x_eth_initialize(bd_t *bis);
int macb_eth_initialize(int id, void *regs, unsigned int phy_addr);
diff --git a/net/eth.c b/net/eth.c
index 99efa16..c4d7b63 100644
--- a/net/eth.c
+++ b/net/eth.c
@@ -43,7 +43,6 @@ 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 eth_3com_initialize(bd_t*);
extern int fec_initialize(bd_t*);
extern int inca_switch_initialize(bd_t*);
extern int mpc5xxx_fec_initialize(bd_t*);
@@ -219,9 +218,6 @@ int eth_initialize(bd_t *bis)
#ifdef CONFIG_TULIP
dc21x4x_initialize(bis);
#endif
-#ifdef CONFIG_3COM
- eth_3com_initialize(bis);
-#endif
if (!eth_devices) {
puts ("No ethernet found.\n");
show_boot_progress (-64);