public inbox for u-boot@lists.denx.de
 help / color / mirror / Atom feed
* [U-Boot] [PATCH 1/2] PPC: Drop mv6436x_eth_initialize() from net/eth.c
@ 2012-03-03  8:39 Marek Vasut
  2012-03-03  8:39 ` [U-Boot] [PATCH 2/2] PPC: Drop mv6446x_eth_initialize() " Marek Vasut
  2012-03-06 20:13 ` [U-Boot] [PATCH 1/2] PPC: Drop mv6436x_eth_initialize() " Wolfgang Denk
  0 siblings, 2 replies; 4+ messages in thread
From: Marek Vasut @ 2012-03-03  8:39 UTC (permalink / raw)
  To: u-boot

This function was defined as an extern in net/eth.c, drop that and use
standard means of calling it.

Signed-off-by: Marek Vasut <marex@denx.de>
Cc: Reinhard Arlt <reinhard.arlt@esd-electronics.com>
---
 board/Marvell/db64360/db64360.c |    6 +++++-
 board/Marvell/db64360/eth.h     |    1 +
 board/esd/cpci750/cpci750.c     |    5 +++++
 board/esd/cpci750/eth.h         |    1 +
 net/eth.c                       |    4 ----
 5 files changed, 12 insertions(+), 5 deletions(-)

diff --git a/board/Marvell/db64360/db64360.c b/board/Marvell/db64360/db64360.c
index 5183466..6cae686 100644
--- a/board/Marvell/db64360/db64360.c
+++ b/board/Marvell/db64360/db64360.c
@@ -934,5 +934,9 @@ void board_prebootm_init ()
 
 int board_eth_init(bd_t *bis)
 {
-	return pci_eth_init(bis);
+	int ret;
+	ret = pci_eth_init(bis);
+	if (!ret)
+		ret = mv6436x_eth_initialize(bis);
+	return ret;
 }
diff --git a/board/Marvell/db64360/eth.h b/board/Marvell/db64360/eth.h
index aab32d2..6fbfdfe 100644
--- a/board/Marvell/db64360/eth.h
+++ b/board/Marvell/db64360/eth.h
@@ -39,5 +39,6 @@ int db64360_eth0_transmit(unsigned int s, volatile char *p);
 void db64360_eth0_disable(void);
 bool network_start(bd_t *bis);
 
+int mv6436x_eth_initialize(bd_t *);
 
 #endif /* __EVB64360_ETH_H__ */
diff --git a/board/esd/cpci750/cpci750.c b/board/esd/cpci750/cpci750.c
index 08311c9..98051fb 100644
--- a/board/esd/cpci750/cpci750.c
+++ b/board/esd/cpci750/cpci750.c
@@ -1101,3 +1101,8 @@ U_BOOT_CMD(
 	pldver, 1, 1, do_pldver,
 	"Show PLD version",
 	"Show PLD version)");
+
+int board_eth_init(bd_t *bis)
+{
+	return mv6436x_eth_initialize(bis);
+}
diff --git a/board/esd/cpci750/eth.h b/board/esd/cpci750/eth.h
index aab32d2..6fbfdfe 100644
--- a/board/esd/cpci750/eth.h
+++ b/board/esd/cpci750/eth.h
@@ -39,5 +39,6 @@ int db64360_eth0_transmit(unsigned int s, volatile char *p);
 void db64360_eth0_disable(void);
 bool network_start(bd_t *bis);
 
+int mv6436x_eth_initialize(bd_t *);
 
 #endif /* __EVB64360_ETH_H__ */
diff --git a/net/eth.c b/net/eth.c
index b4b9b43..225b03f 100644
--- a/net/eth.c
+++ b/net/eth.c
@@ -81,7 +81,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")));
 
-extern int mv6436x_eth_initialize(bd_t *);
 extern int mv6446x_eth_initialize(bd_t *);
 
 #ifdef CONFIG_API
@@ -252,9 +251,6 @@ int eth_initialize(bd_t *bis)
 	} else
 		printf("Net Initialization Skipped\n");
 
-#if defined(CONFIG_DB64360) || defined(CONFIG_CPCI750)
-	mv6436x_eth_initialize(bis);
-#endif
 #if defined(CONFIG_DB64460) || defined(CONFIG_P3Mx)
 	mv6446x_eth_initialize(bis);
 #endif
-- 
1.7.9

^ permalink raw reply related	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2012-03-06 20:13 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-03-03  8:39 [U-Boot] [PATCH 1/2] PPC: Drop mv6436x_eth_initialize() from net/eth.c Marek Vasut
2012-03-03  8:39 ` [U-Boot] [PATCH 2/2] PPC: Drop mv6446x_eth_initialize() " Marek Vasut
2012-03-06 20:13   ` Wolfgang Denk
2012-03-06 20:13 ` [U-Boot] [PATCH 1/2] PPC: Drop mv6436x_eth_initialize() " Wolfgang Denk

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox