]> git.kernelconcepts.de Git - karo-tx-uboot.git/commitdiff
Moved initialization of PPC4xx EMAC to cpu_eth_init()
authorBen Warren <biggerbadderben@gmail.com>
Tue, 28 Oct 2008 06:53:17 +0000 (23:53 -0700)
committerBen Warren <biggerbadderben@gmail.com>
Mon, 10 Nov 2008 05:38:05 +0000 (21:38 -0800)
Removed initialization of the driver from net/eth.c

Signed-off-by: Ben Warren <biggerbadderben@gmail.com>
Acked-by: Stefan Roese <sr@denx.de>
cpu/ppc4xx/cpu.c
include/netdev.h
net/eth.c

index a676b30efe735bca9057916abfdf437d8a577397..1f0b56cb76a330595a3bcefd924ca993e293cf2e 100644 (file)
@@ -36,6 +36,7 @@
 #include <command.h>
 #include <asm/cache.h>
 #include <ppc4xx.h>
+#include <netdev.h>
 
 DECLARE_GLOBAL_DATA_PTR;
 
@@ -693,3 +694,16 @@ void reset_4xx_watchdog(void)
        mtspr(tsr, 0x40000000);
 }
 #endif /* CONFIG_WATCHDOG */
+
+/*
+ * Initializes on-chip ethernet controllers.
+ * to override, implement board_eth_init()
+ */
+int cpu_eth_init(bd_t *bis)
+{
+#if defined(CONFIG_PPC4xx_EMAC)
+       ppc_4xx_eth_initialize(bis);
+#endif
+       return 0;
+}
+
index 45e59b6f62378e4fbe0dda749d54d442e3bfa56a..751f0dab55d2a08c0f79f238a254eda7b3b70f41 100644 (file)
@@ -62,6 +62,7 @@ int npe_initialize(bd_t *bis);
 int ns8382x_initialize(bd_t *bis);
 int pcnet_initialize(bd_t *bis);
 int plb2800_eth_initialize(bd_t *bis);
+int ppc_4xx_eth_initialize (bd_t *bis);
 int rtl8139_initialize(bd_t *bis);
 int rtl8169_initialize(bd_t *bis);
 int scc_initialize(bd_t *bis);
index eab51045a4ea46468cbb2fa174eec0b0d8d2691e..b7ef09f4479b0619b3b79c50d953abb606950247 100644 (file)
--- a/net/eth.c
+++ b/net/eth.c
@@ -41,7 +41,6 @@ int board_eth_init(bd_t *bis) __attribute((weak, alias("__def_eth_init")));
 
 extern int mv6436x_eth_initialize(bd_t *);
 extern int mv6446x_eth_initialize(bd_t *);
-extern int ppc_4xx_eth_initialize(bd_t *);
 
 #ifdef CONFIG_API
 extern void (*push_packet)(volatile void *, int);
@@ -152,9 +151,6 @@ int eth_initialize(bd_t *bis)
 #endif
 #if defined(CONFIG_DB64460) || defined(CONFIG_P3Mx)
        mv6446x_eth_initialize(bis);
-#endif
-#if defined(CONFIG_PPC4xx_EMAC)
-       ppc_4xx_eth_initialize(bis);
 #endif
        if (!eth_devices) {
                puts ("No ethernet found.\n");