diff options
author | Magnus Damm <damm@opensource.se> | 2013-06-28 07:27:13 -0400 |
---|---|---|
committer | Simon Horman <horms+renesas@verge.net.au> | 2013-07-17 01:26:53 -0400 |
commit | 8333d8c995169e489a81241bd632a4b9370ed7c3 (patch) | |
tree | a73b42d1be1cc4abe8858c3adb1de903af22c294 | |
parent | 99ade1a0f02e086248874d9908def3e8e4539418 (diff) |
ARM: shmobile: Make r8a7790 Arch timer optional
Update the r8a7790 code to allow using other
timers than Arch timer for clock events.
Signed-off-by: Magnus Damm <damm@opensource.se>
Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
-rw-r--r-- | arch/arm/mach-shmobile/Kconfig | 1 | ||||
-rw-r--r-- | arch/arm/mach-shmobile/board-lager.c | 1 | ||||
-rw-r--r-- | arch/arm/mach-shmobile/include/mach/r8a7790.h | 1 | ||||
-rw-r--r-- | arch/arm/mach-shmobile/setup-r8a7790.c | 8 |
4 files changed, 10 insertions, 1 deletions
diff --git a/arch/arm/mach-shmobile/Kconfig b/arch/arm/mach-shmobile/Kconfig index 734b3eec56fc..406077c9149b 100644 --- a/arch/arm/mach-shmobile/Kconfig +++ b/arch/arm/mach-shmobile/Kconfig | |||
@@ -61,7 +61,6 @@ config ARCH_R8A7790 | |||
61 | select ARCH_WANT_OPTIONAL_GPIOLIB | 61 | select ARCH_WANT_OPTIONAL_GPIOLIB |
62 | select ARM_GIC | 62 | select ARM_GIC |
63 | select CPU_V7 | 63 | select CPU_V7 |
64 | select HAVE_ARM_ARCH_TIMER | ||
65 | select SH_CLK_CPG | 64 | select SH_CLK_CPG |
66 | select RENESAS_IRQC | 65 | select RENESAS_IRQC |
67 | 66 | ||
diff --git a/arch/arm/mach-shmobile/board-lager.c b/arch/arm/mach-shmobile/board-lager.c index 1e99b17767bb..d0da0525bf0b 100644 --- a/arch/arm/mach-shmobile/board-lager.c +++ b/arch/arm/mach-shmobile/board-lager.c | |||
@@ -102,6 +102,7 @@ static const char *lager_boards_compat_dt[] __initdata = { | |||
102 | }; | 102 | }; |
103 | 103 | ||
104 | DT_MACHINE_START(LAGER_DT, "lager") | 104 | DT_MACHINE_START(LAGER_DT, "lager") |
105 | .init_early = r8a7790_init_delay, | ||
105 | .init_time = r8a7790_timer_init, | 106 | .init_time = r8a7790_timer_init, |
106 | .init_machine = lager_add_standard_devices, | 107 | .init_machine = lager_add_standard_devices, |
107 | .dt_compat = lager_boards_compat_dt, | 108 | .dt_compat = lager_boards_compat_dt, |
diff --git a/arch/arm/mach-shmobile/include/mach/r8a7790.h b/arch/arm/mach-shmobile/include/mach/r8a7790.h index 2e919e61fa0d..7851cc1bc9fb 100644 --- a/arch/arm/mach-shmobile/include/mach/r8a7790.h +++ b/arch/arm/mach-shmobile/include/mach/r8a7790.h | |||
@@ -4,6 +4,7 @@ | |||
4 | void r8a7790_add_standard_devices(void); | 4 | void r8a7790_add_standard_devices(void); |
5 | void r8a7790_clock_init(void); | 5 | void r8a7790_clock_init(void); |
6 | void r8a7790_pinmux_init(void); | 6 | void r8a7790_pinmux_init(void); |
7 | void r8a7790_init_delay(void); | ||
7 | void r8a7790_timer_init(void); | 8 | void r8a7790_timer_init(void); |
8 | 9 | ||
9 | #endif /* __ASM_R8A7790_H__ */ | 10 | #endif /* __ASM_R8A7790_H__ */ |
diff --git a/arch/arm/mach-shmobile/setup-r8a7790.c b/arch/arm/mach-shmobile/setup-r8a7790.c index ece60c635de7..f01542e13e58 100644 --- a/arch/arm/mach-shmobile/setup-r8a7790.c +++ b/arch/arm/mach-shmobile/setup-r8a7790.c | |||
@@ -208,6 +208,13 @@ void __init r8a7790_timer_init(void) | |||
208 | shmobile_timer_init(); | 208 | shmobile_timer_init(); |
209 | } | 209 | } |
210 | 210 | ||
211 | void __init r8a7790_init_delay(void) | ||
212 | { | ||
213 | #ifndef CONFIG_ARM_ARCH_TIMER | ||
214 | shmobile_setup_delay(1300, 2, 4); /* Cortex-A15 @ 1300MHz */ | ||
215 | #endif | ||
216 | } | ||
217 | |||
211 | #ifdef CONFIG_USE_OF | 218 | #ifdef CONFIG_USE_OF |
212 | 219 | ||
213 | static const char *r8a7790_boards_compat_dt[] __initdata = { | 220 | static const char *r8a7790_boards_compat_dt[] __initdata = { |
@@ -216,6 +223,7 @@ static const char *r8a7790_boards_compat_dt[] __initdata = { | |||
216 | }; | 223 | }; |
217 | 224 | ||
218 | DT_MACHINE_START(R8A7790_DT, "Generic R8A7790 (Flattened Device Tree)") | 225 | DT_MACHINE_START(R8A7790_DT, "Generic R8A7790 (Flattened Device Tree)") |
226 | .init_early = r8a7790_init_delay, | ||
219 | .init_time = r8a7790_timer_init, | 227 | .init_time = r8a7790_timer_init, |
220 | .dt_compat = r8a7790_boards_compat_dt, | 228 | .dt_compat = r8a7790_boards_compat_dt, |
221 | MACHINE_END | 229 | MACHINE_END |