diff options
author | Daniel Golle <daniel@makrotopia.org> | 2022-02-04 12:28:37 +0000 |
---|---|---|
committer | Daniel Golle <daniel@makrotopia.org> | 2022-02-17 15:21:47 +0000 |
commit | b53202a8c3f728c348c5376e5b5fb36af7c37744 (patch) | |
tree | 0127ff821379b3fce4b5d3419280fa6ade978acf /target/linux/realtek/files-5.10/drivers/net/dsa/rtl83xx | |
parent | af93bf6129d812937eeffc183878d60c6b700b7e (diff) | |
download | upstream-b53202a8c3f728c348c5376e5b5fb36af7c37744.tar.gz upstream-b53202a8c3f728c348c5376e5b5fb36af7c37744.tar.bz2 upstream-b53202a8c3f728c348c5376e5b5fb36af7c37744.zip |
realtek: switch to use generic MDIO accessor functions
Instead of directly calling SoC-specific functions in order to access
(paged) MII registers or MMD registers, create infrastructure to allow
using the generic phy_*, phy_*_paged and phy_*_mmd functions.
Signed-off-by: Daniel Golle <daniel@makrotopia.org>
Diffstat (limited to 'target/linux/realtek/files-5.10/drivers/net/dsa/rtl83xx')
-rw-r--r-- | target/linux/realtek/files-5.10/drivers/net/dsa/rtl83xx/common.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/target/linux/realtek/files-5.10/drivers/net/dsa/rtl83xx/common.c b/target/linux/realtek/files-5.10/drivers/net/dsa/rtl83xx/common.c index 9675ba88f1..75243bab07 100644 --- a/target/linux/realtek/files-5.10/drivers/net/dsa/rtl83xx/common.c +++ b/target/linux/realtek/files-5.10/drivers/net/dsa/rtl83xx/common.c @@ -292,11 +292,14 @@ static int __init rtl83xx_mdio_probe(struct rtl838x_switch_priv *priv) */ bus->read = priv->mii_bus->read; bus->write = priv->mii_bus->write; + bus->read_paged = priv->mii_bus->read_paged; + bus->write_paged = priv->mii_bus->write_paged; snprintf(bus->id, MII_BUS_ID_SIZE, "%s-%d", bus->name, dev->id); bus->parent = dev; priv->ds->slave_mii_bus = bus; - priv->ds->slave_mii_bus->priv = priv; + priv->ds->slave_mii_bus->priv = priv->mii_bus->priv; + priv->ds->slave_mii_bus->access_capabilities = priv->mii_bus->access_capabilities; ret = mdiobus_register(priv->ds->slave_mii_bus); if (ret && mii_np) { |