[U-Boot] [PATCH v2 3/4] board: stm32mp1: Force pinctrl driver probe in board_init()

Patrice Chotard patrice.chotard at st.com
Mon Mar 11 10:13:17 UTC 2019


In order to insure that hog GPIOs are configured early during
the boot process, force all pinctrl driver probing in board_init().

Signed-off-by: Patrick Delaunay <patrick.delaunay at st.com>
Signed-off-by: Patrice Chotard <patrice.chotard at st.com>
Reviewed-by: CITOOLS <smet-aci-reviews at lists.codex.cro.st.com>
---

Changes in v2: None

 board/st/stm32mp1/stm32mp1.c | 9 +++++++++
 1 file changed, 9 insertions(+)

diff --git a/board/st/stm32mp1/stm32mp1.c b/board/st/stm32mp1/stm32mp1.c
index ff7790e310d7..24d299ac33bd 100644
--- a/board/st/stm32mp1/stm32mp1.c
+++ b/board/st/stm32mp1/stm32mp1.c
@@ -543,9 +543,18 @@ static void sysconf_init(void)
 /* board dependent setup after realloc */
 int board_init(void)
 {
+	struct udevice *dev;
+
 	/* address of boot parameters */
 	gd->bd->bi_boot_params = STM32_DDR_BASE + 0x100;
 
+	/* probe all PINCTRL for hog */
+	for (uclass_first_device(UCLASS_PINCTRL, &dev);
+	     dev;
+	     uclass_next_device(&dev)) {
+		pr_debug("probe pincontrol = %s\n", dev->name);
+	}
+
 	board_key_check();
 
 	sysconf_init();
-- 
1.9.1



More information about the U-Boot mailing list