Skip to content

Commit b9a30ef

Browse files
Magnus Dammhorms
authored andcommitted
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 <[email protected]> Signed-off-by: Simon Horman <[email protected]>
1 parent a7b99f2 commit b9a30ef

File tree

4 files changed

+10
-1
lines changed

4 files changed

+10
-1
lines changed

arch/arm/mach-shmobile/Kconfig

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,6 @@ config ARCH_R8A73A4
2323
select ARCH_WANT_OPTIONAL_GPIOLIB
2424
select ARM_GIC
2525
select CPU_V7
26-
select HAVE_ARM_ARCH_TIMER
2726
select SH_CLK_CPG
2827
select RENESAS_IRQC
2928
select ARCH_HAS_CPUFREQ

arch/arm/mach-shmobile/board-ape6evm.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -101,6 +101,7 @@ static const char *ape6evm_boards_compat_dt[] __initdata = {
101101
};
102102

103103
DT_MACHINE_START(APE6EVM_DT, "ape6evm")
104+
.init_early = r8a73a4_init_delay,
104105
.init_time = shmobile_timer_init,
105106
.init_machine = ape6evm_add_standard_devices,
106107
.dt_compat = ape6evm_boards_compat_dt,

arch/arm/mach-shmobile/include/mach/r8a73a4.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,5 +4,6 @@
44
void r8a73a4_add_standard_devices(void);
55
void r8a73a4_clock_init(void);
66
void r8a73a4_pinmux_init(void);
7+
void r8a73a4_init_delay(void);
78

89
#endif /* __ASM_R8A73A4_H__ */

arch/arm/mach-shmobile/setup-r8a73a4.c

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -202,6 +202,13 @@ void __init r8a73a4_add_standard_devices(void)
202202
r8a7790_register_cmt(10);
203203
}
204204

205+
void __init r8a73a4_init_delay(void)
206+
{
207+
#ifndef CONFIG_ARM_ARCH_TIMER
208+
shmobile_setup_delay(1500, 2, 4); /* Cortex-A15 @ 1500MHz */
209+
#endif
210+
}
211+
205212
#ifdef CONFIG_USE_OF
206213
void __init r8a73a4_add_standard_devices_dt(void)
207214
{
@@ -215,6 +222,7 @@ static const char *r8a73a4_boards_compat_dt[] __initdata = {
215222
};
216223

217224
DT_MACHINE_START(R8A73A4_DT, "Generic R8A73A4 (Flattened Device Tree)")
225+
.init_early = r8a73a4_init_delay,
218226
.init_machine = r8a73a4_add_standard_devices_dt,
219227
.init_time = shmobile_timer_init,
220228
.dt_compat = r8a73a4_boards_compat_dt,

0 commit comments

Comments
 (0)