]> git.kernelconcepts.de Git - karo-tx-uboot.git/commitdiff
Moved initialization of MCFFEC Ethernet driver to CPU directory
authorBen Warren <biggerbadderben@gmail.com>
Wed, 27 Aug 2008 05:16:25 +0000 (22:16 -0700)
committerBen Warren <biggerbadderben@gmail.com>
Wed, 27 Aug 2008 05:16:25 +0000 (22:16 -0700)
Added a cpu_eth_init() function to coldfire CPU directories and
removed code from net/eth.c

Signed-off-by: Ben Warren <biggerbadderben@gmail.com>
cpu/mcf523x/cpu.c
cpu/mcf52x2/cpu.c
cpu/mcf532x/cpu.c
cpu/mcf5445x/cpu.c
cpu/mcf547x_8x/cpu.c
drivers/net/mcffec.c
net/eth.c

index f0d954b3fbdfdd04ac7983c3bf04e0f623aa614c..8d2152d9c9305c1d485957532551c1a33c6eb49a 100644 (file)
@@ -107,3 +107,17 @@ int watchdog_init(void)
        return (0);
 }
 #endif                         /* CONFIG_WATCHDOG */
+
+#if defined(CONFIG_MCFFEC)
+/* Default initializations for MCFFEC controllers.  To override,
+ * create a board-specific function called:
+ *     int board_eth_init(bd_t *bis)
+ */
+
+extern int mcffec_initialize(bd_t*);
+
+int cpu_eth_init(bd_t *bis)
+{
+       return mcffec_initialize(bis);
+}
+#endif
index d5d3d339c51a125391ef7692449b4f68cfd9671c..2af31cbb98d079e3467a68e0472e9ce8ac4c58a8 100644 (file)
@@ -321,3 +321,18 @@ int do_reset(cmd_tbl_t * cmdtp, bd_t * bd, int flag, int argc, char *argv[])
        return 0;
 };
 #endif
+
+#if defined(CONFIG_MCFFEC)
+/* Default initializations for MCFFEC controllers.  To override,
+ * create a board-specific function called:
+ *     int board_eth_init(bd_t *bis)
+ */
+
+extern int mcffec_initialize(bd_t*);
+
+int cpu_eth_init(bd_t *bis)
+{
+       return mcffec_initialize(bis);
+}
+#endif
+
index 61541ab0f15fbbeaf2abdb22ba674c1ba6566341..20d0d5cf279eb1c96fb6c1e97db601c65dbe3e3d 100644 (file)
@@ -129,3 +129,17 @@ int watchdog_init(void)
        return (0);
 }
 #endif                         /* CONFIG_WATCHDOG */
+
+#if defined(CONFIG_MCFFEC)
+/* Default initializations for MCFFEC controllers.  To override,
+ * create a board-specific function called:
+ *     int board_eth_init(bd_t *bis)
+ */
+
+extern int mcffec_initialize(bd_t*);
+
+int cpu_eth_init(bd_t *bis)
+{
+       return mcffec_initialize(bis);
+}
+#endif
index e601b8949b61a8ef012742d51e7b51660a5f2dff..ab342ddeb0459e71cc0ad312823ade3f34295cf4 100644 (file)
@@ -95,3 +95,17 @@ int checkcpu(void)
 
        return 0;
 }
+
+#if defined(CONFIG_MCFFEC)
+/* Default initializations for MCFFEC controllers.  To override,
+ * create a board-specific function called:
+ *     int board_eth_init(bd_t *bis)
+ */
+
+extern int mcffec_initialize(bd_t*);
+
+int cpu_eth_init(bd_t *bis)
+{
+       return mcffec_initialize(bis);
+}
+#endif
index e29b45c4ccd15a7da6c563cafbcb02d201383647..1ba7aa80a3efee66685f65d4b3b684cdbd02f842 100644 (file)
@@ -142,11 +142,23 @@ int watchdog_init(void)
 }
 #endif                         /* CONFIG_HW_WATCHDOG */
 
-#if defined(CONFIG_FSLDMAFEC)
+#if defined(CONFIG_FSLDMAFEC) || defined(CONFIG_MCFFEC)
+/* Default initializations for MCFFEC controllers.  To override,
+ * create a board-specific function called:
+ *     int board_eth_init(bd_t *bis)
+ */
+
 extern int mcdmafec_initialize(bd_t *bis);
+extern int mcffec_initialize(bd_t*);
 
 int cpu_eth_init(bd_t *bis)
 {
-       return mcdmafec_initialize(bis);
+#if defined(CONFIG_FSLDMAFEC)
+       mcdmafec_initialize(bis);
+#endif
+#if defined(CONFIG_MCFFEC)
+       mcffec_initialize(bis);
+#endif
+       return 0;
 }
 #endif
index 58ed5e32c6b22a49f2252b04074e93475861ac6b..6e69b466b7f525e6665bdc9728076c5a03551917 100644 (file)
@@ -599,5 +599,5 @@ int mcffec_initialize(bd_t * bis)
        /* default speed */
        bis->bi_ethspeed = 10;
 
-       return 1;
+       return 0;
 }
index bc57ca3e89fa274ddcaf30b6f215934980aeef01..50bea796ac0f1f11368eb21528c68a87fb7434f4 100644 (file)
--- a/net/eth.c
+++ b/net/eth.c
@@ -70,7 +70,6 @@ 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 mcffec_initialize(bd_t*);
 extern int at91sam9_eth_initialize(bd_t *);
 
 #ifdef CONFIG_API
@@ -271,9 +270,6 @@ int eth_initialize(bd_t *bis)
 #if defined(CONFIG_GRETH)
        greth_initialize(bis);
 #endif
-#if defined(CONFIG_MCFFEC)
-       mcffec_initialize(bis);
-#endif
 #if defined(CONFIG_AT91CAP9) || defined(CONFIG_AT91SAM9260) || \
     defined(CONFIG_AT91SAM9263)
        at91sam9_eth_initialize(bis);