aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSebastian Hesselbarth <sebastian.hesselbarth@gmail.com>2013-09-04 06:24:03 -0400
committerSebastian Hesselbarth <sebastian.hesselbarth@gmail.com>2013-09-29 15:09:15 -0400
commit4178bac4f6e955869395b30246687d41183a5edb (patch)
treeeaaaa480068ce221267abe3990b278141e8877ea
parentf44089a7f41c88775428f09e90df8fb2b890058a (diff)
ARM: call of_clk_init from default time_init handler
Most DT ARM machs require common clock providers initialized before timers. Currently, arch/arm machs use .init_time to call of_clk_init right before clocksource_of_init. This prevents to remove that callback and use the default one instead. This patch adds a call to of_clk_init() to the default .init_time callback for COMMON_CLK enabled machs to allow to remove custom callbacks where applicable. While at it, also reorder includes alphabetically. Signed-off-by: Sebastian Hesselbarth <sebastian.hesselbarth@gmail.com>
-rw-r--r--arch/arm/kernel/time.c29
1 files changed, 17 insertions, 12 deletions
diff --git a/arch/arm/kernel/time.c b/arch/arm/kernel/time.c
index 98aee3258398..829a96d4a179 100644
--- a/arch/arm/kernel/time.c
+++ b/arch/arm/kernel/time.c
@@ -11,25 +11,26 @@
11 * This file contains the ARM-specific time handling details: 11 * This file contains the ARM-specific time handling details:
12 * reading the RTC at bootup, etc... 12 * reading the RTC at bootup, etc...
13 */ 13 */
14#include <linux/clk-provider.h>
15#include <linux/clocksource.h>
16#include <linux/errno.h>
14#include <linux/export.h> 17#include <linux/export.h>
15#include <linux/kernel.h>
16#include <linux/interrupt.h>
17#include <linux/time.h>
18#include <linux/init.h> 18#include <linux/init.h>
19#include <linux/interrupt.h>
20#include <linux/irq.h>
21#include <linux/kernel.h>
22#include <linux/profile.h>
19#include <linux/sched.h> 23#include <linux/sched.h>
24#include <linux/sched_clock.h>
20#include <linux/smp.h> 25#include <linux/smp.h>
26#include <linux/time.h>
21#include <linux/timex.h> 27#include <linux/timex.h>
22#include <linux/errno.h>
23#include <linux/profile.h>
24#include <linux/timer.h> 28#include <linux/timer.h>
25#include <linux/clocksource.h>
26#include <linux/irq.h>
27#include <linux/sched_clock.h>
28 29
29#include <asm/thread_info.h>
30#include <asm/stacktrace.h>
31#include <asm/mach/arch.h> 30#include <asm/mach/arch.h>
32#include <asm/mach/time.h> 31#include <asm/mach/time.h>
32#include <asm/stacktrace.h>
33#include <asm/thread_info.h>
33 34
34#if defined(CONFIG_RTC_DRV_CMOS) || defined(CONFIG_RTC_DRV_CMOS_MODULE) || \ 35#if defined(CONFIG_RTC_DRV_CMOS) || defined(CONFIG_RTC_DRV_CMOS_MODULE) || \
35 defined(CONFIG_NVRAM) || defined(CONFIG_NVRAM_MODULE) 36 defined(CONFIG_NVRAM) || defined(CONFIG_NVRAM_MODULE)
@@ -116,8 +117,12 @@ int __init register_persistent_clock(clock_access_fn read_boot,
116 117
117void __init time_init(void) 118void __init time_init(void)
118{ 119{
119 if (machine_desc->init_time) 120 if (machine_desc->init_time) {
120 machine_desc->init_time(); 121 machine_desc->init_time();
121 else 122 } else {
123#ifdef CONFIG_COMMON_CLK
124 of_clk_init(NULL);
125#endif
122 clocksource_of_init(); 126 clocksource_of_init();
127 }
123} 128}