]> git.kernelconcepts.de Git - karo-tx-uboot.git/commitdiff
Moved initialization of MPC512x_FEC Ethernet driver to CPU directory
authorBen Warren <biggerbadderben@gmail.com>
Sun, 31 Aug 2008 17:36:38 +0000 (10:36 -0700)
committerBen Warren <biggerbadderben@gmail.com>
Wed, 3 Sep 2008 04:18:17 +0000 (21:18 -0700)
Added a cpu_eth_init() function to MPC512x CPU directory and
removed code from net/eth.c

Signed-off-by: Ben Warren <biggerbadderben@gmail.com>
cpu/mpc512x/cpu.c
drivers/net/mpc512x_fec.c
include/netdev.h
net/eth.c

index 1f39ac4c173f06338c469c486e2919435e6f4b80..d432d995a7ae7b11306e544d65935af3b26f5db1 100644 (file)
@@ -30,6 +30,7 @@
 #include <common.h>
 #include <command.h>
 #include <mpc512x.h>
+#include <netdev.h>
 #include <asm/processor.h>
 
 #if defined(CONFIG_OF_LIBFDT)
@@ -195,3 +196,15 @@ void ft_cpu_setup(void *blob, bd_t *bd)
 #endif
 }
 #endif
+
+#ifdef CONFIG_MPC512x_FEC
+/* Default initializations for FEC controllers.  To override,
+ * create a board-specific function called:
+ *     int board_eth_init(bd_t *bis)
+ */
+
+int cpu_eth_init(bd_t *bis)
+{
+       return mpc512x_fec_initialize(bis);
+}
+#endif
index 7caeeda6533b0b4f94ad17ea9afef1a2ace2952f..54283fb9d0af8bf808aff0ca153e4fe6c5a6a9f2 100644 (file)
@@ -10,6 +10,7 @@
 #include <mpc512x.h>
 #include <malloc.h>
 #include <net.h>
+#include <netdev.h>
 #include <miiphy.h>
 #include "mpc512x_fec.h"
 
index f28039ea06d9cfc54dd730f8642c2f04dd4df085..487d319b781f16b61cc4e434773125074cd4f45d 100644 (file)
@@ -49,6 +49,7 @@ 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);
+int mpc512x_fec_initialize(bd_t *bis);
 int natsemi_initialize(bd_t *bis);
 int ns8382x_initialize(bd_t *bis);
 int pcnet_initialize(bd_t *bis);
index 0dfa70d07a887d9c537ee50151f0ff82a4ec7157..b61d0fc34f3a920bd658695c633b0e134c282fc8 100644 (file)
--- a/net/eth.c
+++ b/net/eth.c
@@ -45,7 +45,6 @@ extern int e1000_initialize(bd_t*);
 extern int eepro100_initialize(bd_t*);
 extern int fec_initialize(bd_t*);
 extern int mpc5xxx_fec_initialize(bd_t*);
-extern int mpc512x_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 *);
@@ -177,9 +176,6 @@ int eth_initialize(bd_t *bis)
 #if defined(CONFIG_MPC5xxx_FEC)
        mpc5xxx_fec_initialize(bis);
 #endif
-#if defined(CONFIG_MPC512x_FEC)
-       mpc512x_fec_initialize (bis);
-#endif
 #if defined(CONFIG_MPC8220_FEC)
        mpc8220_fec_initialize(bis);
 #endif