ARM: delete struct sys_timer
Now that the only field in struct sys_timer is .init, delete the struct, and replace the machine descriptor .timer field with the initialization function itself. This will enable moving timer drivers into drivers/clocksource without having to place a public prototype of each struct sys_timer object into include/linux; the intent is to create a single of_clocksource_init() function that determines which timer driver to initialize by scanning the device dtree, much like the proposed irqchip_init() at: http://www.spinics.net/lists/arm-kernel/msg203686.html Includes mach-omap2 fixes from Igor Grinberg. Tested-by: Robert Jarzmik <robert.jarzmik@free.fr> Signed-off-by: Stephen Warren <swarren@nvidia.com>
This commit is contained in:
@@ -425,7 +425,7 @@ void __init ap_init_early(void)
|
||||
|
||||
#ifdef CONFIG_OF
|
||||
|
||||
static void __init ap_init_timer_of(void)
|
||||
static void __init ap_of_timer_init(void)
|
||||
{
|
||||
struct device_node *node;
|
||||
const char *path;
|
||||
@@ -464,10 +464,6 @@ static void __init ap_init_timer_of(void)
|
||||
integrator_clockevent_init(rate, base, irq);
|
||||
}
|
||||
|
||||
static struct sys_timer ap_of_timer = {
|
||||
.init = ap_init_timer_of,
|
||||
};
|
||||
|
||||
static const struct of_device_id fpga_irq_of_match[] __initconst = {
|
||||
{ .compatible = "arm,versatile-fpga-irq", .data = fpga_irq_of_init, },
|
||||
{ /* Sentinel */ }
|
||||
@@ -586,7 +582,7 @@ DT_MACHINE_START(INTEGRATOR_AP_DT, "ARM Integrator/AP (Device Tree)")
|
||||
.init_early = ap_init_early,
|
||||
.init_irq = ap_init_irq_of,
|
||||
.handle_irq = fpga_handle_irq,
|
||||
.timer = &ap_of_timer,
|
||||
.init_time = ap_of_timer_init,
|
||||
.init_machine = ap_init_of,
|
||||
.restart = integrator_restart,
|
||||
.dt_compat = ap_dt_board_compat,
|
||||
@@ -638,7 +634,7 @@ static struct platform_device cfi_flash_device = {
|
||||
.resource = &cfi_flash_resource,
|
||||
};
|
||||
|
||||
static void __init ap_init_timer(void)
|
||||
static void __init ap_timer_init(void)
|
||||
{
|
||||
struct clk *clk;
|
||||
unsigned long rate;
|
||||
@@ -657,10 +653,6 @@ static void __init ap_init_timer(void)
|
||||
IRQ_TIMERINT1);
|
||||
}
|
||||
|
||||
static struct sys_timer ap_timer = {
|
||||
.init = ap_init_timer,
|
||||
};
|
||||
|
||||
#define INTEGRATOR_SC_VALID_INT 0x003fffff
|
||||
|
||||
static void __init ap_init_irq(void)
|
||||
@@ -716,7 +708,7 @@ MACHINE_START(INTEGRATOR, "ARM-Integrator")
|
||||
.init_early = ap_init_early,
|
||||
.init_irq = ap_init_irq,
|
||||
.handle_irq = fpga_handle_irq,
|
||||
.timer = &ap_timer,
|
||||
.init_time = ap_timer_init,
|
||||
.init_machine = ap_init,
|
||||
.restart = integrator_restart,
|
||||
MACHINE_END
|
||||
|
@@ -251,7 +251,7 @@ static void __init intcp_init_early(void)
|
||||
|
||||
#ifdef CONFIG_OF
|
||||
|
||||
static void __init intcp_timer_init_of(void)
|
||||
static void __init cp_of_timer_init(void)
|
||||
{
|
||||
struct device_node *node;
|
||||
const char *path;
|
||||
@@ -283,10 +283,6 @@ static void __init intcp_timer_init_of(void)
|
||||
sp804_clockevents_init(base, irq, node->name);
|
||||
}
|
||||
|
||||
static struct sys_timer cp_of_timer = {
|
||||
.init = intcp_timer_init_of,
|
||||
};
|
||||
|
||||
static const struct of_device_id fpga_irq_of_match[] __initconst = {
|
||||
{ .compatible = "arm,versatile-fpga-irq", .data = fpga_irq_of_init, },
|
||||
{ /* Sentinel */ }
|
||||
@@ -390,7 +386,7 @@ DT_MACHINE_START(INTEGRATOR_CP_DT, "ARM Integrator/CP (Device Tree)")
|
||||
.init_early = intcp_init_early,
|
||||
.init_irq = intcp_init_irq_of,
|
||||
.handle_irq = fpga_handle_irq,
|
||||
.timer = &cp_of_timer,
|
||||
.init_time = cp_of_timer_init,
|
||||
.init_machine = intcp_init_of,
|
||||
.restart = integrator_restart,
|
||||
.dt_compat = intcp_dt_board_compat,
|
||||
@@ -512,7 +508,7 @@ static void __init intcp_init_irq(void)
|
||||
#define TIMER1_VA_BASE __io_address(INTEGRATOR_TIMER1_BASE)
|
||||
#define TIMER2_VA_BASE __io_address(INTEGRATOR_TIMER2_BASE)
|
||||
|
||||
static void __init intcp_timer_init(void)
|
||||
static void __init cp_timer_init(void)
|
||||
{
|
||||
writel(0, TIMER0_VA_BASE + TIMER_CTRL);
|
||||
writel(0, TIMER1_VA_BASE + TIMER_CTRL);
|
||||
@@ -522,10 +518,6 @@ static void __init intcp_timer_init(void)
|
||||
sp804_clockevents_init(TIMER1_VA_BASE, IRQ_TIMERINT1, "timer1");
|
||||
}
|
||||
|
||||
static struct sys_timer cp_timer = {
|
||||
.init = intcp_timer_init,
|
||||
};
|
||||
|
||||
#define INTEGRATOR_CP_MMC_IRQS { IRQ_CP_MMCIINT0, IRQ_CP_MMCIINT1 }
|
||||
#define INTEGRATOR_CP_AACI_IRQS { IRQ_CP_AACIINT }
|
||||
|
||||
@@ -565,7 +557,7 @@ MACHINE_START(CINTEGRATOR, "ARM-IntegratorCP")
|
||||
.init_early = intcp_init_early,
|
||||
.init_irq = intcp_init_irq,
|
||||
.handle_irq = fpga_handle_irq,
|
||||
.timer = &cp_timer,
|
||||
.init_time = cp_timer_init,
|
||||
.init_machine = intcp_init,
|
||||
.restart = integrator_restart,
|
||||
MACHINE_END
|
||||
|
Reference in New Issue
Block a user