Skip to content

Commit

Permalink
arm64: init: Move of_clk_init to time_init
Browse files Browse the repository at this point in the history
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 <[email protected]>
Signed-off-by: Chanho Min <[email protected]>
Signed-off-by: Will Deacon <[email protected]>
Signed-off-by: Catalin Marinas <[email protected]>
  • Loading branch information
Chanho Min authored and ctmarinas committed Apr 25, 2014
1 parent 8f07120 commit bc3ee18
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
1 change: 0 additions & 1 deletion arch/arm64/kernel/setup.c
Original file line number Diff line number Diff line change
Expand Up @@ -393,7 +393,6 @@ void __init setup_arch(char **cmdline_p)

static int __init arm64_device_init(void)
{
of_clk_init(NULL);
of_platform_populate(NULL, of_default_bus_match_table, NULL, NULL);
return 0;
}
Expand Down
2 changes: 2 additions & 0 deletions arch/arm64/kernel/time.c
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,7 @@
#include <linux/irq.h>
#include <linux/delay.h>
#include <linux/clocksource.h>
#include <linux/clk-provider.h>

#include <clocksource/arm_arch_timer.h>

Expand Down Expand Up @@ -65,6 +66,7 @@ void __init time_init(void)
{
u32 arch_timer_rate;

of_clk_init(NULL);
clocksource_of_init();

arch_timer_rate = arch_timer_get_rate();
Expand Down

0 comments on commit bc3ee18

Please sign in to comment.