summaryrefslogtreecommitdiff
path: root/arch
diff options
context:
space:
mode:
authorStefan Agner <stefan.agner@toradex.com>2017-12-28 15:51:39 +0100
committerMax Krummenacher <max.krummenacher@toradex.com>2020-03-05 19:22:14 +0100
commit8e37e076f8d2f40e58f90581ade722ca6b4965f4 (patch)
tree85d8dee73f1892fa04f9b12420cf533eb881d79b /arch
parent47b1eeb2bdc82c4b8c47096e74dbc08405db9b43 (diff)
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 <stefan.agner@toradex.com> (cherry picked from commit f62ce2a12e69b30c4ac6d533b6eef247916bf968) (cherry picked from commit 53afce50e18bfb12d4a1cdef9e8a8b9272893df3) (cherry picked from commit d248c3d4c39c24b6f66972f4076cf72b2a5ece1f) Conflicts: arch/arm/cpu/armv8/imx8/clock.c, file moved (cherry picked from commit 4bae89e54bfc8ecda93fac50d2112dc9d762b6fd)
Diffstat (limited to 'arch')
-rw-r--r--arch/arm/mach-imx/imx8/clock.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/arch/arm/mach-imx/imx8/clock.c b/arch/arm/mach-imx/imx8/clock.c
index 01ed28883a..bcda4719f6 100644
--- a/arch/arm/mach-imx/imx8/clock.c
+++ b/arch/arm/mach-imx/imx8/clock.c
@@ -52,8 +52,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;