summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBen Warren <biggerbadderben@gmail.com>2008-08-31 09:49:42 -0700
committerBen Warren <biggerbadderben@gmail.com>2008-09-02 21:18:16 -0700
commit02d69891d95ee76b0e86e1715a4dc0b964a57cb7 (patch)
tree14b2acc0eff565edead777387677937f4214af68
parent3ae071e44256144d6c1e3febb65f6c56bd433769 (diff)
downloadu-boot-imx-02d69891d95ee76b0e86e1715a4dc0b964a57cb7.zip
u-boot-imx-02d69891d95ee76b0e86e1715a4dc0b964a57cb7.tar.gz
u-boot-imx-02d69891d95ee76b0e86e1715a4dc0b964a57cb7.tar.bz2
Moved initialization of RTL8169 Ethernet controller to board_eth_init()
Affected boards: linkstation r7780mp Removed initialization of the driver from net/eth.c Signed-off-by: Ben Warren <biggerbadderben@gmail.com>
-rw-r--r--board/linkstation/linkstation.c6
-rw-r--r--board/r7780mp/r7780mp.c6
-rw-r--r--drivers/net/rtl8169.c1
-rw-r--r--include/netdev.h4
-rw-r--r--net/eth.c5
5 files changed, 17 insertions, 5 deletions
diff --git a/board/linkstation/linkstation.c b/board/linkstation/linkstation.c
index 241cf03..afb96ae 100644
--- a/board/linkstation/linkstation.c
+++ b/board/linkstation/linkstation.c
@@ -26,6 +26,7 @@
#include <mpc824x.h>
#include <asm/io.h>
#include <ns16550.h>
+#include <netdev.h>
#ifdef CONFIG_PCI
#include <pci.h>
@@ -128,3 +129,8 @@ int board_early_init_f (void)
out_8((volatile u8*)UART_DCR, 1);
return 0;
}
+
+int board_eth_init(bd_t *bis)
+{
+ return pci_eth_init(bis);
+}
diff --git a/board/r7780mp/r7780mp.c b/board/r7780mp/r7780mp.c
index 19c35d3..efbeec9 100644
--- a/board/r7780mp/r7780mp.c
+++ b/board/r7780mp/r7780mp.c
@@ -23,6 +23,7 @@
#include <asm/processor.h>
#include <asm/io.h>
#include <asm/pci.h>
+#include <netdev.h>
#include "r7780mp.h"
int checkboard(void)
@@ -77,3 +78,8 @@ void pci_init_board(void)
{
pci_sh7780_init(&hose);
}
+
+int board_eth_init(bd_t *bis)
+{
+ return pci_eth_init(bis);
+}
diff --git a/drivers/net/rtl8169.c b/drivers/net/rtl8169.c
index 7c00926..e9f6391 100644
--- a/drivers/net/rtl8169.c
+++ b/drivers/net/rtl8169.c
@@ -55,6 +55,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 3ec9212..954de39 100644
--- a/include/netdev.h
+++ b/include/netdev.h
@@ -46,6 +46,7 @@ int greth_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);
+int rtl8169_initialize(bd_t *bis);
int skge_initialize(bd_t *bis);
int uli526x_initialize(bd_t *bis);
@@ -56,6 +57,9 @@ int uli526x_initialize(bd_t *bis);
static inline int pci_eth_init(bd_t *bis)
{
int num = 0;
+#if defined(CONFIG_RTL8169)
+ num += rtl8169_initialize(bis);
+#endif
#if defined(CONFIG_ULI526)
num += uli526x_initialize(bis);
#endif
diff --git a/net/eth.c b/net/eth.c
index 71feb07..69f66b4 100644
--- a/net/eth.c
+++ b/net/eth.c
@@ -61,7 +61,6 @@ extern int pcnet_initialize(bd_t*);
extern int plb2800_eth_initialize(bd_t*);
extern int ppc_4xx_eth_initialize(bd_t *);
extern int rtl8139_initialize(bd_t*);
-extern int rtl8169_initialize(bd_t*);
extern int scc_initialize(bd_t*);
extern int tsi108_eth_initialize(bd_t*);
extern int npe_initialize(bd_t *);
@@ -250,10 +249,6 @@ int eth_initialize(bd_t *bis)
#if defined(CONFIG_RTL8139)
rtl8139_initialize(bis);
#endif
-#if defined(CONFIG_RTL8169)
- rtl8169_initialize(bis);
-#endif
-
if (!eth_devices) {
puts ("No ethernet found.\n");
show_boot_progress (-64);