diff options
author | Ulf Samuelsson <ulf@emagii.com> | 2023-02-07 09:25:27 +0100 |
---|---|---|
committer | Tom Rini <trini@konsulko.com> | 2023-02-17 10:49:41 -0500 |
commit | aa0a8a0be2401abbe26f4e5294a24216399c8291 (patch) | |
tree | 6cc9d4fc6d7abd24c81347c0b6140cf9fdc0eadb /drivers/net | |
parent | fcb5117da8876fc5b2bf941528301218d1be7b1c (diff) |
cpsw_mdio.c: Use correct reg in cpsw_mdio_get_alive
cpsw_mdio_get_alive reads the wrong register.
See page 2316 in SPRUH73Q AM335x TRM
Signed-off-by: Ulf Samuelsson <ulf@emagii.com>
Cc: Joe Hershberger <joe.hershberger@ni.com>
Cc: Ramon Fried <rfried.dev@gmail.com>
Reviewed-by: Siddharth Vadapalli <s-vadapalli@ti.com>
Diffstat (limited to 'drivers/net')
-rw-r--r-- | drivers/net/ti/cpsw_mdio.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/drivers/net/ti/cpsw_mdio.c b/drivers/net/ti/cpsw_mdio.c index a5ba73b7398..ac791faa813 100644 --- a/drivers/net/ti/cpsw_mdio.c +++ b/drivers/net/ti/cpsw_mdio.c @@ -51,7 +51,7 @@ struct cpsw_mdio_regs { #define USERACCESS_PHY_REG_SHIFT (21) #define USERACCESS_PHY_ADDR_SHIFT (16) #define USERACCESS_DATA GENMASK(15, 0) - } user[0]; + } user[2]; }; #define CPSW_MDIO_DIV_DEF 0xff @@ -366,8 +366,8 @@ u32 cpsw_mdio_get_alive(struct mii_dev *bus) struct cpsw_mdio *mdio = bus->priv; u32 val; - val = readl(&mdio->regs->control); - return val & GENMASK(15, 0); + val = readl(&mdio->regs->alive); + return val & GENMASK(7, 0); } struct mii_dev *cpsw_mdio_init(const char *name, phys_addr_t mdio_base, |