Skip to content
Snippets Groups Projects
Commit 580fab4a authored by Ye Li's avatar Ye Li Committed by Stefano Babic
Browse files

eQos: Implement the read_rom_hwaddr callback


Implement the read_rom_hwaddr callback to load MAC address from fuse
for imx8m platforms.

Reviewed-by: default avatarFugang Duan <fugang.duan@nxp.com>
Signed-off-by: default avatarYe Li <ye.li@nxp.com>
Signed-off-by: default avatarPeng Fan <peng.fan@nxp.com>
parent 9d4194f1
No related branches found
No related tags found
No related merge requests found
......@@ -1145,6 +1145,16 @@ static int eqos_write_hwaddr(struct udevice *dev)
return 0;
}
static int eqos_read_rom_hwaddr(struct udevice *dev)
{
struct eth_pdata *pdata = dev_get_platdata(dev);
#ifdef CONFIG_ARCH_IMX8M
imx_get_mac_from_fuse(dev->req_seq, pdata->enetaddr);
#endif
return !is_valid_ethaddr(pdata->enetaddr);
}
static int eqos_start(struct udevice *dev)
{
struct eqos_priv *eqos = dev_get_priv(dev);
......@@ -2066,6 +2076,7 @@ static const struct eth_ops eqos_ops = {
.recv = eqos_recv,
.free_pkt = eqos_free_pkt,
.write_hwaddr = eqos_write_hwaddr,
.read_rom_hwaddr = eqos_read_rom_hwaddr,
};
static struct eqos_ops eqos_tegra186_ops = {
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment