| From 1d8d223d3e02ead31b54d34f0022af1266ab2e05 Mon Sep 17 00:00:00 2001 |
| From: Simon Horman <horms+renesas@verge.net.au> |
| Date: Thu, 15 May 2014 20:32:06 +0900 |
| Subject: ARM: shmobile: marzen-reference: Initialize CPG device |
| |
| On multiplatform kernels clocks are handled by the CCF CPG driver. It |
| must be explicitly initialized by a call to r8a7779_clocks_init() with |
| the value of the boot mode pins. |
| |
| Based on similar work for the Koelsch board by Laurent Pinchart. |
| |
| Acked-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com> |
| Signed-off-by: Simon Horman <horms+renesas@verge.net.au> |
| (cherry picked from commit a92fbd077bbfbe98e4dee84081d84c44ae99538b) |
| Signed-off-by: Simon Horman <horms+renesas@verge.net.au> |
| --- |
| arch/arm/mach-shmobile/board-marzen-reference.c | 16 ++++++++++++---- |
| 1 file changed, 12 insertions(+), 4 deletions(-) |
| |
| diff --git a/arch/arm/mach-shmobile/board-marzen-reference.c b/arch/arm/mach-shmobile/board-marzen-reference.c |
| index d90843b22027..f642819009ad 100644 |
| --- a/arch/arm/mach-shmobile/board-marzen-reference.c |
| +++ b/arch/arm/mach-shmobile/board-marzen-reference.c |
| @@ -19,7 +19,8 @@ |
| * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA |
| */ |
| |
| -#include <linux/clk-provider.h> |
| +#include <linux/clk/shmobile.h> |
| +#include <linux/clocksource.h> |
| #include <linux/of_platform.h> |
| #include <mach/r8a7779.h> |
| #include <asm/irq.h> |
| @@ -27,11 +28,17 @@ |
| #include "common.h" |
| #include "irqs.h" |
| |
| -static void __init marzen_init(void) |
| +static void __init marzen_init_timer(void) |
| { |
| #ifdef CONFIG_COMMON_CLK |
| - of_clk_init(NULL); |
| -#else |
| + r8a7779_clocks_init(r8a7779_read_mode_pins()); |
| +#endif |
| + clocksource_of_init(); |
| +} |
| + |
| +static void __init marzen_init(void) |
| +{ |
| +#ifndef CONFIG_COMMON_CLK |
| r8a7779_clock_init(); |
| #endif |
| r8a7779_add_standard_devices_dt(); |
| @@ -48,6 +55,7 @@ DT_MACHINE_START(MARZEN, "marzen") |
| .smp = smp_ops(r8a7779_smp_ops), |
| .map_io = r8a7779_map_io, |
| .init_early = r8a7779_init_delay, |
| + .init_time = marzen_init_timer, |
| .nr_irqs = NR_IRQS_LEGACY, |
| .init_irq = r8a7779_init_irq_dt, |
| .init_machine = marzen_init, |
| -- |
| 2.1.2 |
| |