
On Tue, Apr 21, 2009 at 9:32 AM, Ben Warren biggerbadderben@gmail.com wrote:
This driver uses the old-style API and so requires board/cpu init code to call eth_init(). I'm not familiar with your architecture, so don't know how or if this is implemented, but it should be easy to find another example that does this.
Thanks for the hint! That helped quite a bit.
The hardware uses the new LAN9221 chip, so I needed to add the following patch to the driver:
diff --git a/drivers/net/smc911x.h b/drivers/net/smc911x.h index 80d2ce0..a756142 100644 --- a/drivers/net/smc911x.h +++ b/drivers/net/smc911x.h @@ -378,6 +378,7 @@ static inline void smc911x_reg_write(u32 addr, u32 val) #define CHIP_9117 0x117 #define CHIP_9118 0x118 #define CHIP_9211 0x9211 +#define CHIP_9221 0x9221 #define CHIP_9215 0x115a #define CHIP_9216 0x116a #define CHIP_9217 0x117a @@ -394,6 +395,7 @@ static const struct chip_id chip_ids[] = { { CHIP_9117, "LAN9117" }, { CHIP_9118, "LAN9118" }, { CHIP_9211, "LAN9211" }, + { CHIP_9221, "LAN9221" }, { CHIP_9215, "LAN9215" }, { CHIP_9216, "LAN9216" }, { CHIP_9217, "LAN9217" },
Now things seem to initialize properly:
U-Boot 2009.03 (Apr 22 2009 - 07:28:04)
OMAP3503-GP rev 2, CPU-OPP2 L3-165MHz Gumstix Overo board + LPDDR/NAND DRAM: 256 MB NAND: 256 MiB In: serial Out: serial Err: serial Initializing ethernet smc911x smc911x: initializing smc911x: detected LAN9221 controller smc911x: phy initialized smc911x: MAC 4a:18:56:55:9d:38 Die ID #4a4800020000000004031c1302012001 Hit any key to stop autoboot: 0 Overo #
But the interface doesn't seem to function:
Overo # dhcp smc911x: initializing smc911x: detected LAN9221 controller smc911x: phy initialized smc911x: MAC 4a:18:56:55:9d:38 BOOTP broadcast 1 BOOTP broadcast 2 BOOTP broadcast 3 BOOTP broadcast 4 BOOTP broadcast 5
Retry count exceeded; starting again <repeats>
I've also tried setting the ip address, net mask, etc explicitly. This also has issues:
Overo # ping 192.168.0.1 smc911x: initializing smc911x: detected LAN9221 controller smc911x: phy initialized smc911x: MAC 4a:18:56:55:9d:38 ping failed; host 192.168.0.1 is not alive
If I allow linux to boot, the net interface functions properly, so I know that cabling, dhcp server, etc are not an issue.
Any advice on how to debug this? I don't see any DEBUG flag in the code.
Thanks!
Steve