
Correct uart clock root ID. Incorrect ID may result the clock is gated because rate value 0 is returned in imx_get_uartclk()
Signed-off-by: Jun Nie jun.nie@linaro.org --- arch/arm/include/asm/arch-mx7/clock.h | 5 +++++ arch/arm/mach-imx/mx7/clock.c | 2 +- include/configs/pico-imx7d.h | 1 + 3 files changed, 7 insertions(+), 1 deletion(-)
diff --git a/arch/arm/include/asm/arch-mx7/clock.h b/arch/arm/include/asm/arch-mx7/clock.h index f56564e..b6a1768 100644 --- a/arch/arm/include/asm/arch-mx7/clock.h +++ b/arch/arm/include/asm/arch-mx7/clock.h @@ -175,6 +175,11 @@ enum clk_root_index { CLK_ROOT_MAX, };
+/* Use UART1_CLK_ROOT as default root clk if platform does define it */ +#ifndef UART_CLK_ROOT +#define UART_CLK_ROOT UART1_CLK_ROOT +#endif + struct clk_root_setting { enum clk_root_index root; u32 setting; diff --git a/arch/arm/mach-imx/mx7/clock.c b/arch/arm/mach-imx/mx7/clock.c index 8cda71c..e364b16 100644 --- a/arch/arm/mach-imx/mx7/clock.c +++ b/arch/arm/mach-imx/mx7/clock.c @@ -53,7 +53,7 @@ static u32 get_ipg_clk(void)
u32 imx_get_uartclk(void) { - return get_root_clk(UART1_CLK_ROOT); + return get_root_clk(UART_CLK_ROOT); }
u32 imx_get_fecclk(void) diff --git a/include/configs/pico-imx7d.h b/include/configs/pico-imx7d.h index 8eb9064..9806348 100644 --- a/include/configs/pico-imx7d.h +++ b/include/configs/pico-imx7d.h @@ -28,6 +28,7 @@ #define CONFIG_SYS_MALLOC_LEN (32 * SZ_1M)
#define CONFIG_MXC_UART_BASE UART5_IPS_BASE_ADDR +#define UART_CLK_ROOT UART5_CLK_ROOT
/* Network */ #define CONFIG_FEC_MXC