diff mbox series

[v1,12/16] arm: mxs: Prevent serial console init when in very early SPL boot code

Message ID 20230519104359.2048821-13-lukma@denx.de
State Accepted
Commit 191f683ee204c68eab2d6b28b9e4e81b1c6a0885
Delegated to: Stefano Babic
Headers show
Series arm: xea: Update i.MX28 XEA board to use DM_SERIAL | expand

Commit Message

Lukasz Majewski May 19, 2023, 10:43 a.m. UTC
When DM_SERIAL is enabled on mxs (i.e. imx28) platform, the console
early initialization must be postponed until the driver model is
correctly setup.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
---

 arch/arm/cpu/arm926ejs/mxs/spl_boot.c | 6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)

Comments

Stefano Babic July 11, 2023, 7:44 p.m. UTC | #1
> When DM_SERIAL is enabled on mxs (i.e. imx28) platform, the console
> early initialization must be postponed until the driver model is
> correctly setup.
> Signed-off-by: Lukasz Majewski <lukma@denx.de>
Applied to u-boot-imx, master, thanks !

Best regards,
Stefano Babic
diff mbox series

Patch

diff --git a/arch/arm/cpu/arm926ejs/mxs/spl_boot.c b/arch/arm/cpu/arm926ejs/mxs/spl_boot.c
index 763d79e803..5598c552ab 100644
--- a/arch/arm/cpu/arm926ejs/mxs/spl_boot.c
+++ b/arch/arm/cpu/arm926ejs/mxs/spl_boot.c
@@ -128,8 +128,10 @@  void mxs_common_spl_init(const uint32_t arg, const uint32_t *resptr,
 
 	mxs_iomux_setup_multiple_pads(iomux_setup, iomux_size);
 
-	mxs_spl_console_init();
-	debug("SPL: Serial Console Initialised\n");
+	if (!CONFIG_IS_ENABLED(DM_SERIAL)) {
+		mxs_spl_console_init();
+		debug("SPL: Serial Console Initialised\n");
+	}
 
 	mxs_power_init();