[PATCH 11/17] arm: mvebu: a38x: Call bb_miiphy init directly in driver probe

Marek Vasut marek.vasut+renesas at mailbox.org
Sat Jan 18 07:53:15 CET 2025


All the resources needed by this .init callback should already
be available by the time probe function runs, simply call the
init callback directly and set the bb_miiphy init callback to
NULL. This shouldn't break anything on this hardware, but would
be nice if someone could double-check and test that.

Signed-off-by: Marek Vasut <marek.vasut+renesas at mailbox.org>
---
Cc: Christian Marangi <ansuelsmth at gmail.com>
Cc: Evgeny Bachinin <EABachinin at salutedevices.com>
Cc: Ilias Apalodimas <ilias.apalodimas at linaro.org>
Cc: Jerome Forissier <jerome.forissier at linaro.org>
Cc: Joe Hershberger <joe.hershberger at ni.com>
Cc: Mario Six <mario.six at gdsys.cc>
Cc: Michal Simek <michal.simek at amd.com>
Cc: Nobuhiro Iwamatsu <iwamatsu at nigauri.org>
Cc: Paul Barker <paul.barker.ct at bp.renesas.com>
Cc: Ramon Fried <rfried.dev at gmail.com>
Cc: Simon Glass <sjg at chromium.org>
Cc: Sughosh Ganu <sughosh.ganu at linaro.org>
Cc: Tom Rini <trini at konsulko.com>
Cc: u-boot at lists.denx.de
---
 board/gdsys/a38x/ihs_phys.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/board/gdsys/a38x/ihs_phys.c b/board/gdsys/a38x/ihs_phys.c
index 2b598abb7f0..0c2c0a54598 100644
--- a/board/gdsys/a38x/ihs_phys.c
+++ b/board/gdsys/a38x/ihs_phys.c
@@ -234,7 +234,7 @@ int register_miiphy_bus(uint k, struct mii_dev **bus)
 	mdiodev->write = bb_miiphy_write;
 
 	/* Copy the bus accessors and private data */
-	bb_miiphy->init = mii_mdio_init;
+	bb_miiphy->init = NULL;
 	bb_miiphy->mdio_active = mii_mdio_active;
 	bb_miiphy->mdio_tristate = mii_mdio_tristate;
 	bb_miiphy->set_mdio = mii_set_mdio;
@@ -248,7 +248,7 @@ int register_miiphy_bus(uint k, struct mii_dev **bus)
 		return retval;
 	*bus = miiphy_get_dev_by_name(mdiodev->name);
 
-	return 0;
+	return mii_mdio_init(bb_miiphy);
 }
 
 struct porttype *get_porttype(uint octo_phy_mask, uint k)
-- 
2.45.2



More information about the U-Boot mailing list