Guard select_ldb_di_clock_source() in board_early_init_f() with the correct video Kconfig symbol instead of calling it unconditionally.
- board/ge/b1x5v2: guard with CONFIG_SPL_VIDEO -- LDB init is needed in SPL only when display support is enabled - board/aristainetos: guard with CONFIG_VIDEO_IPUV3 -- this board does not use SPL so CONFIG_SPL_VIDEO is not the right guard here drivers/clk/imx/clk-imx6q.c already guards imx6q_init_ldb_clks() with CONFIG_IS_ENABLED(VIDEO), so no change is needed there. Signed-off-by: Md Shofiqul Islam <[email protected]> --- v3: Rebased per Fabio's request. Dropped the other two changes from v2: - "imx6: clock: fix clk0/clk1 swap in select_ldb_di_clock_source()" is no longer needed; the same fix already landed in next. - The drivers/clk/imx/clk-imx6q.c guard hunk from patch 1/2 is no longer needed either; that call site is now guarded there with CONFIG_IS_ENABLED(VIDEO). Only the board-file guard below was still missing, so v3 is a single patch instead of two. board/aristainetos/aristainetos.c | 2 ++ board/ge/b1x5v2/b1x5v2.c | 3 ++- 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/board/aristainetos/aristainetos.c b/board/aristainetos/aristainetos.c index 4a2349e165b..c163b49209e 100644 --- a/board/aristainetos/aristainetos.c +++ b/board/aristainetos/aristainetos.c @@ -218,7 +218,9 @@ static void set_gpr_register(void) int board_early_init_f(void) { +#if defined(CONFIG_VIDEO_IPUV3) select_ldb_di_clock_source(MXC_PLL5_CLK, MXC_PLL5_CLK); +#endif set_gpr_register(); /* diff --git a/board/ge/b1x5v2/b1x5v2.c b/board/ge/b1x5v2/b1x5v2.c index f7751fd6fb1..da7cb880eeb 100644 --- a/board/ge/b1x5v2/b1x5v2.c +++ b/board/ge/b1x5v2/b1x5v2.c @@ -320,8 +320,9 @@ int overwrite_console(void) int board_early_init_f(void) { +#if defined(CONFIG_SPL_VIDEO) select_ldb_di_clock_source(MXC_PLL5_CLK, MXC_PLL5_CLK); - +#endif return 0; } -- 2.51.1
