Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

clk: ti: dra7: fix kernel boot with arg 'clocksource=gp_timer'

The OMAP Platform code provides possibility to select GP Timer as
default clocksource instead of counter_32K by using bootcmd parameter
'clocksource', but the system will crash during early boot when this
option is used on dra7 or omap5 platforms, because it will hit BUG()
statement:

omap2_gptimer_clocksource_init
->BUG_ON(res);

This happens because clk_dev alias "sys_clkin_ck" is not registered.
Hence, fix it by adding missing "sys_clkin_ck" clk_dev aliases
definitions for omap5 and dra7.

Acked-by: Tero Kristo <t-kristo@ti.com>
Cc: Tony Lindgren <tony@atomide.com>
Signed-off-by: Grygorii Strashko <grygorii.strashko@ti.com>
Signed-off-by: Stephen Boyd <sboyd@codeaurora.org>

authored by

Grygorii Strashko and committed by
Stephen Boyd
d5630b7a 3db5ca27

+2
+1
drivers/clk/ti/clk-54xx.c
··· 210 210 DT_CLK("usbhs_omap", "usbtll_fck", "dummy_ck"), 211 211 DT_CLK("omap_wdt", "ick", "dummy_ck"), 212 212 DT_CLK(NULL, "timer_32k_ck", "sys_32k_ck"), 213 + DT_CLK(NULL, "sys_clkin_ck", "sys_clkin"), 213 214 DT_CLK("4ae18000.timer", "timer_sys_ck", "sys_clkin"), 214 215 DT_CLK("48032000.timer", "timer_sys_ck", "sys_clkin"), 215 216 DT_CLK("48034000.timer", "timer_sys_ck", "sys_clkin"),
+1
drivers/clk/ti/clk-7xx.c
··· 289 289 DT_CLK("usbhs_omap", "usbtll_fck", "dummy_ck"), 290 290 DT_CLK("omap_wdt", "ick", "dummy_ck"), 291 291 DT_CLK(NULL, "timer_32k_ck", "sys_32k_ck"), 292 + DT_CLK(NULL, "sys_clkin_ck", "timer_sys_clk_div"), 292 293 DT_CLK("4ae18000.timer", "timer_sys_ck", "timer_sys_clk_div"), 293 294 DT_CLK("48032000.timer", "timer_sys_ck", "timer_sys_clk_div"), 294 295 DT_CLK("48034000.timer", "timer_sys_ck", "timer_sys_clk_div"),