| From f27a8753c74c940e0e60fac7f3a0df2bab61a094 Mon Sep 17 00:00:00 2001 |
| From: Magnus Damm <damm@opensource.se> |
| Date: Fri, 28 Jun 2013 20:27:32 +0900 |
| Subject: ARM: shmobile: Make r8a73a4 Arch timer optional |
| |
| Update the r8a73a4 code to allow using other |
| timers than Arch timer for clock event |
| |
| Signed-off-by: Magnus Damm <damm@opensource.se> |
| Signed-off-by: Simon Horman <horms+renesas@verge.net.au> |
| (cherry picked from commit b9a30ef1d354c0bc0cc6d973bbe7ede9f00716ee) |
| Signed-off-by: Simon Horman <horms+renesas@verge.net.au> |
| --- |
| arch/arm/mach-shmobile/Kconfig | 1 - |
| arch/arm/mach-shmobile/board-ape6evm.c | 1 + |
| arch/arm/mach-shmobile/include/mach/r8a73a4.h | 1 + |
| arch/arm/mach-shmobile/setup-r8a73a4.c | 8 ++++++++ |
| 4 files changed, 10 insertions(+), 1 deletion(-) |
| |
| diff --git a/arch/arm/mach-shmobile/Kconfig b/arch/arm/mach-shmobile/Kconfig |
| index 406077c9..dd80f215 100644 |
| --- a/arch/arm/mach-shmobile/Kconfig |
| +++ b/arch/arm/mach-shmobile/Kconfig |
| @@ -23,7 +23,6 @@ config ARCH_R8A73A4 |
| select ARCH_WANT_OPTIONAL_GPIOLIB |
| select ARM_GIC |
| select CPU_V7 |
| - select HAVE_ARM_ARCH_TIMER |
| select SH_CLK_CPG |
| select RENESAS_IRQC |
| select ARCH_HAS_CPUFREQ |
| diff --git a/arch/arm/mach-shmobile/board-ape6evm.c b/arch/arm/mach-shmobile/board-ape6evm.c |
| index 1fbc39a1..af6dd39d 100644 |
| --- a/arch/arm/mach-shmobile/board-ape6evm.c |
| +++ b/arch/arm/mach-shmobile/board-ape6evm.c |
| @@ -101,6 +101,7 @@ static const char *ape6evm_boards_compat_dt[] __initdata = { |
| }; |
| |
| DT_MACHINE_START(APE6EVM_DT, "ape6evm") |
| + .init_early = r8a73a4_init_delay, |
| .init_time = shmobile_timer_init, |
| .init_machine = ape6evm_add_standard_devices, |
| .dt_compat = ape6evm_boards_compat_dt, |
| diff --git a/arch/arm/mach-shmobile/include/mach/r8a73a4.h b/arch/arm/mach-shmobile/include/mach/r8a73a4.h |
| index f043103e..144a85e2 100644 |
| --- a/arch/arm/mach-shmobile/include/mach/r8a73a4.h |
| +++ b/arch/arm/mach-shmobile/include/mach/r8a73a4.h |
| @@ -4,5 +4,6 @@ |
| void r8a73a4_add_standard_devices(void); |
| void r8a73a4_clock_init(void); |
| void r8a73a4_pinmux_init(void); |
| +void r8a73a4_init_delay(void); |
| |
| #endif /* __ASM_R8A73A4_H__ */ |
| diff --git a/arch/arm/mach-shmobile/setup-r8a73a4.c b/arch/arm/mach-shmobile/setup-r8a73a4.c |
| index b8dddf4a..d533bd23 100644 |
| --- a/arch/arm/mach-shmobile/setup-r8a73a4.c |
| +++ b/arch/arm/mach-shmobile/setup-r8a73a4.c |
| @@ -202,6 +202,13 @@ void __init r8a73a4_add_standard_devices(void) |
| r8a7790_register_cmt(10); |
| } |
| |
| +void __init r8a73a4_init_delay(void) |
| +{ |
| +#ifndef CONFIG_ARM_ARCH_TIMER |
| + shmobile_setup_delay(1500, 2, 4); /* Cortex-A15 @ 1500MHz */ |
| +#endif |
| +} |
| + |
| #ifdef CONFIG_USE_OF |
| void __init r8a73a4_add_standard_devices_dt(void) |
| { |
| @@ -215,6 +222,7 @@ static const char *r8a73a4_boards_compat_dt[] __initdata = { |
| }; |
| |
| DT_MACHINE_START(R8A73A4_DT, "Generic R8A73A4 (Flattened Device Tree)") |
| + .init_early = r8a73a4_init_delay, |
| .init_machine = r8a73a4_add_standard_devices_dt, |
| .init_time = shmobile_timer_init, |
| .dt_compat = r8a73a4_boards_compat_dt, |
| -- |
| 1.8.4.3.gca3854a |
| |