diff options
author | Magnus Damm <damm@opensource.se> | 2013-04-07 21:23:28 -0400 |
---|---|---|
committer | Simon Horman <horms+renesas@verge.net.au> | 2013-04-09 08:37:36 -0400 |
commit | ab5fdfd5ea621b629da9bfda987af301da973525 (patch) | |
tree | d4ae345f3f05e63b08809921c5cca2566291a2d7 /arch | |
parent | c9dff05030b97d6c8f2b53a43f0d8f6d15481b92 (diff) |
ARM: shmobile: force enable of r8a7790 arch timer
Implement a SoC-specific timer init function for
r8a7790 that makes sure the architected timer
is started regardless of boot loader setting.
Signed-off-by: Magnus Damm <damm@opensource.se>
Tested-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com
Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
Diffstat (limited to 'arch')
-rw-r--r-- | arch/arm/mach-shmobile/include/mach/r8a7790.h | 1 | ||||
-rw-r--r-- | arch/arm/mach-shmobile/setup-r8a7790.c | 14 |
2 files changed, 14 insertions, 1 deletions
diff --git a/arch/arm/mach-shmobile/include/mach/r8a7790.h b/arch/arm/mach-shmobile/include/mach/r8a7790.h index 9bd6f5c894bb..2e919e61fa0d 100644 --- a/arch/arm/mach-shmobile/include/mach/r8a7790.h +++ b/arch/arm/mach-shmobile/include/mach/r8a7790.h | |||
@@ -4,5 +4,6 @@ | |||
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_timer_init(void); | ||
7 | 8 | ||
8 | #endif /* __ASM_R8A7790_H__ */ | 9 | #endif /* __ASM_R8A7790_H__ */ |
diff --git a/arch/arm/mach-shmobile/setup-r8a7790.c b/arch/arm/mach-shmobile/setup-r8a7790.c index cfccf6c1001b..49de2d56f86d 100644 --- a/arch/arm/mach-shmobile/setup-r8a7790.c +++ b/arch/arm/mach-shmobile/setup-r8a7790.c | |||
@@ -118,6 +118,18 @@ void __init r8a7790_add_standard_devices(void) | |||
118 | r8a7790_register_irqc(0); | 118 | r8a7790_register_irqc(0); |
119 | } | 119 | } |
120 | 120 | ||
121 | void __init r8a7790_timer_init(void) | ||
122 | { | ||
123 | void __iomem *cntcr; | ||
124 | |||
125 | /* make sure arch timer is started by setting bit 0 of CNTCT */ | ||
126 | cntcr = ioremap(0xe6080000, PAGE_SIZE); | ||
127 | iowrite32(1, cntcr); | ||
128 | iounmap(cntcr); | ||
129 | |||
130 | shmobile_timer_init(); | ||
131 | } | ||
132 | |||
121 | #ifdef CONFIG_USE_OF | 133 | #ifdef CONFIG_USE_OF |
122 | void __init r8a7790_add_standard_devices_dt(void) | 134 | void __init r8a7790_add_standard_devices_dt(void) |
123 | { | 135 | { |
@@ -132,7 +144,7 @@ static const char *r8a7790_boards_compat_dt[] __initdata = { | |||
132 | DT_MACHINE_START(R8A7790_DT, "Generic R8A7790 (Flattened Device Tree)") | 144 | DT_MACHINE_START(R8A7790_DT, "Generic R8A7790 (Flattened Device Tree)") |
133 | .init_irq = irqchip_init, | 145 | .init_irq = irqchip_init, |
134 | .init_machine = r8a7790_add_standard_devices_dt, | 146 | .init_machine = r8a7790_add_standard_devices_dt, |
135 | .init_time = shmobile_timer_init, | 147 | .init_time = r8a7790_timer_init, |
136 | .dt_compat = r8a7790_boards_compat_dt, | 148 | .dt_compat = r8a7790_boards_compat_dt, |
137 | MACHINE_END | 149 | MACHINE_END |
138 | #endif /* CONFIG_USE_OF */ | 150 | #endif /* CONFIG_USE_OF */ |