[BAD] [PATCH] TI OMAP3: SDP3430: dont use legacy ethernet driver

Nishanth Menon nm at ti.com
Mon Oct 12 20:54:17 CEST 2009


Stop using the LEGACY driver and use NET_MULTI
this also removes the build warning for SDP3430

Signed-off-by: Nishanth Menon <nm at ti.com>
---
 board/ti/sdp3430/sdp.c          |   16 ++++++++++------
 include/configs/omap3_sdp3430.h |    7 ++++---
 2 files changed, 14 insertions(+), 9 deletions(-)

diff --git a/board/ti/sdp3430/sdp.c b/board/ti/sdp3430/sdp.c
index 40cf26f..529956f 100644
--- a/board/ti/sdp3430/sdp.c
+++ b/board/ti/sdp3430/sdp.c
@@ -22,6 +22,7 @@
  * MA 02111-1307 USA
  */
 #include <common.h>
+#include <netdev.h>
 #include <twl4030.h>
 #include <asm/io.h>
 #include <asm/arch/mux.h>
@@ -121,16 +122,18 @@ int board_init(void)
 	return 0;
 }
 
-#define LAN_RESET_REGISTER	(CONFIG_LAN91C96_BASE + 0x01c)
-#define ETH_CONTROL_REG		(CONFIG_LAN91C96_BASE + 0x30b)
+#define LAN_RESET_REGISTER	(CONFIG_SMC911X_BASE + 0x01c)
+#define ETH_CONTROL_REG		(CONFIG_SMC911X_BASE + 0x30b)
 
 /**
  * @brief ether_init Take the Ethernet controller out of reset and wait
  * for the EEPROM load to complete.
  */
-static void ether_init(void)
+int board_eth_init(bd_t *bis)
 {
-#ifdef CONFIG_DRIVER_LAN91C96
+	int rc = 0;
+#ifdef CONFIG_SMC911X
+#if 0
 	int cnt = 20;
 
 	writew(0x0, LAN_RESET_REGISTER);
@@ -157,8 +160,11 @@ static void ether_init(void)
 	udelay(1000);
 reset_err_out:
 	return;
+#endif
+	rc = smc911x_initialize(0, CONFIG_SMC911X_BASE);
 
 #endif
+	return rc;
 }
 
 /**
@@ -187,8 +193,6 @@ int misc_init_r(void)
 	 *   VSIM  - off (init, variable) for MMC1.DAT[3..7], SIM
 	 *   VPLL2 - 1.8V
 	 */
-	ether_init();
-
 	return 0;
 }
 
diff --git a/include/configs/omap3_sdp3430.h b/include/configs/omap3_sdp3430.h
index 229dc5e..7b0a248 100644
--- a/include/configs/omap3_sdp3430.h
+++ b/include/configs/omap3_sdp3430.h
@@ -200,9 +200,10 @@
  */
 #if defined(CONFIG_CMD_NET)
 
-#define CONFIG_DRIVER_LAN91C96
-#define CONFIG_LAN91C96_BASE	DEBUG_BASE
-#define CONFIG_LAN91C96_EXT_PHY
+#define CONFIG_NET_MULTI
+#define CONFIG_SMC911X
+#define CONFIG_SMC911X_32_BIT
+#define CONFIG_SMC911X_BASE	DEBUG_BASE
 
 #define CONFIG_BOOTP_SEND_HOSTNAME
 /*
-- 
1.6.3.3


--------------040001020007020700020700--


More information about the U-Boot mailing list