[U-Boot] [PATCH v3] TI: OMAP3: Overo Tobi ethernet support

Steve Sakoman sakoman at gmail.com
Thu Oct 8 06:56:17 CEST 2009


On Wed, Oct 7, 2009 at 9:50 PM, Dirk Behme <dirk.behme at googlemail.com> wrote:
> Olof Johansson wrote:
>>
>> On Oct 5, 2009, at 8:56 AM, Steve Sakoman <sakoman at gmail.com> wrote:
>>
>>> On Sat, Sep 26, 2009 at 2:14 PM, Olof Johansson <olof at lixom.net> wrote:
>>>>
>>>> Add setup for ethernet on Tobi, allowing kernel/ramdisk to be loaded
>>>> over tftp.
>>>>
>>>> This also refactors the smc911x driver to allow for detecting when the
>>>> chip is missing. I.e. the detect_chip() function is called earlier and
>>>> will abort gracefully when the Chip ID read returns all 1's.
>>>>
>>>
>>> Hmm . . . I just tried this on a board without smc911x chip and it
>>> seems to hang after printing "Net".
>>>
>>> Did it work for you in this case?  Haven't had time to debug yet, but
>>> will try to look later today.
>>
>> The only hardware I have is tobi, which is why I thought I cc:d you as
>> well as asked others to test with other carriers if they had them.
>>
>> I guess first thing to find out is if it's the first read that hangs or
>> what.
>
> Any idea how to go on with this? I have no Tobi, so unfortunately I can't
> help here.

I've been testing the patch below, which seems to work with all boards
I've tried.  It simply moves the test a bit earlier.

Steve

--- git/drivers/net/smc911x.c-orig	2009-09-29 16:24:48.000000000 -0700
+++ git/drivers/net/smc911x.c	2009-10-05 20:41:55.000000000 -0700
@@ -249,6 +249,12 @@ int smc911x_initialize(u8 dev_num, int b

 	dev->iobase = base_addr;

+	/* Try to detect chip. Will fail if not present. */
+	if (smc911x_detect_chip(dev)) {
+		free(dev);
+		return 0;
+	}
+
 	addrh = smc911x_get_mac_csr(dev, ADDRH);
 	addrl = smc911x_get_mac_csr(dev, ADDRL);
 	dev->enetaddr[0] = addrl;
@@ -264,12 +270,6 @@ int smc911x_initialize(u8 dev_num, int b
 	dev->recv = smc911x_rx;
 	sprintf(dev->name, "%s-%hu", DRIVERNAME, dev_num);

-	/* Try to detect chip. Will fail if not present. */
-	if (smc911x_detect_chip(dev)) {
-		free(dev);
-		return 0;
-	}
-
 	eth_register(dev);
 	return 0;
 }


More information about the U-Boot mailing list