summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBen Warren <biggerbadderben@gmail.com>2008-08-31 10:13:34 -0700
committerBen Warren <biggerbadderben@gmail.com>2008-09-02 21:18:17 -0700
commit6aca145e067efe75398e9fac97822bd3700de0b2 (patch)
treed8b8fe359483ed29ece36f2cb6e293479170dca0
parente3090534d62045dcb73f5392bacc64a4e8e443dc (diff)
downloadu-boot-imx-6aca145e067efe75398e9fac97822bd3700de0b2.zip
u-boot-imx-6aca145e067efe75398e9fac97822bd3700de0b2.tar.gz
u-boot-imx-6aca145e067efe75398e9fac97822bd3700de0b2.tar.bz2
Moved initialization of GT6426x Ethernet controller to board_eth_init()
Affected boards: EVB64260 P3G4 ZUMA Removed initialization of the driver from net/eth.c Signed-off-by: Ben Warren <biggerbadderben@gmail.com>
-rw-r--r--board/evb64260/eth.c1
-rw-r--r--board/evb64260/evb64260.c8
-rw-r--r--include/netdev.h1
-rw-r--r--net/eth.c7
4 files changed, 9 insertions, 8 deletions
diff --git a/board/evb64260/eth.c b/board/evb64260/eth.c
index fa5b6d4..ca8bab5 100644
--- a/board/evb64260/eth.c
+++ b/board/evb64260/eth.c
@@ -27,6 +27,7 @@ Skeleton NIC driver for Etherboot
#include <asm/cache.h>
#include <miiphy.h>
#include <net.h>
+#include <netdev.h>
#include "eth.h"
#include "eth_addrtbl.h"
diff --git a/board/evb64260/evb64260.c b/board/evb64260/evb64260.c
index ab59941..bc108d0 100644
--- a/board/evb64260/evb64260.c
+++ b/board/evb64260/evb64260.c
@@ -31,6 +31,7 @@
#include <galileo/pci.h>
#include <galileo/gt64260R.h>
#include <net.h>
+#include <netdev.h>
#include <asm/io.h>
#include "eth.h"
@@ -248,7 +249,6 @@ int board_early_init_f (void)
sram_boot = 1;
#endif
- if (!sram_boot)
memoryMapDeviceSpace(DEVICE0, CFG_DEV0_SPACE, CFG_DEV0_SIZE);
memoryMapDeviceSpace(DEVICE1, CFG_DEV1_SPACE, CFG_DEV1_SIZE);
@@ -443,3 +443,9 @@ display_mem_map(void)
printf(" BOOT: base - 0x%08x\tsize - %dM bytes\twidth - %d bits\n",
base, size>>20, width);
}
+
+int board_eth_init(bd_t *bis)
+{
+ gt6426x_eth_initialize(bis);
+ return 0;
+}
diff --git a/include/netdev.h b/include/netdev.h
index b1dadd8..666d12d 100644
--- a/include/netdev.h
+++ b/include/netdev.h
@@ -43,6 +43,7 @@ int cpu_eth_init(bd_t *bis);
/* Driver initialization prototypes */
int bfin_EMAC_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);
int mcdmafec_initialize(bd_t *bis);
int mcffec_initialize(bd_t *bis);
diff --git a/net/eth.c b/net/eth.c
index aa6b2c8..99efa16 100644
--- a/net/eth.c
+++ b/net/eth.c
@@ -39,10 +39,6 @@ static int __def_eth_init(bd_t *bis)
int cpu_eth_init(bd_t *bis) __attribute((weak, alias("__def_eth_init")));
int board_eth_init(bd_t *bis) __attribute((weak, alias("__def_eth_init")));
-#ifdef CFG_GT_6426x
-extern int gt6426x_eth_initialize(bd_t *bis);
-#endif
-
extern int au1x00_enet_initialize(bd_t*);
extern int dc21x4x_initialize(bd_t*);
extern int e1000_initialize(bd_t*);
@@ -226,9 +222,6 @@ int eth_initialize(bd_t *bis)
#ifdef CONFIG_3COM
eth_3com_initialize(bis);
#endif
-#ifdef CFG_GT_6426x
- gt6426x_eth_initialize(bis);
-#endif
if (!eth_devices) {
puts ("No ethernet found.\n");
show_boot_progress (-64);