summaryrefslogtreecommitdiff
path: root/common/miiphyutil.c
diff options
context:
space:
mode:
authorTom Rini <[email protected]>2025-02-26 14:32:16 -0600
committerTom Rini <[email protected]>2025-02-26 14:32:16 -0600
commit05647bdf55f94decea8f2db467347a924e783861 (patch)
treec8f1ea93f4e74592323c8fa1755c982c317106b9 /common/miiphyutil.c
parent8dd7186ca7821446c6f46b6cccefab502912f2e0 (diff)
parent4e6fed49becc7e8d9639966fd34695583192a3ee (diff)
Merge branch 'next' of https://source.denx.de/u-boot/custodians/u-boot-sh into next
bbmiiphy clean up and DM alignment, finally gets rid of the static bbmiiphy variables and plugs bbmiiphy into MDIO framework.
Diffstat (limited to 'common/miiphyutil.c')
-rw-r--r--common/miiphyutil.c13
1 files changed, 9 insertions, 4 deletions
diff --git a/common/miiphyutil.c b/common/miiphyutil.c
index 9b8744e5d8b..2a034d3a77c 100644
--- a/common/miiphyutil.c
+++ b/common/miiphyutil.c
@@ -65,6 +65,14 @@ void miiphy_init(void)
current_mii = NULL;
}
+void mdio_init(struct mii_dev *bus)
+{
+ memset(bus, 0, sizeof(*bus));
+
+ /* initialize mii_dev struct fields */
+ INIT_LIST_HEAD(&bus->link);
+}
+
struct mii_dev *mdio_alloc(void)
{
struct mii_dev *bus;
@@ -73,10 +81,7 @@ struct mii_dev *mdio_alloc(void)
if (!bus)
return bus;
- memset(bus, 0, sizeof(*bus));
-
- /* initalize mii_dev struct fields */
- INIT_LIST_HEAD(&bus->link);
+ mdio_init(bus);
return bus;
}