]> git.sur5r.net Git - u-boot/commitdiff
Moved initialization of IncaIP Ethernet controller to board_eth_init
authorBen Warren <biggerbadderben@gmail.com>
Sun, 31 Aug 2008 17:16:59 +0000 (10:16 -0700)
committerBen Warren <biggerbadderben@gmail.com>
Wed, 3 Sep 2008 04:18:17 +0000 (21:18 -0700)
Affected boards:
IncaIP

Removed initialization of the driver from net/eth.c

Signed-off-by: Ben Warren <biggerbadderben@gmail.com>
board/incaip/incaip.c
drivers/net/inca-ip_sw.c
include/netdev.h
net/eth.c

index ac7ad8f292e438b00aa36607c8054d40a64cf373..6fe852cf9ed0fdefc57e98f7e2107bfc1fd2a3c5 100644 (file)
@@ -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
index d852a150fa913a4dfb8c478f94ce500a6a0f386e..492f5ce8f8850cb03aefc6f71bcfcc91f9ffb8aa 100644 (file)
@@ -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;
 }
 
 
index 0c16dd612cdb9e3b440283f3b056fb6872b37175..f28039ea06d9cfc54dd730f8642c2f04dd4df085 100644 (file)
@@ -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);
index c4d7b63d9c2a843fefe39f082c59fff9b2819c0d..0dfa70d07a887d9c537ee50151f0ff82a4ec7157 100644 (file)
--- a/net/eth.c
+++ b/net/eth.c
@@ -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