summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMarek Vasut <[email protected]>2025-03-02 02:24:50 +0100
committerMarek Vasut <[email protected]>2025-03-11 23:05:57 +0100
commit7a13d9a9b7a1abfe0cbe1b2df8592af88322dea1 (patch)
treecad8882c9214082d4edf3055b2daab1cfd172a20
parentf6fba8385745b560678c02997d8fe448c1679ca5 (diff)
arm: mvebu: a38x: Switch back to mdio_alloc()
Use mdio_alloc() again to allocate MDIO bus. This is possible because all the miiphybb parameters and ops passing is handled in at bb_miiphy_read()/bb_miiphy_write() level. Signed-off-by: Marek Vasut <[email protected]> Reviewed-by: Paul Barker <[email protected]>
-rw-r--r--board/gdsys/a38x/ihs_phys.c9
1 files changed, 2 insertions, 7 deletions
diff --git a/board/gdsys/a38x/ihs_phys.c b/board/gdsys/a38x/ihs_phys.c
index 7aa427e0312..d51301869cd 100644
--- a/board/gdsys/a38x/ihs_phys.c
+++ b/board/gdsys/a38x/ihs_phys.c
@@ -244,14 +244,9 @@ static int mii_bb_miiphy_write(struct mii_dev *miidev, int addr,
int register_miiphy_bus(uint k, struct mii_dev **bus)
{
- struct bb_miiphy_bus *bb_miiphy = bb_miiphy_alloc();
- struct mii_dev *mdiodev;
+ struct mii_dev *mdiodev = mdio_alloc();
int retval;
- if (!bb_miiphy)
- return -ENOMEM;
-
- mdiodev = &bb_miiphy->mii;
snprintf(mdiodev->name, MDIO_NAME_LEN, "ihs%d", k);
mdiodev->read = mii_bb_miiphy_read;
mdiodev->write = mii_bb_miiphy_write;
@@ -260,7 +255,7 @@ int register_miiphy_bus(uint k, struct mii_dev **bus)
retval = mdio_register(mdiodev);
if (retval < 0)
return retval;
- *bus = &bb_miiphy->mii;
+ *bus = mdiodev;
return mii_mdio_init(k);
}