diff options
author | Matt Pelland <mpelland@starry.com> | 2019-07-30 09:40:24 -0400 |
---|---|---|
committer | Joe Hershberger <joe.hershberger@ni.com> | 2019-09-04 11:37:19 -0500 |
commit | a37c082248220a30caacc7804575cae6f885506b (patch) | |
tree | 3fffe8dd605c0f76309f67b534ac5ce39958f732 /drivers/net/mvpp2.c | |
parent | 7660d5c120698a1fb85ea38ad2bed1438ef5ebb1 (diff) | |
download | u-boot-a37c082248220a30caacc7804575cae6f885506b.tar.gz |
net: mvpp2: support setting hardware addresses from ethernet core
mvpp2 already has support for setting MAC addresses but this
functionality was not exposed to the ethernet core. This commit exposes
this functionality so that MAC address assignments stored in U-Boot's
environment are correctly applied before Linux boots.
Signed-off-by: Matt Pelland <mpelland@starry.com>
Acked-by: Joe Hershberger <joe.hershberger@ni.com>
Diffstat (limited to 'drivers/net/mvpp2.c')
-rw-r--r-- | drivers/net/mvpp2.c | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/drivers/net/mvpp2.c b/drivers/net/mvpp2.c index bcc6fe92a9..bd89725e77 100644 --- a/drivers/net/mvpp2.c +++ b/drivers/net/mvpp2.c @@ -5321,6 +5321,13 @@ static void mvpp2_stop(struct udevice *dev) mvpp2_cleanup_txqs(port); } +static int mvpp2_write_hwaddr(struct udevice *dev) +{ + struct mvpp2_port *port = dev_get_priv(dev); + + return mvpp2_prs_update_mac_da(port, port->dev_addr); +} + static int mvpp22_smi_phy_addr_cfg(struct mvpp2_port *port) { writel(port->phyaddr, port->priv->iface_base + @@ -5525,6 +5532,7 @@ static const struct eth_ops mvpp2_ops = { .send = mvpp2_send, .recv = mvpp2_recv, .stop = mvpp2_stop, + .write_hwaddr = mvpp2_write_hwaddr }; static struct driver mvpp2_driver = { |