On Mon, Apr 5, 2021 at 11:47 AM Michael Walle wrote:
>
> of_get_mac_address() already supports fetching the MAC address by an
> nvmem provider. But until now, it was just working for platform devices.
> Esp. it was not working for DSA ports and PCI devices. It gets more
> common that PCI devices h
> But then pdev will be NULL and nvmem_get_mac_address() won't be called
> at all, no?
Forget it, it can be added later if there is a real use case.
Andrew
Am 2021-04-06 00:13, schrieb Andrew Lunn:
On Mon, Apr 05, 2021 at 11:46:04PM +0200, Michael Walle wrote:
Hi Andrew,
Am 2021-04-05 23:34, schrieb Andrew Lunn:
> > -static int of_get_mac_addr_nvmem(struct device_node *np, u8 addr)
> > +static int of_get_mac_addr_nvmem(struct device_node *np, u8 *
On Mon, Apr 05, 2021 at 11:46:04PM +0200, Michael Walle wrote:
> Hi Andrew,
>
> Am 2021-04-05 23:34, schrieb Andrew Lunn:
> > > -static int of_get_mac_addr_nvmem(struct device_node *np, u8 addr)
> > > +static int of_get_mac_addr_nvmem(struct device_node *np, u8 *addr)
> > > {
> > > struct platf
Hi Andrew,
Am 2021-04-05 23:34, schrieb Andrew Lunn:
-static int of_get_mac_addr_nvmem(struct device_node *np, u8 addr)
+static int of_get_mac_addr_nvmem(struct device_node *np, u8 *addr)
{
struct platform_device *pdev = of_find_device_by_node(np);
+ struct nvmem_cell *cell;
+
Hi Michael
> -static int of_get_mac_addr_nvmem(struct device_node *np, u8 addr)
> +static int of_get_mac_addr_nvmem(struct device_node *np, u8 *addr)
> {
> struct platform_device *pdev = of_find_device_by_node(np);
> + struct nvmem_cell *cell;
> + const void *mac;
> + size_t len
of_get_mac_address() already supports fetching the MAC address by an
nvmem provider. But until now, it was just working for platform devices.
Esp. it was not working for DSA ports and PCI devices. It gets more
common that PCI devices have a device tree binding since SoCs contain
integrated root com