From d3cea3cd0f12305c1eb2c4ad7aecd00ce363fa5e Mon Sep 17 00:00:00 2001 From: Stefan Agner Date: Thu, 28 Dec 2017 15:51:39 +0100 Subject: imx8: support UART1 as console UART for Apalis iMX8 Make sure we return the clock of UART1 when building for Apalis iMX8. NXP LPUART1 is used as Apalis UART1, which is typically the main console on our Linux BSP. Signed-off-by: Stefan Agner --- arch/arm/cpu/armv8/imx8/clock.c | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/arch/arm/cpu/armv8/imx8/clock.c b/arch/arm/cpu/armv8/imx8/clock.c index bd34f45e64..3a5d641915 100644 --- a/arch/arm/cpu/armv8/imx8/clock.c +++ b/arch/arm/cpu/armv8/imx8/clock.c @@ -51,8 +51,13 @@ unsigned int mxc_get_clock(enum mxc_clock clk) switch (clk) { case MXC_UART_CLK: +#ifdef CONFIG_TARGET_APALIS_IMX8 + err = sc_pm_get_clock_rate((sc_ipc_t)gd->arch.ipc_channel_handle, + SC_R_UART_1, 2, &clkrate); +#else err = sc_pm_get_clock_rate((sc_ipc_t)gd->arch.ipc_channel_handle, SC_R_UART_0, 2, &clkrate); +#endif if (err != SC_ERR_NONE) { printf("sc get UART clk failed! err=%d\n", err); return 0; -- cgit v1.2.3