PPC: Drop mv6436x_eth_initialize() from net/eth.c
PATCH 1/2 PPC: Drop mv6436x_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.
--- 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(-)
board/Marvell/db64360/db64360.c +5 -1
@@ -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; }
board/Marvell/db64360/eth.h +1 -0
@@ -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__ */
board/esd/cpci750/cpci750.c +5 -0
@@ -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); +}
board/esd/cpci750/eth.h +1 -0
@@ -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__ */
net/eth.c +0 -4
@@ -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
Signature · 1 line
1.7.9
PATCH 2/2 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.
--- board/Marvell/db64460/db64460.c | 6 +++++- board/Marvell/db64460/eth.h | 2 ++ board/prodrive/p3mx/eth.h | 1 + board/prodrive/p3mx/p3mx.c | 5 +++++ net/eth.c | 5 ----- 5 files changed, 13 insertions(+), 6 deletions(-)
board/Marvell/db64460/db64460.c +5 -1
@@ -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; }
board/Marvell/db64460/eth.h +2 -0
@@ -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__ */
board/prodrive/p3mx/eth.h +1 -0
@@ -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__ */
board/prodrive/p3mx/p3mx.c +5 -0
@@ -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); +}
net/eth.c +0 -5
@@ -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 );
@@ -251,9 +249,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 );
Signature · 1 line
1.7.9
Wolfgang Denk
AppliedPATCH 2/2 PPC: Drop mv6446x_eth_initialize() from net/eth.c
Dear Marek Vasut,
Quoted 5 lines · In message <[email protected]> you wrote:
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 <[email protected]>Cc Stefan Roese <[email protected]>
Quoted 7 lines
--- board/Marvell/db64460/db64460.c | 6 +++++- board/Marvell/db64460/eth.h | 2 ++ board/prodrive/p3mx/eth.h | 1 + board/prodrive/p3mx/p3mx.c | 5 +++++ net/eth.c | 5 ----- 5 files changed, 13 insertions(+), 6 deletions(-)
Applied, thanks.
Best regards,
Wolfgang Denk
Signature · 5 lines
DENX Software Engineering GmbH, MD: Wolfgang Denk & Detlev Zundel HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany Phone: (+49)-8142-66989-10 Fax: (+49)-8142-66989-80 Email: wd at denx.de A weak mind is like a microscope, which magnifies trifling things, but cannot receive great ones. -- Philip Earl of Chesterfield
Wolfgang Denk
AppliedPATCH 1/2 PPC: Drop mv6436x_eth_initialize() from net/eth.c
In reply to Marek VasutDear Marek Vasut,
Quoted 5 lines · In message <[email protected]> you wrote:
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 <[email protected]>Cc Reinhard Arlt <[email protected]>
Quoted 7 lines
--- 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(-)
Applied, thanks.
Best regards,
Wolfgang Denk
Signature · 6 lines
DENX Software Engineering GmbH, MD: Wolfgang Denk & Detlev Zundel HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany Phone: (+49)-8142-66989-10 Fax: (+49)-8142-66989-80 Email: wd at denx.de You Earth people glorified organized violence for forty centuries. But you imprison those who employ it privately. -- Spock, "Dagger of the Mind", stardate 2715.1