]> git.ipfire.org Git - people/ms/u-boot.git/commitdiff
PPC: Drop mv6446x_eth_initialize() from net/eth.c
authorMarek Vasut <marex@denx.de>
Fri, 2 Mar 2012 22:39:32 +0000 (22:39 +0000)
committerWolfgang Denk <wd@denx.de>
Tue, 6 Mar 2012 20:13:26 +0000 (21:13 +0100)
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>
board/Marvell/db64460/db64460.c
board/Marvell/db64460/eth.h
board/prodrive/p3mx/eth.h
board/prodrive/p3mx/p3mx.c
net/eth.c

index a7836edb4d6d32bcb75493c3cc3aa101bee7feac..d4f58b3216adf0bdc1e622a71a769c1b64d01ab8 100644 (file)
@@ -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 = mv6446x_eth_initialize(bis);
+       return ret;
 }
index 6c3b2e0ba02bee43ae6fbbf06698450ed483e2a1..59cfd6f3ea982ee3bcb5946d808c1ebc96ea63b4 100644 (file)
@@ -38,4 +38,6 @@ int db64460_eth0_transmit(unsigned int s, volatile char *p);
 void db64460_eth0_disable(void);
 bool network_start(bd_t *bis);
 
+int mv6446x_eth_initialize(bd_t *);
+
 #endif /* __EVB64460_ETH_H__ */
index aab32d2a5af0f409ef39094dd093a5817e2d3943..44ffba8c638404589dc496d74c8fce89a63bc307 100644 (file)
@@ -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 mv6446x_eth_initialize(bd_t *);
 
 #endif /* __EVB64360_ETH_H__ */
index 09e4f823f0147f88b0ed1b8a23a4bbffa0de4c4b..389affcde0fda0718c954bb638a1eddad1d5f63d 100644 (file)
@@ -851,3 +851,8 @@ void my_remap_gt_regs_bootm (u32 cur_loc, u32 new_loc)
               != temp);
 
 }
+
+int board_eth_init(bd_t *bis)
+{
+       return mv6446x_eth_initialize(bis);
+}
index a5780c5462e6fc7ddf8f14a99cab50f873ad7b56..f14767b24afffbecea23e93f3b16e3225a650544 100644 (file)
--- a/net/eth.c
+++ b/net/eth.c
@@ -81,8 +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 mv6446x_eth_initialize(bd_t *);
-
 #ifdef CONFIG_API
 extern void (*push_packet)(volatile void *, int);
 
@@ -280,9 +278,6 @@ int eth_initialize(bd_t *bis)
        } 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);