* [U-Boot-Users] [PATCH 0/3] More net/eth.c cleanup
@ 2008-07-12 7:47 Ben Warren
2008-07-12 7:47 ` [U-Boot-Users] [PATCH 1/3] Moved initialization of Blackfin EMAC Ethernet controller to board_eth_init() Ben Warren
0 siblings, 1 reply; 4+ messages in thread
From: Ben Warren @ 2008-07-12 7:47 UTC (permalink / raw)
To: u-boot
Hello,
More cleanup of net/eth.c, this time taking care of the following:
- Blackfin EMAC
- ULi526x
- SKGE
I don't have any of this hardware, so testing consisted of compiling only.
This patch is being staged in the 'testing' branch of the net repo.
regards,
Ben
^ permalink raw reply [flat|nested] 4+ messages in thread
* [U-Boot-Users] [PATCH 1/3] Moved initialization of Blackfin EMAC Ethernet controller to board_eth_init()
2008-07-12 7:47 [U-Boot-Users] [PATCH 0/3] More net/eth.c cleanup Ben Warren
@ 2008-07-12 7:47 ` Ben Warren
2008-07-12 7:47 ` [U-Boot-Users] [PATCH 2/3] Moved initialization of ULI526X Ethernet driver to board code Ben Warren
0 siblings, 1 reply; 4+ messages in thread
From: Ben Warren @ 2008-07-12 7:47 UTC (permalink / raw)
To: u-boot
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 | 10 ++++++++++
drivers/net/bfin_mac.c | 2 +-
net/eth.c | 4 ----
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 3c152bf..4eb20e3 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);
--
1.5.4.3
^ permalink raw reply related [flat|nested] 4+ messages in thread
* [U-Boot-Users] [PATCH 2/3] Moved initialization of ULI526X Ethernet driver to board code.
2008-07-12 7:47 ` [U-Boot-Users] [PATCH 1/3] Moved initialization of Blackfin EMAC Ethernet controller to board_eth_init() Ben Warren
@ 2008-07-12 7:47 ` Ben Warren
2008-07-12 7:47 ` [U-Boot-Users] [PATCH 3/3] Moved initialization of SKGE " Ben Warren
0 siblings, 1 reply; 4+ messages in thread
From: Ben Warren @ 2008-07-12 7:47 UTC (permalink / raw)
To: u-boot
The only board using this driver is the Freescale MPC8610HPCD board.
Removed initialization for the driver from net/eth.c
Signed-off-by: Ben Warren <biggerbadderben@gmail.com>
---
board/freescale/mpc8610hpcd/mpc8610hpcd.c | 10 ++++++++++
net/eth.c | 4 ----
2 files changed, 10 insertions(+), 4 deletions(-)
diff --git a/board/freescale/mpc8610hpcd/mpc8610hpcd.c b/board/freescale/mpc8610hpcd/mpc8610hpcd.c
index c85f373..0122e6d 100644
--- a/board/freescale/mpc8610hpcd/mpc8610hpcd.c
+++ b/board/freescale/mpc8610hpcd/mpc8610hpcd.c
@@ -515,3 +515,13 @@ get_board_sys_clk(ulong dummy)
return val;
}
+
+extern int uli526x_initialize(bd_t *);
+
+int board_eth_init(bd_t *bis)
+{
+#if defined(CONFIG_ULI526)
+ uli526x_initialize(bis);
+#endif
+ return 0;
+}
diff --git a/net/eth.c b/net/eth.c
index 4eb20e3..eaa58fa 100644
--- a/net/eth.c
+++ b/net/eth.c
@@ -65,7 +65,6 @@ extern int rtl8169_initialize(bd_t*);
extern int scc_initialize(bd_t*);
extern int skge_initialize(bd_t*);
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 at91sam9_eth_initialize(bd_t *);
@@ -253,9 +252,6 @@ int eth_initialize(bd_t *bis)
#if defined(CONFIG_TSI108_ETH)
tsi108_eth_initialize(bis);
#endif
-#if defined(CONFIG_ULI526X)
- uli526x_initialize(bis);
-#endif
#if defined(CONFIG_RTL8139)
rtl8139_initialize(bis);
#endif
--
1.5.4.3
^ permalink raw reply related [flat|nested] 4+ messages in thread
* [U-Boot-Users] [PATCH 3/3] Moved initialization of SKGE Ethernet driver to board code.
2008-07-12 7:47 ` [U-Boot-Users] [PATCH 2/3] Moved initialization of ULI526X Ethernet driver to board code Ben Warren
@ 2008-07-12 7:47 ` Ben Warren
0 siblings, 0 replies; 4+ messages in thread
From: Ben Warren @ 2008-07-12 7:47 UTC (permalink / raw)
To: u-boot
The only board using this driver is the SL8245 board.
Removed initialization for the driver from net/eth.c
Signed-off-by: Ben Warren <biggerbadderben@gmail.com>
---
board/sl8245/sl8245.c | 13 +++++++++++++
drivers/net/sk98lin/uboot_drv.c | 2 +-
net/eth.c | 4 ----
3 files changed, 14 insertions(+), 5 deletions(-)
diff --git a/board/sl8245/sl8245.c b/board/sl8245/sl8245.c
index 8647887..c853755 100644
--- a/board/sl8245/sl8245.c
+++ b/board/sl8245/sl8245.c
@@ -66,3 +66,16 @@ void pci_init_board(void)
{
pci_mpc824x_init(&hose);
}
+
+extern int skge_initialize(bd_t *bis);
+
+int board_eth_init(bd_t *bis)
+{
+ int rc = 0;
+
+#if defined(CONFIG_SK98)
+ rc = skge_initialize(bis);
+#endif
+ return rc;
+}
+
diff --git a/drivers/net/sk98lin/uboot_drv.c b/drivers/net/sk98lin/uboot_drv.c
index 8b04842..205e7d2 100644
--- a/drivers/net/sk98lin/uboot_drv.c
+++ b/drivers/net/sk98lin/uboot_drv.c
@@ -70,7 +70,7 @@ int skge_initialize(bd_t * bis)
eth_register(dev[i]);
}
- return numdev;
+ return ((numdev > 0) && (numdev <= SKGE_MAX_CARDS) ? 0 : -1);
}
diff --git a/net/eth.c b/net/eth.c
index eaa58fa..9ab206d 100644
--- a/net/eth.c
+++ b/net/eth.c
@@ -63,7 +63,6 @@ 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 skge_initialize(bd_t*);
extern int tsi108_eth_initialize(bd_t*);
extern int npe_initialize(bd_t *);
extern int uec_initialize(int);
@@ -200,9 +199,6 @@ int eth_initialize(bd_t *bis)
#if defined(CONFIG_MPC8220_FEC)
mpc8220_fec_initialize(bis);
#endif
-#if defined(CONFIG_SK98)
- skge_initialize(bis);
-#endif
#if defined(CONFIG_UEC_ETH1)
uec_initialize(0);
#endif
--
1.5.4.3
^ permalink raw reply related [flat|nested] 4+ messages in thread
end of thread, other threads:[~2008-07-12 7:47 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-07-12 7:47 [U-Boot-Users] [PATCH 0/3] More net/eth.c cleanup Ben Warren
2008-07-12 7:47 ` [U-Boot-Users] [PATCH 1/3] Moved initialization of Blackfin EMAC Ethernet controller to board_eth_init() Ben Warren
2008-07-12 7:47 ` [U-Boot-Users] [PATCH 2/3] Moved initialization of ULI526X Ethernet driver to board code Ben Warren
2008-07-12 7:47 ` [U-Boot-Users] [PATCH 3/3] Moved initialization of SKGE " Ben Warren
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox