Commit df27a2d8 authored by Magnus Damm's avatar Magnus Damm Committed by Rafael J. Wysocki

ARM: mach-shmobile: r8a7779 and Marzen timer rework

Move the SoC specific timer code from Marzen board code
to r8a7779 setup code. This makes is possible to share
the SoC specific timer code across boards and it also
removes the need for a board specific timer structure.
Signed-off-by: default avatarMagnus Damm <damm@opensource.se>
Signed-off-by: default avatarRafael J. Wysocki <rjw@sisk.pl>
parent 23e5bc03
...@@ -33,7 +33,6 @@ ...@@ -33,7 +33,6 @@
#include <mach/common.h> #include <mach/common.h>
#include <asm/mach-types.h> #include <asm/mach-types.h>
#include <asm/mach/arch.h> #include <asm/mach/arch.h>
#include <asm/mach/time.h>
#include <asm/hardware/gic.h> #include <asm/hardware/gic.h>
#include <asm/traps.h> #include <asm/traps.h>
...@@ -91,17 +90,6 @@ static void __init marzen_init(void) ...@@ -91,17 +90,6 @@ static void __init marzen_init(void)
platform_add_devices(marzen_devices, ARRAY_SIZE(marzen_devices)); platform_add_devices(marzen_devices, ARRAY_SIZE(marzen_devices));
} }
static void __init marzen_timer_init(void)
{
r8a7779_clock_init();
shmobile_timer.init();
return;
}
struct sys_timer marzen_timer = {
.init = marzen_timer_init,
};
MACHINE_START(MARZEN, "marzen") MACHINE_START(MARZEN, "marzen")
.map_io = r8a7779_map_io, .map_io = r8a7779_map_io,
.init_early = r8a7779_add_early_devices, .init_early = r8a7779_add_early_devices,
...@@ -109,5 +97,5 @@ MACHINE_START(MARZEN, "marzen") ...@@ -109,5 +97,5 @@ MACHINE_START(MARZEN, "marzen")
.init_irq = r8a7779_init_irq, .init_irq = r8a7779_init_irq,
.handle_irq = gic_handle_irq, .handle_irq = gic_handle_irq,
.init_machine = marzen_init, .init_machine = marzen_init,
.timer = &marzen_timer, .timer = &shmobile_timer,
MACHINE_END MACHINE_END
...@@ -33,6 +33,7 @@ ...@@ -33,6 +33,7 @@
#include <mach/common.h> #include <mach/common.h>
#include <asm/mach-types.h> #include <asm/mach-types.h>
#include <asm/mach/arch.h> #include <asm/mach/arch.h>
#include <asm/mach/time.h>
#include <asm/mach/map.h> #include <asm/mach/map.h>
#include <asm/hardware/cache-l2x0.h> #include <asm/hardware/cache-l2x0.h>
...@@ -260,6 +261,12 @@ void __init r8a7779_add_standard_devices(void) ...@@ -260,6 +261,12 @@ void __init r8a7779_add_standard_devices(void)
ARRAY_SIZE(r8a7779_late_devices)); ARRAY_SIZE(r8a7779_late_devices));
} }
static void __init r8a7779_earlytimer_init(void)
{
r8a7779_clock_init();
shmobile_earlytimer_init();
}
void __init r8a7779_add_early_devices(void) void __init r8a7779_add_early_devices(void)
{ {
early_platform_add_devices(r8a7779_early_devices, early_platform_add_devices(r8a7779_early_devices,
...@@ -280,4 +287,7 @@ void __init r8a7779_add_early_devices(void) ...@@ -280,4 +287,7 @@ void __init r8a7779_add_early_devices(void)
* As a final step pass earlyprint=sh-sci.2,115200 on the kernel * As a final step pass earlyprint=sh-sci.2,115200 on the kernel
* command line in case of the marzen board. * command line in case of the marzen board.
*/ */
/* override timer setup with soc-specific code */
shmobile_timer.init = r8a7779_earlytimer_init;
} }
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