summaryrefslogtreecommitdiff
path: root/common/board_r.c
diff options
context:
space:
mode:
authorJean-Jacques Hiblot <jjhiblot@ti.com>2020-10-16 16:16:31 +0530
committerTom Rini <trini@konsulko.com>2020-10-28 11:48:55 -0400
commit90a979d7887ba75b05143f6704c9638e775635e2 (patch)
tree89095058cf3dd7c955cbb287d86e113516ea8498 /common/board_r.c
parent0ad40b2463053947da052e74be72938fa5e4735e (diff)
dm: board: complete the initialization of the muxes in initr_dm()
This will probe the multiplexer devices that have a "u-boot,mux-autoprobe" property. As a consequence they will be put in their idle state. Signed-off-by: Jean-Jacques Hiblot <jjhiblot@ti.com> Reviewed-by: Simon Glass <sjg@chromium.org> Signed-off-by: Pratyush Yadav <p.yadav@ti.com>
Diffstat (limited to 'common/board_r.c')
-rw-r--r--common/board_r.c12
1 files changed, 12 insertions, 0 deletions
diff --git a/common/board_r.c b/common/board_r.c
index 9b2fec701a..b9217b2e27 100644
--- a/common/board_r.c
+++ b/common/board_r.c
@@ -46,6 +46,7 @@
#include <miiphy.h>
#endif
#include <mmc.h>
+#include <mux.h>
#include <nand.h>
#include <of_live.h>
#include <onenand_uboot.h>
@@ -341,6 +342,17 @@ static int initr_dm_devices(void)
return ret;
}
+ if (IS_ENABLED(CONFIG_MULTIPLEXER)) {
+ /*
+ * Initialize the multiplexer controls to their default state.
+ * This must be done early as other drivers may unknowingly
+ * rely on it.
+ */
+ ret = dm_mux_init();
+ if (ret)
+ return ret;
+ }
+
return 0;
}