From: Lucas Stach <l.stach@pengutronix.de>
To: barebox@lists.infradead.org
Subject: [PATCH 3/4] ARM: nxp-imx8mm-evk: always set up UART
Date: Fri, 24 Jul 2020 13:12:32 +0200 [thread overview]
Message-ID: <20200724111233.23725-3-l.stach@pengutronix.de> (raw)
In-Reply-To: <20200724111233.23725-1-l.stach@pengutronix.de>
When the TF-A is configured to have some output on the UART it does not
set up the UART on its own, but just expects a pre-existing configuration.
If Barebox did not set up the UART in the !DEBUG_LL case, TF-A will just
hang without any user accessible debug output, which is a very non-obvious
failure, so better be safe and always set up the UART in case TF-A wants
to use it.
Signed-off-by: Lucas Stach <l.stach@pengutronix.de>
---
arch/arm/boards/nxp-imx8mm-evk/lowlevel.c | 10 ++++++----
1 file changed, 6 insertions(+), 4 deletions(-)
diff --git a/arch/arm/boards/nxp-imx8mm-evk/lowlevel.c b/arch/arm/boards/nxp-imx8mm-evk/lowlevel.c
index cd1f7d168bc6..082aefb8c1c5 100644
--- a/arch/arm/boards/nxp-imx8mm-evk/lowlevel.c
+++ b/arch/arm/boards/nxp-imx8mm-evk/lowlevel.c
@@ -32,9 +32,12 @@ static void setup_uart(void)
imx8mm_setup_pad(IMX8MM_PAD_UART2_TXD_UART2_TX | UART_PAD_CTRL);
- imx8m_uart_setup_ll();
+ imx8mq_uart_setup((void *)MX8M_UART2_BASE_ADDR);
- putc_ll('>');
+ if (IS_ENABLED(CONFIG_DEBUG_LL)) {
+ imx8m_uart_setup_ll();
+ putc_ll('>');
+ }
}
static void pmic_reg_write(void *i2c, int reg, uint8_t val)
@@ -157,8 +160,7 @@ static void start_atf(void)
*/
static __noreturn noinline void nxp_imx8mm_evk_start(void)
{
- if (IS_ENABLED(CONFIG_DEBUG_LL))
- setup_uart();
+ setup_uart();
start_atf();
--
2.20.1
_______________________________________________
barebox mailing list
barebox@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/barebox
next prev parent reply other threads:[~2020-07-24 11:12 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-07-24 11:12 [PATCH 1/4] ARM: imx8mm: select FIRMWARE_IMX_LPDDR4_PMU_TRAIN from IMX8MM_EVK Lucas Stach
2020-07-24 11:12 ` [PATCH 2/4] ARM: imx8m: make debug UART selection available on i.MX8MM Lucas Stach
2020-08-03 19:36 ` Sascha Hauer
2020-07-24 11:12 ` Lucas Stach [this message]
2020-07-24 11:12 ` [PATCH 4/4] nvmem: ocotp: add support for i.MX8MM Lucas Stach
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20200724111233.23725-3-l.stach@pengutronix.de \
--to=l.stach@pengutronix.de \
--cc=barebox@lists.infradead.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox