@@ -84,16 +84,11 @@ static void picoxcell_wdt_restart(char mode, const char *cmd)
}
}
-static void __init timer_init(void)
-{
- dw_apb_timer_init(1);
-}
-
DT_MACHINE_START(PICOXCELL, "Picochip picoXcell")
.map_io = picoxcell_map_io,
.nr_irqs = NR_IRQS_LEGACY,
.init_irq = irqchip_init,
- .init_time = timer_init,
+ .init_time = dw_apb_timer_init,
.init_machine = picoxcell_init_machine,
.dt_compat = picoxcell_dt_match,
.restart = picoxcell_wdt_restart,
@@ -12,6 +12,4 @@
#include <asm/mach/time.h>
-extern void dw_apb_timer_init(void);
-
#endif /* __PICOXCELL_COMMON_H__ */
@@ -110,17 +110,11 @@ static const char *altera_dt_match[] = {
NULL
};
-static void __init timer_init(void)
-{
- dw_apb_timer_init(1);
-}
-
-
DT_MACHINE_START(SOCFPGA, "Altera SOCFPGA")
.smp = smp_ops(socfpga_smp_ops),
.map_io = socfpga_map_io,
.init_irq = socfpga_init_irq,
- .init_time = timer_init,
+ .init_time = dw_apb_timer_init,
.init_machine = socfpga_cyclone5_init,
.restart = socfpga_cyclone5_restart,
.dt_compat = altera_dt_match,
@@ -66,7 +66,7 @@ static u32 read_sched_clock_sptimer(void)
return ~__raw_readl(sched_io_base + APBTMR_N_CURRENT_VALUE);
}
-static void add_clocksource(struct device_node *source_timer, int use_as_scheduler)
+static void add_clocksource(struct device_node *source_timer)
{
void __iomem *iobase;
struct dw_apb_clocksource *cs;
@@ -81,10 +81,8 @@ static void add_clocksource(struct device_node *source_timer, int use_as_schedul
dw_apb_clocksource_start(cs);
dw_apb_clocksource_register(cs);
- if (use_as_scheduler) {
- sched_io_base = iobase;
- setup_sched_clock(read_sched_clock_sptimer, 32, rate);
- }
+ sched_io_base = iobase;
+ setup_sched_clock(read_sched_clock_sptimer, 32, rate);
}
static const struct of_device_id osctimer_ids[] __initconst = {
@@ -104,7 +102,7 @@ static const struct of_device_id osctimer_ids[] __initconst = {
*/
-void __init dw_apb_timer_init(int use_as_scheduler)
+void __init dw_apb_timer_init(void)
{
struct device_node *event_timer, *source_timer;
@@ -116,7 +114,7 @@ void __init dw_apb_timer_init(int use_as_scheduler)
source_timer = of_find_matching_node(event_timer, osctimer_ids);
if (!source_timer)
panic("No timer for clocksource");
- add_clocksource(source_timer, use_as_scheduler);
+ add_clocksource(source_timer);
of_node_put(event_timer);
of_node_put(source_timer);
@@ -59,5 +59,5 @@ void dw_apb_clocksource_start(struct dw_apb_clocksource *dw_cs);
cycle_t dw_apb_clocksource_read(struct dw_apb_clocksource *dw_cs);
void dw_apb_clocksource_unregister(struct dw_apb_clocksource *dw_cs);
-extern void dw_apb_timer_init(int);
+extern void dw_apb_timer_init(void);
#endif /* __DW_APB_TIMER_H__ */