PPC: Drop mv6446x_eth_initialize() from net/eth.c
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: Stefan Roese <sr@denx.de>
diff --git a/board/Marvell/db64460/db64460.c b/board/Marvell/db64460/db64460.c
index a7836ed..d4f58b3 100644
--- a/board/Marvell/db64460/db64460.c
+++ b/board/Marvell/db64460/db64460.c
@@ -934,5 +934,9 @@
int board_eth_init(bd_t *bis)
{
- return pci_eth_init(bis);
+ int ret;
+ ret = pci_eth_init(bis);
+ if (!ret)
+ ret = mv6446x_eth_initialize(bis);
+ return ret;
}
diff --git a/board/Marvell/db64460/eth.h b/board/Marvell/db64460/eth.h
index 6c3b2e0..59cfd6f 100644
--- a/board/Marvell/db64460/eth.h
+++ b/board/Marvell/db64460/eth.h
@@ -38,4 +38,6 @@
void db64460_eth0_disable(void);
bool network_start(bd_t *bis);
+int mv6446x_eth_initialize(bd_t *);
+
#endif /* __EVB64460_ETH_H__ */
diff --git a/board/prodrive/p3mx/eth.h b/board/prodrive/p3mx/eth.h
index aab32d2..44ffba8 100644
--- a/board/prodrive/p3mx/eth.h
+++ b/board/prodrive/p3mx/eth.h
@@ -39,5 +39,6 @@
void db64360_eth0_disable(void);
bool network_start(bd_t *bis);
+int mv6446x_eth_initialize(bd_t *);
#endif /* __EVB64360_ETH_H__ */
diff --git a/board/prodrive/p3mx/p3mx.c b/board/prodrive/p3mx/p3mx.c
index 09e4f82..389affc 100644
--- a/board/prodrive/p3mx/p3mx.c
+++ b/board/prodrive/p3mx/p3mx.c
@@ -851,3 +851,8 @@
!= temp);
}
+
+int board_eth_init(bd_t *bis)
+{
+ return mv6446x_eth_initialize(bis);
+}
diff --git a/net/eth.c b/net/eth.c
index a5780c5..f14767b 100644
--- a/net/eth.c
+++ b/net/eth.c
@@ -81,8 +81,6 @@
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 mv6446x_eth_initialize(bd_t *);
-
#ifdef CONFIG_API
extern void (*push_packet)(volatile void *, int);
@@ -280,9 +278,6 @@
} else
printf("Net Initialization Skipped\n");
-#if defined(CONFIG_DB64460) || defined(CONFIG_P3Mx)
- mv6446x_eth_initialize(bis);
-#endif
if (!eth_devices) {
puts ("No ethernet found.\n");
show_boot_progress (-64);