[U-Boot] Defer net initialization

Ben Warren
2010-06-01T19:04:54Z

Hi Alexander,

On 6/1/2010 7:55 AM, Alexander Stein wrote:
> Ho Ben,
>
> Am Dienstag, 1. Juni 2010 16:46:48 schrieb Ben Warren:
>
>>> This macb driver is fine so far. eth_initialize doesn't startup the
>>> hardware
>>> e.g. checking for link etc.
>>> The problem was a defined CONFIG_RESET_PHY_R. Inside reset_phy
>>>
>>>
>>>> eth_init(gd->bd);
>>>>
>>> is called which actually starts the hardwre resulting in timeouts as
>>> described. According to the comment above this line (seems to be copied
>>> to every at91 board implementation) this is only needed if linux has a
>>> NFS root
>>> which needs a preinitialized ethernet device.
>>> But as we have a jffs2 rootfs this could be ignored.
>>>
>> Yes, you've found the root cause. Some (maybe all) AT91 boards call call
>> eth_init() during their initialization, which can take time. My
>> understanding is that this was done to ensure a programmed MAC address.
>>
>> I added code recently to always program MAC addresses, hoping that we could
>> then get rid of all these calls. I encourage you to either try to make the
>> changes yourself, or I can build you an untested patch to try.
>>
> I would try your patch if you send it to me (and the list maybe too).
>
>
I sent the patch, hopefully you'll get it. Please remember to remove
the call in your board code to 'eth_init()'. You'll see examples in the
patch.
> Best regards
> Alexander
>
regards,
Ben