summaryrefslogtreecommitdiff
path: root/arch/arm/include/asm/arch-mx7/clock.h
diff options
context:
space:
mode:
authorJun Nie <jun.nie@linaro.org>2019-05-08 14:38:31 +0800
committerStefano Babic <sbabic@denx.de>2019-06-11 10:42:48 +0200
commit79fcbde8eb57a0dfc9761c4ba167186843d7a707 (patch)
treea10e0f01ee43d5c15d793023a4686beac5fe5b45 /arch/arm/include/asm/arch-mx7/clock.h
parentbc7c9ed33c685a8285e4fcf2a9f24499f14026a9 (diff)
pico-imx7d: Correct uart clock root
Correct uart clock root ID. Incorrect ID may result the clock is gated because rate value 0 is returned in imx_get_uartclk() The ID can be ignored if CONFIG_SKIP_LOWLEVEL_INIT is not enabled because init_clk_uart() will enable all uart clocks in that case. Signed-off-by: Jun Nie <jun.nie@linaro.org>
Diffstat (limited to 'arch/arm/include/asm/arch-mx7/clock.h')
-rw-r--r--arch/arm/include/asm/arch-mx7/clock.h18
1 files changed, 18 insertions, 0 deletions
diff --git a/arch/arm/include/asm/arch-mx7/clock.h b/arch/arm/include/asm/arch-mx7/clock.h
index f56564ea6f..1d07fde543 100644
--- a/arch/arm/include/asm/arch-mx7/clock.h
+++ b/arch/arm/include/asm/arch-mx7/clock.h
@@ -175,6 +175,24 @@ enum clk_root_index {
CLK_ROOT_MAX,
};
+#if (CONFIG_CONS_INDEX == 0)
+#define UART_CLK_ROOT UART1_CLK_ROOT
+#elif (CONFIG_CONS_INDEX == 1)
+#define UART_CLK_ROOT UART2_CLK_ROOT
+#elif (CONFIG_CONS_INDEX == 2)
+#define UART_CLK_ROOT UART3_CLK_ROOT
+#elif (CONFIG_CONS_INDEX == 3)
+#define UART_CLK_ROOT UART4_CLK_ROOT
+#elif (CONFIG_CONS_INDEX == 4)
+#define UART_CLK_ROOT UART5_CLK_ROOT
+#elif (CONFIG_CONS_INDEX == 5)
+#define UART_CLK_ROOT UART6_CLK_ROOT
+#elif (CONFIG_CONS_INDEX == 6)
+#define UART_CLK_ROOT UART7_CLK_ROOT
+#else
+#error "Invalid IMX UART ID for serial console is defined"
+#endif
+
struct clk_root_setting {
enum clk_root_index root;
u32 setting;