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

arm64: init: Move of_clk_init to time_init

Clock providers should be initialized before clocksource_of_init.
If not, Clock source initialization can be fail to get the clock.

Acked-by: Will Deacon <will.deacon@arm.com>
Signed-off-by: Chanho Min <chanho.min@lge.com>
Signed-off-by: Will Deacon <will.deacon@arm.com>
Signed-off-by: Catalin Marinas <catalin.marinas@arm.com>

authored by

Chanho Min and committed by
Catalin Marinas
bc3ee18a 8f071203

+2 -1
-1
arch/arm64/kernel/setup.c
··· 393 393 394 394 static int __init arm64_device_init(void) 395 395 { 396 - of_clk_init(NULL); 397 396 of_platform_populate(NULL, of_default_bus_match_table, NULL, NULL); 398 397 return 0; 399 398 }
+2
arch/arm64/kernel/time.c
··· 33 33 #include <linux/irq.h> 34 34 #include <linux/delay.h> 35 35 #include <linux/clocksource.h> 36 + #include <linux/clk-provider.h> 36 37 37 38 #include <clocksource/arm_arch_timer.h> 38 39 ··· 66 65 { 67 66 u32 arch_timer_rate; 68 67 68 + of_clk_init(NULL); 69 69 clocksource_of_init(); 70 70 71 71 arch_timer_rate = arch_timer_get_rate();