Ben Warren had written, on 10/13/2009 11:36 PM, the following:
Nishanth,

On Tue, Oct 13, 2009 at 8:13 PM, Nishanth Menon <n...@ti.com <mailto:n...@ti.com>> wrote:

    Hi Folks,

    While attempting to address the warning for SDP3430 as pointed out by
    dirk in [1], I did a patch corresponding to what was done for EVM(353x)
    as in [2]. unfortunately, this wont work for me, I get:
    U-Boot 2009.08-00515-gfea6a55-dirty (Oct 12 2009 - 14:03:23)

    OMAP3530-GP ES3.0, CPU-OPP2 L3-165MHz
    OMAP3 SDP3430 board + LPDDR/NOR
    I2C:   ready
    DRAM:  128 MB
    Flash: 128 MB
    In:    serial
    Out:   serial
    Err:   serial
    smc911x: Invalid chip endian 0xdee0013d
    Net:   No ethernet found.
    OMAP34XX SDP #

    and no network, using LEGACY driver seems to be working just great
    for me.

    Note: in my patch [2], I did try both CONFIG_SMC911X_32_BIT and
    CONFIG_SMC911X_16_BIT with no luck either way.  I even tried to hack the
    driver by skipping the supported chip detection code, but the driver
    still did not work for me.

When using CONFIG_NET_MULTI you need to have a board_eth_init() function
done
in your board code which in turn must call smc911x_initialize(). Make
done
sure that eth_initialize() gets called somewhere in your cpu/board.c
why eth_initalize? rest of the OMAP3 boards dont seem to be doing that
call sequence. I suspect that while the SMC911x driver is being initialized, it isn't being registered properly with the networking library. There are many examples in the source tree of how to do this.
I would expect that and did check too, but why:
smc911x: Invalid chip endian 0xdee0013d
when I had a base address and device which was supported by LAN91C96 legacy driver?

My lack of network chip knowledge is kicking me at the moment.. trying to find the device data sheet internally @ TI..

--
Regards,
Nishanth Menon
>From db2fd6d0ee801696a7e1d9568f4c526ae3d16c4b Mon Sep 17 00:00:00 2001
From: Nishanth Menon <n...@ti.com>
Date: Mon, 12 Oct 2009 13:54:17 -0500
Subject: [BAD] [PATCH] TI OMAP3: SDP3430: dont use legacy ethernet driver

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

Signed-off-by: Nishanth Menon <n...@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

_______________________________________________
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot

Reply via email to