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

Jean-Christophe PLAGNIOL-VILLARD plagnioj at jcrosoft.com
Wed Jun 22 03:08:45 EDT 2011


On 23:51 Tue 21 Jun     , Hubert Feurstein wrote:
> 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.
I more in mind an api to update the get/set_ethaddr without specific hookin
each driver

Best Regards,
J.



More information about the barebox mailing list