ARM: shmobile: Make r8a73a4 Arch timer optional
authorMagnus Damm <damm@opensource.se>
Fri, 28 Jun 2013 11:27:32 +0000 (20:27 +0900)
committerSimon Horman <horms+renesas@verge.net.au>
Wed, 17 Jul 2013 05:26:54 +0000 (14:26 +0900)
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>
arch/arm/mach-shmobile/Kconfig
arch/arm/mach-shmobile/board-ape6evm.c
arch/arm/mach-shmobile/include/mach/r8a73a4.h
arch/arm/mach-shmobile/setup-r8a73a4.c

index 406077c9149b73a4848464a05791eb07e7e01b32..dd80f215feeb9461a60a19885d467ce01815c794 100644 (file)
@@ -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
index 1fbc39a14e25c82aa0fe9e33e9e47405ea815d8a..af6dd39d37580fedeeb33fe602a7ff20acc613dd 100644 (file)
@@ -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,
index f043103e32c98e897b00bc3db489fcda444f34c8..144a85e29245dabcc12ef5f0ae89f755c0f26f1a 100644 (file)
@@ -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__ */
index b8dddf4a7ae9f572fe971dced9d0b77b16b950bb..d533bd23865c70e408c74374946ee5d355a41289 100644 (file)
@@ -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,