summaryrefslogtreecommitdiff
path: root/cmd/mdio.c
diff options
context:
space:
mode:
authorAlex Marginean <alexm.osslist@gmail.com>2019-06-03 19:10:30 +0300
committerJoe Hershberger <joe.hershberger@ni.com>2019-07-15 13:32:25 -0500
commitc3452b50c3aaa0db2bb0bc68039fed4d40bedbc0 (patch)
treef584c2b6965a2c920697f7c913790508af74da9f /cmd/mdio.c
parent149468699e8f631f69d55b5c86b430824fc32d69 (diff)
net: introduce MDIO DM class for MDIO devices
Adds UCLASS_MDIO DM class supporting MDIO buses that are probed as stand-alone devices. Useful in particular for systems that support DM_ETH and have a stand-alone MDIO hardware block shared by multiple Ethernet interfaces. Signed-off-by: Alex Marginean <alexm.osslist@gmail.com> Reviewed-by: Bin Meng <bmeng.cn@gmail.com> Acked-by: Joe Hershberger <joe.hershberger@ni.com>
Diffstat (limited to 'cmd/mdio.c')
-rw-r--r--cmd/mdio.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/cmd/mdio.c b/cmd/mdio.c
index 5e219f699d..a6fa9266d0 100644
--- a/cmd/mdio.c
+++ b/cmd/mdio.c
@@ -203,6 +203,11 @@ static int do_mdio(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[])
if (argc < 2)
return CMD_RET_USAGE;
+#ifdef CONFIG_DM_MDIO
+ /* probe DM MII device before any operation so they are all accesible */
+ dm_mdio_probe_devices();
+#endif
+
/*
* We use the last specified parameters, unless new ones are
* entered.