diff options
author | Laurent Pinchart <laurent.pinchart+renesas@ideasonboard.com> | 2013-12-11 09:13:51 -0500 |
---|---|---|
committer | Simon Horman <horms+renesas@verge.net.au> | 2013-12-19 02:34:05 -0500 |
commit | 4b5c211f9f93c3919f23c88d808a4eda104ec8b2 (patch) | |
tree | f7d3380e6d37579911c0d54b4f0b561211712635 /arch/arm/mach-shmobile/setup-rcar-gen2.c | |
parent | 4d8864c9e94ec727f1c675b9f6921525c360334b (diff) |
ARM: shmobile: rcar-gen2: Initialize CCF before clock sources
When CONFIG_COMMON_CLOCK is enabled, call rcar_gen2_clocks_init() in the
timer init function to initialize the common clock framework before
initializing the clock sources. This will take care of clock
initialization when the r8a779[01] boards will be switched to
multiplatform kernels.
Signed-off-by: Laurent Pinchart <laurent.pinchart+renesas@ideasonboard.com>
Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
Diffstat (limited to 'arch/arm/mach-shmobile/setup-rcar-gen2.c')
-rw-r--r-- | arch/arm/mach-shmobile/setup-rcar-gen2.c | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/arch/arm/mach-shmobile/setup-rcar-gen2.c b/arch/arm/mach-shmobile/setup-rcar-gen2.c index b6275ab6085c..69ccc6c6fd33 100644 --- a/arch/arm/mach-shmobile/setup-rcar-gen2.c +++ b/arch/arm/mach-shmobile/setup-rcar-gen2.c | |||
@@ -18,6 +18,7 @@ | |||
18 | * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA | 18 | * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA |
19 | */ | 19 | */ |
20 | 20 | ||
21 | #include <linux/clk/shmobile.h> | ||
21 | #include <linux/clocksource.h> | 22 | #include <linux/clocksource.h> |
22 | #include <linux/io.h> | 23 | #include <linux/io.h> |
23 | #include <linux/kernel.h> | 24 | #include <linux/kernel.h> |
@@ -44,8 +45,10 @@ u32 __init rcar_gen2_read_mode_pins(void) | |||
44 | 45 | ||
45 | void __init rcar_gen2_timer_init(void) | 46 | void __init rcar_gen2_timer_init(void) |
46 | { | 47 | { |
47 | #ifdef CONFIG_ARM_ARCH_TIMER | 48 | #if defined(CONFIG_ARM_ARCH_TIMER) || defined(CONFIG_COMMON_CLK) |
48 | u32 mode = rcar_gen2_read_mode_pins(); | 49 | u32 mode = rcar_gen2_read_mode_pins(); |
50 | #endif | ||
51 | #ifdef CONFIG_ARM_ARCH_TIMER | ||
49 | void __iomem *base; | 52 | void __iomem *base; |
50 | int extal_mhz = 0; | 53 | int extal_mhz = 0; |
51 | u32 freq; | 54 | u32 freq; |
@@ -98,5 +101,8 @@ void __init rcar_gen2_timer_init(void) | |||
98 | iounmap(base); | 101 | iounmap(base); |
99 | #endif /* CONFIG_ARM_ARCH_TIMER */ | 102 | #endif /* CONFIG_ARM_ARCH_TIMER */ |
100 | 103 | ||
104 | #ifdef CONFIG_COMMON_CLK | ||
105 | rcar_gen2_clocks_init(mode); | ||
106 | #endif | ||
101 | clocksource_of_init(); | 107 | clocksource_of_init(); |
102 | } | 108 | } |