diff options
author | Ben Warren <biggerbadderben@gmail.com> | 2008-08-31 10:40:51 -0700 |
---|---|---|
committer | Ben Warren <biggerbadderben@gmail.com> | 2008-09-02 21:18:18 -0700 |
commit | 4fce2aceaf8afd31a252bc782c9dbc497bf40487 (patch) | |
tree | 59b70fb34c258780b76bbcc876455e11e3fa8558 | |
parent | e1d7480b5de1fd4830bf7cf5e2237d3b0846d08d (diff) | |
download | u-boot-4fce2aceaf8afd31a252bc782c9dbc497bf40487.tar.gz u-boot-4fce2aceaf8afd31a252bc782c9dbc497bf40487.tar.xz u-boot-4fce2aceaf8afd31a252bc782c9dbc497bf40487.zip |
Moved initialization of plb2800 Ethernet driver to board_eth_init
Affected boards:
purple
Removed initialization of controller from net/eth.c
Signed-off-by: Ben Warren <biggerbadderben@gmail.com>
-rw-r--r-- | board/purple/purple.c | 9 | ||||
-rw-r--r-- | drivers/net/plb2800_eth.c | 5 | ||||
-rw-r--r-- | include/netdev.h | 1 | ||||
-rw-r--r-- | net/eth.c | 4 |
4 files changed, 13 insertions, 6 deletions
diff --git a/board/purple/purple.c b/board/purple/purple.c index 9775591129..c129d7a109 100644 --- a/board/purple/purple.c +++ b/board/purple/purple.c @@ -23,6 +23,7 @@ #include <common.h> #include <command.h> +#include <netdev.h> #include <asm/inca-ip.h> #include <asm/regdef.h> #include <asm/mipsregs.h> @@ -274,3 +275,11 @@ void copy_code (ulong dest_addr) start += CFG_CACHELINE_SIZE; } } + +#ifdef CONFIG_PLB2800_ETHER +int board_eth_init(bd_t *bis) +{ + return plb2800_eth_initialize(bis); +} +#endif + diff --git a/drivers/net/plb2800_eth.c b/drivers/net/plb2800_eth.c index dad842c728..d799c73823 100644 --- a/drivers/net/plb2800_eth.c +++ b/drivers/net/plb2800_eth.c @@ -26,6 +26,7 @@ #include <common.h> #include <malloc.h> #include <net.h> +#include <netdev.h> #include <asm/addrspace.h> @@ -105,7 +106,7 @@ int plb2800_eth_initialize(bd_t * bis) if (!(dev = (struct eth_device *) malloc (sizeof *dev))) { printf("Failed to allocate memory\n"); - return 0; + return -1; } memset(dev, 0, sizeof(*dev)); @@ -140,7 +141,7 @@ int plb2800_eth_initialize(bd_t * bis) printf("Leaving plb2800_eth_initialize()\n"); #endif - return 1; + return 0; } static int plb2800_eth_init(struct eth_device *dev, bd_t * bis) diff --git a/include/netdev.h b/include/netdev.h index f7738cc463..1013a803ab 100644 --- a/include/netdev.h +++ b/include/netdev.h @@ -54,6 +54,7 @@ int mpc5xxx_fec_initialize(bd_t *bis); int natsemi_initialize(bd_t *bis); int ns8382x_initialize(bd_t *bis); int pcnet_initialize(bd_t *bis); +int plb2800_eth_initialize(bd_t *bis); int rtl8139_initialize(bd_t *bis); int rtl8169_initialize(bd_t *bis); int skge_initialize(bd_t *bis); @@ -47,7 +47,6 @@ extern int fec_initialize(bd_t*); extern int mpc8220_fec_initialize(bd_t*); extern int mv6436x_eth_initialize(bd_t *); extern int mv6446x_eth_initialize(bd_t *); -extern int plb2800_eth_initialize(bd_t*); extern int ppc_4xx_eth_initialize(bd_t *); extern int scc_initialize(bd_t*); extern int npe_initialize(bd_t *); @@ -166,9 +165,6 @@ int eth_initialize(bd_t *bis) #if defined(CONFIG_4xx) && !defined(CONFIG_IOP480) && !defined(CONFIG_AP1000) ppc_4xx_eth_initialize(bis); #endif -#ifdef CONFIG_PLB2800_ETHER - plb2800_eth_initialize(bis); -#endif #ifdef SCC_ENET scc_initialize(bis); #endif |