Re: [PATCH 1/4] lan78xx: Read MAC address from DT if present

2018-04-12 Thread Phil Elwell
Hi Andrew, On 12/04/2018 15:06, Andrew Lunn wrote: > Hi Phil > >> -ret = lan78xx_write_reg(dev, RX_ADDRL, addr_lo); >> -ret = lan78xx_write_reg(dev, RX_ADDRH, addr_hi); >> +mac_addr = of_get_mac_address(dev->udev->dev.of_node); > > It might be

Re: [PATCH 1/4] lan78xx: Read MAC address from DT if present

2018-04-12 Thread Phil Elwell
Hi Andrew, On 12/04/2018 15:06, Andrew Lunn wrote: > Hi Phil > >> -ret = lan78xx_write_reg(dev, RX_ADDRL, addr_lo); >> -ret = lan78xx_write_reg(dev, RX_ADDRH, addr_hi); >> +mac_addr = of_get_mac_address(dev->udev->dev.of_node); > > It might be

Re: [PATCH 1/4] lan78xx: Read MAC address from DT if present

2018-04-12 Thread Andrew Lunn
Hi Phil > - ret = lan78xx_write_reg(dev, RX_ADDRL, addr_lo); > - ret = lan78xx_write_reg(dev, RX_ADDRH, addr_hi); > + mac_addr = of_get_mac_address(dev->udev->dev.of_node); It might be better to use the higher level

Re: [PATCH 1/4] lan78xx: Read MAC address from DT if present

2018-04-12 Thread Andrew Lunn
Hi Phil > - ret = lan78xx_write_reg(dev, RX_ADDRL, addr_lo); > - ret = lan78xx_write_reg(dev, RX_ADDRH, addr_hi); > + mac_addr = of_get_mac_address(dev->udev->dev.of_node); It might be better to use the higher level

[PATCH 1/4] lan78xx: Read MAC address from DT if present

2018-04-12 Thread Phil Elwell
There is a standard mechanism for locating and using a MAC address from the Device Tree. Use this facility in the lan78xx driver to support applications without programmed EEPROM or OTP. At the same time, regularise the handling of the different address sources. Signed-off-by: Phil Elwell

[PATCH 1/4] lan78xx: Read MAC address from DT if present

2018-04-12 Thread Phil Elwell
There is a standard mechanism for locating and using a MAC address from the Device Tree. Use this facility in the lan78xx driver to support applications without programmed EEPROM or OTP. At the same time, regularise the handling of the different address sources. Signed-off-by: Phil Elwell ---