summaryrefslogtreecommitdiff
path: root/arch/arm/mach-shmobile/board-bonito.c
diff options
context:
space:
mode:
authorMagnus Damm <damm@opensource.se>2012-03-06 08:36:53 (GMT)
committerRafael J. Wysocki <rjw@sisk.pl>2012-03-12 21:19:45 (GMT)
commit23e5bc03e3b07185d61c212bf39aaf126cc958e3 (patch)
treefb0e0b2e73320240863a2661ab7d182711918496 /arch/arm/mach-shmobile/board-bonito.c
parent3be26fdba82a2ae8ed568ab5d4a0a2e252f18b13 (diff)
downloadlinux-fsl-qoriq-23e5bc03e3b07185d61c212bf39aaf126cc958e3.tar.xz
ARM: mach-shmobile: r8a7740 and Bonito timer rework
Copy the SoC specific timer code from Bonito board code to r8a7740 setup code. This makes is possible to share the SoC specific timer code across boards. The Bonito specific timer setup code tied to the FPGA is kept as-is. Signed-off-by: Magnus Damm <damm@opensource.se> Signed-off-by: Rafael J. Wysocki <rjw@sisk.pl>
Diffstat (limited to 'arch/arm/mach-shmobile/board-bonito.c')
-rw-r--r--arch/arm/mach-shmobile/board-bonito.c18
1 files changed, 11 insertions, 7 deletions
diff --git a/arch/arm/mach-shmobile/board-bonito.c b/arch/arm/mach-shmobile/board-bonito.c
index e39fa08..d062bec 100644
--- a/arch/arm/mach-shmobile/board-bonito.c
+++ b/arch/arm/mach-shmobile/board-bonito.c
@@ -466,7 +466,7 @@ static void __init bonito_init(void)
}
}
-static void __init bonito_timer_init(void)
+static void __init bonito_earlytimer_init(void)
{
u16 val;
u8 md_ck = 0;
@@ -481,18 +481,22 @@ static void __init bonito_timer_init(void)
md_ck |= MD_CK0;
r8a7740_clock_init(md_ck);
- shmobile_timer.init();
+ shmobile_earlytimer_init();
}
-struct sys_timer bonito_timer = {
- .init = bonito_timer_init,
-};
+void __init bonito_add_early_devices(void)
+{
+ r8a7740_add_early_devices();
+
+ /* override timer setup with board-specific code */
+ shmobile_timer.init = bonito_earlytimer_init;
+}
MACHINE_START(BONITO, "bonito")
.map_io = bonito_map_io,
- .init_early = r8a7740_add_early_devices,
+ .init_early = bonito_add_early_devices,
.init_irq = r8a7740_init_irq,
.handle_irq = shmobile_handle_irq_intc,
.init_machine = bonito_init,
- .timer = &bonito_timer,
+ .timer = &shmobile_timer,
MACHINE_END