net: mdio-uclass: scan for dm mdio children on post-bind
authorTim Harvey <tharvey@gateworks.com>
Wed, 30 Nov 2022 17:42:44 +0000 (09:42 -0800)
committerTom Rini <trini@konsulko.com>
Thu, 2 Feb 2023 19:22:08 +0000 (14:22 -0500)
If a DM_MDIO driver is used we need to scan the subnodes as well.

Signed-off-by: Tim Harvey <tharvey@gateworks.com>
Signed-off-by: Vladimir Oltean <vladimir.oltean@nxp.com>
Reviewed-by: Ramon Fried <rfried.dev@gmail.com>
Reviewed-by: Fabio Estevam <festevam@denx.de>
net/mdio-uclass.c

index 4401492ca015adaadc7165fb536a794d65f22c52..d80037d0ac71d5f6334acdb365f3cdad9f034ace 100644 (file)
@@ -49,7 +49,11 @@ static int dm_mdio_post_bind(struct udevice *dev)
                return -EINVAL;
        }
 
+#if CONFIG_IS_ENABLED(OF_REAL)
+       return dm_scan_fdt_dev(dev);
+#else
        return 0;
+#endif
 }
 
 int dm_mdio_read(struct udevice *mdio_dev, int addr, int devad, int reg)