mirror of
https://github.com/torvalds/linux.git
synced 2024-11-24 13:11:40 +00:00
a925810f6e
The timer will register into system at very early phase at kernel boot; if timer needs to use clock, the clock should be get ready in function of_clk_init() so later the timer driver probe can retrieve clock successfully. This is finished in below flow on arm64: start_kernel() `-> time_init() `-> of_clk_init(NULL) => register timer's clock `-> clocksource_probe() => register timer On Hi3660 the sp804 timer uses clock "osc32k", this clock is registered as platform driver rather than CLK_OF_DECLARE_DRIVER method. As result, sp804 timer probe returns failure due if cannot bind clock properly. To fix the failure, this patch is to split crgctrl clocks into two subsets. One part is for fixed_rate_clks which includes pre-defined fixed rate clocks, and "osc32k" clock is in this category; So we change their registration to CLK_OF_DECLARE_DRIVER method, as result the clocks can be registered ahead with function of_clk_init() and timer driver can bind timer clock successfully; the rest of the crgctrl clocks are still registered by the probe of the platform driver. This patch also adds checking for all crgctrl clocks registration and print out log if any clock has failure. Signed-off-by: Leo Yan <leo.yan@linaro.org> Signed-off-by: Stephen Boyd <sboyd@codeaurora.org> |
||
---|---|---|
.. | ||
clk-hi3519.c | ||
clk-hi3620.c | ||
clk-hi3660.c | ||
clk-hi6220-stub.c | ||
clk-hi6220.c | ||
clk-hip04.c | ||
clk-hix5hd2.c | ||
clk.c | ||
clk.h | ||
clkdivider-hi6220.c | ||
clkgate-separated.c | ||
crg-hi3516cv300.c | ||
crg-hi3798cv200.c | ||
crg.h | ||
Kconfig | ||
Makefile | ||
reset.c | ||
reset.h |