Commit 8333d8c9 authored by Magnus Damm's avatar Magnus Damm Committed by Simon Horman

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: default avatarMagnus Damm <damm@opensource.se>
Signed-off-by: default avatarSimon Horman <horms+renesas@verge.net.au>
parent 99ade1a0
...@@ -61,7 +61,6 @@ config ARCH_R8A7790 ...@@ -61,7 +61,6 @@ config ARCH_R8A7790
select ARCH_WANT_OPTIONAL_GPIOLIB select ARCH_WANT_OPTIONAL_GPIOLIB
select ARM_GIC select ARM_GIC
select CPU_V7 select CPU_V7
select HAVE_ARM_ARCH_TIMER
select SH_CLK_CPG select SH_CLK_CPG
select RENESAS_IRQC select RENESAS_IRQC
......
...@@ -102,6 +102,7 @@ static const char *lager_boards_compat_dt[] __initdata = { ...@@ -102,6 +102,7 @@ static const char *lager_boards_compat_dt[] __initdata = {
}; };
DT_MACHINE_START(LAGER_DT, "lager") DT_MACHINE_START(LAGER_DT, "lager")
.init_early = r8a7790_init_delay,
.init_time = r8a7790_timer_init, .init_time = r8a7790_timer_init,
.init_machine = lager_add_standard_devices, .init_machine = lager_add_standard_devices,
.dt_compat = lager_boards_compat_dt, .dt_compat = lager_boards_compat_dt,
......
...@@ -4,6 +4,7 @@ ...@@ -4,6 +4,7 @@
void r8a7790_add_standard_devices(void); void r8a7790_add_standard_devices(void);
void r8a7790_clock_init(void); void r8a7790_clock_init(void);
void r8a7790_pinmux_init(void); void r8a7790_pinmux_init(void);
void r8a7790_init_delay(void);
void r8a7790_timer_init(void); void r8a7790_timer_init(void);
#endif /* __ASM_R8A7790_H__ */ #endif /* __ASM_R8A7790_H__ */
...@@ -208,6 +208,13 @@ void __init r8a7790_timer_init(void) ...@@ -208,6 +208,13 @@ void __init r8a7790_timer_init(void)
shmobile_timer_init(); shmobile_timer_init();
} }
void __init r8a7790_init_delay(void)
{
#ifndef CONFIG_ARM_ARCH_TIMER
shmobile_setup_delay(1300, 2, 4); /* Cortex-A15 @ 1300MHz */
#endif
}
#ifdef CONFIG_USE_OF #ifdef CONFIG_USE_OF
static const char *r8a7790_boards_compat_dt[] __initdata = { static const char *r8a7790_boards_compat_dt[] __initdata = {
...@@ -216,6 +223,7 @@ static const char *r8a7790_boards_compat_dt[] __initdata = { ...@@ -216,6 +223,7 @@ static const char *r8a7790_boards_compat_dt[] __initdata = {
}; };
DT_MACHINE_START(R8A7790_DT, "Generic R8A7790 (Flattened Device Tree)") DT_MACHINE_START(R8A7790_DT, "Generic R8A7790 (Flattened Device Tree)")
.init_early = r8a7790_init_delay,
.init_time = r8a7790_timer_init, .init_time = r8a7790_timer_init,
.dt_compat = r8a7790_boards_compat_dt, .dt_compat = r8a7790_boards_compat_dt,
MACHINE_END MACHINE_END
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment