| From ab57aa64bf995c4818b243e5911d477c8b59d980 Mon Sep 17 00:00:00 2001 |
| From: Laurent Pinchart <laurent.pinchart+renesas@ideasonboard.com> |
| Date: Wed, 11 Dec 2013 15:13:51 +0100 |
| Subject: 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> |
| (cherry picked from commit 4b5c211f9f93c3919f23c88d808a4eda104ec8b2) |
| (Queued by Simon Horman for v3.14 but not yet in Linus's tree) |
| Signed-off-by: Simon Horman <horms+renesas@verge.net.au> |
| --- |
| arch/arm/mach-shmobile/setup-rcar-gen2.c | 8 +++++++- |
| 1 file changed, 7 insertions(+), 1 deletion(-) |
| |
| 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 @@ |
| * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA |
| */ |
| |
| +#include <linux/clk/shmobile.h> |
| #include <linux/clocksource.h> |
| #include <linux/io.h> |
| #include <linux/kernel.h> |
| @@ -44,8 +45,10 @@ u32 __init rcar_gen2_read_mode_pins(void) |
| |
| void __init rcar_gen2_timer_init(void) |
| { |
| -#ifdef CONFIG_ARM_ARCH_TIMER |
| +#if defined(CONFIG_ARM_ARCH_TIMER) || defined(CONFIG_COMMON_CLK) |
| u32 mode = rcar_gen2_read_mode_pins(); |
| +#endif |
| +#ifdef CONFIG_ARM_ARCH_TIMER |
| void __iomem *base; |
| int extal_mhz = 0; |
| u32 freq; |
| @@ -98,5 +101,8 @@ void __init rcar_gen2_timer_init(void) |
| iounmap(base); |
| #endif /* CONFIG_ARM_ARCH_TIMER */ |
| |
| +#ifdef CONFIG_COMMON_CLK |
| + rcar_gen2_clocks_init(mode); |
| +#endif |
| clocksource_of_init(); |
| } |
| -- |
| 1.8.5.rc3 |
| |