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>
This commit is contained in:
Jun Nie 2019-05-08 14:38:31 +08:00 committed by Stefano Babic
parent bc7c9ed33c
commit 79fcbde8eb
2 changed files with 19 additions and 1 deletions

View File

@ -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;

View File

@ -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)