[U-Boot] [PATCH] da850evm: basic MII EMAC support

Ben Warren
2010-09-13T13:16:00Z

Hi Ben,

On Monday, September 13, 2010, Ben Gardiner <bengardiner@nanometrics.ca> wrote:
> Hi Ben,
>
> On Sun, Sep 12, 2010 at 11:45 PM, Ben Warren <biggerbadderben@gmail.com> wrote:
>> Please consider doing this differently. ?If you change the driver to make
>> 'davinci_eth_set_mac_addr()' meet the signature of
>> 'eth_device->write_hwaddr()', all the environment handling is done
>> automagically. ?Let me know if you're confused and I'll provide more
>> guidance.
>
> Thanks for pointing me in the right direction here. I think I get it
> now; please correct me if I am wrong: board_eth_init should assign the
> eth_device->write_hwaddr() function pointer then eth_initialize() will
> handle calling board_eth_init and will set the MAC address from the
> ethaddr env var if the MAC address in the eth_device struct is
> all-zeroes.
>
Almost. The driver should set the function pointer, just as it does
'send()', 'init()', 'halt()', etc. This is a recent feature and the
davinci driver hasn't been updated yet
> Best Regards,
> Ben Gardiner
>
> ---
> Nanometrics Inc.
> http://www.nanometrics.ca

Regards,
Ben