diff mbox series

[U-Boot,5/5] pico-imx6ul: Provide a way to escape the Falcon mode

Message ID 20190912190155.3225623-5-otavio@ossystems.com.br
State Accepted
Commit f6432ecea666eb4b7cbe48bde804fb886f0a8cae
Delegated to: Stefano Babic
Headers show
Series [U-Boot,1/5] pico-imx6ul: Add DWARF baseboard support | expand

Commit Message

Otavio Salvador Sept. 12, 2019, 7:01 p.m. UTC
From: Fabio Estevam <festevam@gmail.com>

When CONFIG_SPL_OS_BOOT is selected, it is still convenient to be able
to escape from Falcon mode and boot to U-Boot proper.

Add a mechanism that allows booting in U-Boot proper when the
key 'c' is entered on console at boot time.

Signed-off-by: Fabio Estevam <festevam@gmail.com>
Signed-off-by: Otavio Salvador <otavio@ossystems.com.br>
---

 board/technexion/pico-imx6ul/spl.c | 4 ++++
 1 file changed, 4 insertions(+)
diff mbox series

Patch

diff --git a/board/technexion/pico-imx6ul/spl.c b/board/technexion/pico-imx6ul/spl.c
index 284aa40db6..7f520beeb0 100644
--- a/board/technexion/pico-imx6ul/spl.c
+++ b/board/technexion/pico-imx6ul/spl.c
@@ -19,6 +19,10 @@ 
 #ifdef CONFIG_SPL_OS_BOOT
 int spl_start_uboot(void)
 {
+	/* Break into full U-Boot on 'c' */
+	if (serial_tstc() && serial_getc() == 'c')
+		return 1;
+
 	return 0;
 }
 #endif