diff options
author | Ben Warren <biggerbadderben@gmail.com> | 2008-08-31 10:16:59 -0700 |
---|---|---|
committer | Ben Warren <biggerbadderben@gmail.com> | 2008-09-02 21:18:17 -0700 |
commit | 8218bd2aa68820b878a8413493ae17fd8d21f944 (patch) | |
tree | 31f044f5657a5be7d16918539c69187ea73ca180 | |
parent | 164846eeb25cb2a5ede7ab9371fdca7f4831a055 (diff) | |
download | u-boot-imx-8218bd2aa68820b878a8413493ae17fd8d21f944.zip u-boot-imx-8218bd2aa68820b878a8413493ae17fd8d21f944.tar.gz u-boot-imx-8218bd2aa68820b878a8413493ae17fd8d21f944.tar.bz2 |
Moved initialization of IncaIP Ethernet controller to board_eth_init
Affected boards:
IncaIP
Removed initialization of the driver from net/eth.c
Signed-off-by: Ben Warren <biggerbadderben@gmail.com>
-rw-r--r-- | board/incaip/incaip.c | 8 | ||||
-rw-r--r-- | drivers/net/inca-ip_sw.c | 3 | ||||
-rw-r--r-- | include/netdev.h | 1 | ||||
-rw-r--r-- | net/eth.c | 4 |
4 files changed, 11 insertions, 5 deletions
diff --git a/board/incaip/incaip.c b/board/incaip/incaip.c index ac7ad8f..6fe852c 100644 --- a/board/incaip/incaip.c +++ b/board/incaip/incaip.c @@ -23,6 +23,7 @@ #include <common.h> #include <command.h> +#include <netdev.h> #include <asm/addrspace.h> #include <asm/inca-ip.h> #include <asm/io.h> @@ -116,3 +117,10 @@ int checkboard (void) return 0; } + +#if defined(CONFIG_INCA_IP_SWITCH) +int board_eth_init(bd_t *bis) +{ + return inca_switch_initialize(bis); +} +#endif diff --git a/drivers/net/inca-ip_sw.c b/drivers/net/inca-ip_sw.c index d852a15..492f5ce 100644 --- a/drivers/net/inca-ip_sw.c +++ b/drivers/net/inca-ip_sw.c @@ -28,6 +28,7 @@ #include <malloc.h> #include <net.h> +#include <netdev.h> #include <asm/inca-ip.h> #include <asm/addrspace.h> @@ -199,7 +200,7 @@ int inca_switch_initialize(bd_t * bis) printf("Leaving inca_switch_initialize()\n"); #endif - return 1; + return 0; } diff --git a/include/netdev.h b/include/netdev.h index 0c16dd6..f28039e 100644 --- a/include/netdev.h +++ b/include/netdev.h @@ -45,6 +45,7 @@ int bfin_EMAC_initialize(bd_t *bis); int eth_3com_initialize (bd_t * bis); int greth_initialize(bd_t *bis); void gt6426x_eth_initialize(bd_t *bis); +int inca_switch_initialize(bd_t *bis); int macb_eth_initialize(int id, void *regs, unsigned int phy_addr); int mcdmafec_initialize(bd_t *bis); int mcffec_initialize(bd_t *bis); @@ -44,7 +44,6 @@ extern int dc21x4x_initialize(bd_t*); extern int e1000_initialize(bd_t*); extern int eepro100_initialize(bd_t*); extern int fec_initialize(bd_t*); -extern int inca_switch_initialize(bd_t*); extern int mpc5xxx_fec_initialize(bd_t*); extern int mpc512x_fec_initialize(bd_t*); extern int mpc8220_fec_initialize(bd_t*); @@ -169,9 +168,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_INCA_IP_SWITCH - inca_switch_initialize(bis); -#endif #ifdef CONFIG_PLB2800_ETHER plb2800_eth_initialize(bis); #endif |