diff options
author | Ulrich Hecht <ulrich.hecht+renesas@gmail.com> | 2015-02-16 11:58:49 -0500 |
---|---|---|
committer | Simon Horman <horms+renesas@verge.net.au> | 2015-02-23 16:40:46 -0500 |
commit | 43cbec8577cfd66713416c3ad33a9856edcaffb9 (patch) | |
tree | 7e3e0c76b8449c7ffd2f8039c5516c68cfb7a27b /arch/arm/mach-shmobile/setup-r8a7778.c | |
parent | 93aa970d2b0ce41efb7e5e6b94aaa66e8349a510 (diff) |
ARM: shmobile: r8a7778: implement SoC and board CCF support
Disables the legacy clock framework and passes the mode bits to the CPG
driver if CCF is enabled.
Signed-off-by: Ulrich Hecht <ulrich.hecht+renesas@gmail.com>
Acked-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Acked-by: Geert Uytterhoeven <geert+renesas@glider.be>
Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
Diffstat (limited to 'arch/arm/mach-shmobile/setup-r8a7778.c')
-rw-r--r-- | arch/arm/mach-shmobile/setup-r8a7778.c | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/arch/arm/mach-shmobile/setup-r8a7778.c b/arch/arm/mach-shmobile/setup-r8a7778.c index cef8895a9b82..c49aa094fe17 100644 --- a/arch/arm/mach-shmobile/setup-r8a7778.c +++ b/arch/arm/mach-shmobile/setup-r8a7778.c | |||
@@ -15,6 +15,7 @@ | |||
15 | * GNU General Public License for more details. | 15 | * GNU General Public License for more details. |
16 | */ | 16 | */ |
17 | 17 | ||
18 | #include <linux/clk/shmobile.h> | ||
18 | #include <linux/kernel.h> | 19 | #include <linux/kernel.h> |
19 | #include <linux/io.h> | 20 | #include <linux/io.h> |
20 | #include <linux/irqchip/arm-gic.h> | 21 | #include <linux/irqchip/arm-gic.h> |
@@ -41,6 +42,21 @@ | |||
41 | #include "irqs.h" | 42 | #include "irqs.h" |
42 | #include "r8a7778.h" | 43 | #include "r8a7778.h" |
43 | 44 | ||
45 | #define MODEMR 0xffcc0020 | ||
46 | |||
47 | #ifdef CONFIG_COMMON_CLK | ||
48 | static void __init r8a7778_timer_init(void) | ||
49 | { | ||
50 | u32 mode; | ||
51 | void __iomem *modemr = ioremap_nocache(MODEMR, 4); | ||
52 | |||
53 | BUG_ON(!modemr); | ||
54 | mode = ioread32(modemr); | ||
55 | iounmap(modemr); | ||
56 | r8a7778_clocks_init(mode); | ||
57 | } | ||
58 | #endif | ||
59 | |||
44 | /* SCIF */ | 60 | /* SCIF */ |
45 | #define R8A7778_SCIF(index, baseaddr, irq) \ | 61 | #define R8A7778_SCIF(index, baseaddr, irq) \ |
46 | static struct plat_sci_port scif##index##_platform_data = { \ | 62 | static struct plat_sci_port scif##index##_platform_data = { \ |
@@ -608,6 +624,9 @@ DT_MACHINE_START(R8A7778_DT, "Generic R8A7778 (Flattened Device Tree)") | |||
608 | .init_early = shmobile_init_delay, | 624 | .init_early = shmobile_init_delay, |
609 | .init_irq = r8a7778_init_irq_dt, | 625 | .init_irq = r8a7778_init_irq_dt, |
610 | .init_late = shmobile_init_late, | 626 | .init_late = shmobile_init_late, |
627 | #ifdef CONFIG_COMMON_CLK | ||
628 | .init_time = r8a7778_timer_init, | ||
629 | #endif | ||
611 | .dt_compat = r8a7778_compat_dt, | 630 | .dt_compat = r8a7778_compat_dt, |
612 | MACHINE_END | 631 | MACHINE_END |
613 | 632 | ||