[PATCH] macb: add support for board specific get_ethaddr function

Hubert Feurstein h.feurstein at gmail.com
Tue Jun 21 17:51:35 EDT 2011


2011/6/21 Jean-Christophe PLAGNIOL-VILLARD <plagnioj at jcrosoft.com>:
>> @@ -47,6 +48,7 @@ void at91_add_device_nand(struct atmel_nand_data *data);
>>  struct at91_ether_platform_data {
>>       unsigned int flags;
>>       int phy_addr;
>> +     int (*get_ethaddr)(struct eth_device*, unsigned char *adr);
> can we find a generic way?
a generic way would be to simply call
'dev_set_param(get_device_by_name("eth0"), "ethaddr", macbuffer)'
somewhere after at91_add_device_eth(...) in your init. Then you don't
need the callback at all to setup the mac-address.

Best Regards
Hubert



More information about the barebox mailing list