Commit e1d7480b authored by Ben Warren's avatar Ben Warren

Moved initialization of MPC5xxx_FEC Ethernet driver to CPU directory

Modified board_eth_init() functions of boards that have this FEC in addition
to other Ethernet controllers.

Affected boards:
	bc3450
	icecube
	mvbc_p
	o2dnt
	pm520
	total5200
	tq5200

Removed initialization of controller from net/eth.c
Signed-off-by: default avatarBen Warren <biggerbadderben@gmail.com>
parent a0aad08f
...@@ -673,5 +673,6 @@ int board_get_height (void) ...@@ -673,5 +673,6 @@ int board_get_height (void)
int board_eth_init(bd_t *bis) int board_eth_init(bd_t *bis)
{ {
cpu_eth_init(bis); /* Built in FEC comes first */
return pci_eth_init(bis); return pci_eth_init(bis);
} }
...@@ -394,5 +394,6 @@ ft_board_setup(void *blob, bd_t *bd) ...@@ -394,5 +394,6 @@ ft_board_setup(void *blob, bd_t *bd)
int board_eth_init(bd_t *bis) int board_eth_init(bd_t *bis)
{ {
cpu_eth_init(bis); /* Built in FEC comes first */
return pci_eth_init(bis); return pci_eth_init(bis);
} }
...@@ -35,6 +35,7 @@ ...@@ -35,6 +35,7 @@
#include <fpga.h> #include <fpga.h>
#include <environment.h> #include <environment.h>
#include <fdt_support.h> #include <fdt_support.h>
#include <netdev.h>
#include <asm/io.h> #include <asm/io.h>
#include "fpga.h" #include "fpga.h"
#include "mvbc_p.h" #include "mvbc_p.h"
...@@ -324,3 +325,8 @@ void ft_board_setup(void *blob, bd_t *bd) ...@@ -324,3 +325,8 @@ void ft_board_setup(void *blob, bd_t *bd)
ft_cpu_setup(blob, bd); ft_cpu_setup(blob, bd);
fdt_fixup_memory(blob, (u64)bd->bi_memstart, (u64)bd->bi_memsize); fdt_fixup_memory(blob, (u64)bd->bi_memstart, (u64)bd->bi_memsize);
} }
int board_eth_init(bd_t *bis)
{
return cpu_eth_init(bis); /* Built in FEC comes first */
}
...@@ -184,5 +184,6 @@ void pci_init_board(void) ...@@ -184,5 +184,6 @@ void pci_init_board(void)
int board_eth_init(bd_t *bis) int board_eth_init(bd_t *bis)
{ {
cpu_eth_init(bis); /* Built in FEC comes first */
return pci_eth_init(bis); return pci_eth_init(bis);
} }
...@@ -325,5 +325,6 @@ void doc_init (void) ...@@ -325,5 +325,6 @@ void doc_init (void)
int board_eth_init(bd_t *bis) int board_eth_init(bd_t *bis)
{ {
cpu_eth_init(bis); /* Built in FEC comes first */
return pci_eth_init(bis); return pci_eth_init(bis);
} }
...@@ -312,5 +312,6 @@ int board_get_height (void) ...@@ -312,5 +312,6 @@ int board_get_height (void)
int board_eth_init(bd_t *bis) int board_eth_init(bd_t *bis)
{ {
cpu_eth_init(bis); /* Built in FEC comes first */
return pci_eth_init(bis); return pci_eth_init(bis);
} }
...@@ -753,5 +753,6 @@ void ft_board_setup(void *blob, bd_t *bd) ...@@ -753,5 +753,6 @@ void ft_board_setup(void *blob, bd_t *bd)
int board_eth_init(bd_t *bis) int board_eth_init(bd_t *bis)
{ {
cpu_eth_init(bis); /* Built in FEC comes first */
return pci_eth_init(bis); return pci_eth_init(bis);
} }
...@@ -29,6 +29,7 @@ ...@@ -29,6 +29,7 @@
#include <watchdog.h> #include <watchdog.h>
#include <command.h> #include <command.h>
#include <mpc5xxx.h> #include <mpc5xxx.h>
#include <netdev.h>
#include <asm/io.h> #include <asm/io.h>
#include <asm/processor.h> #include <asm/processor.h>
...@@ -155,3 +156,15 @@ ulong bootcount_load (void) ...@@ -155,3 +156,15 @@ ulong bootcount_load (void)
return (*save_addr & 0x0000ffff); return (*save_addr & 0x0000ffff);
} }
#endif /* CONFIG_BOOTCOUNT_LIMIT */ #endif /* CONFIG_BOOTCOUNT_LIMIT */
#ifdef CONFIG_MPC5xxx_FEC
/* Default initializations for FEC controllers. To override,
* create a board-specific function called:
* int board_eth_init(bd_t *bis)
*/
int cpu_eth_init(bd_t *bis)
{
return mpc5xxx_fec_initialize(bis);
}
#endif
...@@ -11,6 +11,7 @@ ...@@ -11,6 +11,7 @@
#include <mpc5xxx_sdma.h> #include <mpc5xxx_sdma.h>
#include <malloc.h> #include <malloc.h>
#include <net.h> #include <net.h>
#include <netdev.h>
#include <miiphy.h> #include <miiphy.h>
#include "mpc5xxx_fec.h" #include "mpc5xxx_fec.h"
......
...@@ -50,6 +50,7 @@ int macb_eth_initialize(int id, void *regs, unsigned int phy_addr); ...@@ -50,6 +50,7 @@ int macb_eth_initialize(int id, void *regs, unsigned int phy_addr);
int mcdmafec_initialize(bd_t *bis); int mcdmafec_initialize(bd_t *bis);
int mcffec_initialize(bd_t *bis); int mcffec_initialize(bd_t *bis);
int mpc512x_fec_initialize(bd_t *bis); int mpc512x_fec_initialize(bd_t *bis);
int mpc5xxx_fec_initialize(bd_t *bis);
int natsemi_initialize(bd_t *bis); int natsemi_initialize(bd_t *bis);
int ns8382x_initialize(bd_t *bis); int ns8382x_initialize(bd_t *bis);
int pcnet_initialize(bd_t *bis); int pcnet_initialize(bd_t *bis);
......
...@@ -44,7 +44,6 @@ extern int dc21x4x_initialize(bd_t*); ...@@ -44,7 +44,6 @@ extern int dc21x4x_initialize(bd_t*);
extern int e1000_initialize(bd_t*); extern int e1000_initialize(bd_t*);
extern int eepro100_initialize(bd_t*); extern int eepro100_initialize(bd_t*);
extern int fec_initialize(bd_t*); extern int fec_initialize(bd_t*);
extern int mpc5xxx_fec_initialize(bd_t*);
extern int mpc8220_fec_initialize(bd_t*); extern int mpc8220_fec_initialize(bd_t*);
extern int mv6436x_eth_initialize(bd_t *); extern int mv6436x_eth_initialize(bd_t *);
extern int mv6446x_eth_initialize(bd_t *); extern int mv6446x_eth_initialize(bd_t *);
...@@ -173,9 +172,6 @@ int eth_initialize(bd_t *bis) ...@@ -173,9 +172,6 @@ int eth_initialize(bd_t *bis)
#ifdef SCC_ENET #ifdef SCC_ENET
scc_initialize(bis); scc_initialize(bis);
#endif #endif
#if defined(CONFIG_MPC5xxx_FEC)
mpc5xxx_fec_initialize(bis);
#endif
#if defined(CONFIG_MPC8220_FEC) #if defined(CONFIG_MPC8220_FEC)
mpc8220_fec_initialize(bis); mpc8220_fec_initialize(bis);
#endif #endif
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment