]> git.dujemihanovic.xyz Git - u-boot.git/commitdiff
Moved initialization of GRETH Ethernet driver to CPU directory
authorBen Warren <biggerbadderben@gmail.com>
Wed, 9 Jul 2008 08:04:19 +0000 (01:04 -0700)
committerBen Warren <biggerbadderben@gmail.com>
Wed, 27 Aug 2008 05:17:24 +0000 (22:17 -0700)
Added a cpu_eth_init() function to leon2/leon3 CPU directories and
removed code from net/eth.c

Signed-off-by: Ben Warren <biggerbadderben@gmail.com>
cpu/leon2/cpu.c
cpu/leon3/cpu.c
drivers/net/greth.c
net/eth.c

index 1c1e24b16cd8c3ec1f92d89d8e00fdfb78d4e82d..5de1c521aae12fe2f59593383e7c3b2e8da2c1f2 100644 (file)
@@ -56,3 +56,12 @@ int do_reset(cmd_tbl_t * cmdtp, int flag, int argc, char *argv[])
 }
 
 /* ------------------------------------------------------------------------- */
+
+extern int greth_initialize(bd_t *bis);
+
+#ifdef CONFIG_GRETH
+int cpu_eth_init(bd_t *bis)
+{
+       return greth_initialize(bis);
+}
+#endif
index 306a210048872f3e7923f30a1942981848a2987b..1725fdb090bf2399f5a4811e78275d840e092ae8 100644 (file)
@@ -65,3 +65,11 @@ u64 flash_read64(void *addr)
 }
 
 /* ------------------------------------------------------------------------- */
+extern int greth_initialize(bd_t *bis);
+
+#ifdef CONFIG_GRETH
+int cpu_eth_init(bd_t *bis)
+{
+       return greth_initialize(bis);
+}
+#endif
index 76ece59b36e0f1312895d3d5c36c83d863d13082..90c5338837d0544c67cdcea027f66e1c666b5642 100644 (file)
@@ -657,5 +657,5 @@ int greth_initialize(bd_t * bis)
        /* set and remember MAC address */
        greth_set_hwaddr(greth, addr);
 
-       return 1;
+       return 0;
 }
index 50bea796ac0f1f11368eb21528c68a87fb7434f4..c40a19ce2ee866570a520774058b7ff94318922a 100644 (file)
--- a/net/eth.c
+++ b/net/eth.c
@@ -69,7 +69,6 @@ extern int uli526x_initialize(bd_t *);
 extern int npe_initialize(bd_t *);
 extern int uec_initialize(int);
 extern int bfin_EMAC_initialize(bd_t *);
-extern int greth_initialize(bd_t *);
 extern int at91sam9_eth_initialize(bd_t *);
 
 #ifdef CONFIG_API
@@ -267,9 +266,6 @@ int eth_initialize(bd_t *bis)
 #if defined(CONFIG_BF537)
        bfin_EMAC_initialize(bis);
 #endif
-#if defined(CONFIG_GRETH)
-       greth_initialize(bis);
-#endif
 #if defined(CONFIG_AT91CAP9) || defined(CONFIG_AT91SAM9260) || \
     defined(CONFIG_AT91SAM9263)
        at91sam9_eth_initialize(bis);