|
@@ -271,10 +271,14 @@ static void __init integrator_cp_of_init(struct device_node *np)
|
|
void __iomem *base;
|
|
void __iomem *base;
|
|
int irq;
|
|
int irq;
|
|
const char *name = of_get_property(np, "compatible", NULL);
|
|
const char *name = of_get_property(np, "compatible", NULL);
|
|
|
|
+ struct clk *clk;
|
|
|
|
|
|
base = of_iomap(np, 0);
|
|
base = of_iomap(np, 0);
|
|
if (WARN_ON(!base))
|
|
if (WARN_ON(!base))
|
|
return;
|
|
return;
|
|
|
|
+ clk = of_clk_get(np, 0);
|
|
|
|
+ if (WARN_ON(IS_ERR(clk)))
|
|
|
|
+ return;
|
|
|
|
|
|
/* Ensure timer is disabled */
|
|
/* Ensure timer is disabled */
|
|
writel(0, base + TIMER_CTRL);
|
|
writel(0, base + TIMER_CTRL);
|
|
@@ -283,13 +287,13 @@ static void __init integrator_cp_of_init(struct device_node *np)
|
|
goto err;
|
|
goto err;
|
|
|
|
|
|
if (!init_count)
|
|
if (!init_count)
|
|
- sp804_clocksource_init(base, name);
|
|
|
|
|
|
+ __sp804_clocksource_and_sched_clock_init(base, name, clk, 0);
|
|
else {
|
|
else {
|
|
irq = irq_of_parse_and_map(np, 0);
|
|
irq = irq_of_parse_and_map(np, 0);
|
|
if (irq <= 0)
|
|
if (irq <= 0)
|
|
goto err;
|
|
goto err;
|
|
|
|
|
|
- sp804_clockevents_init(base, irq, name);
|
|
|
|
|
|
+ __sp804_clockevents_init(base, irq, clk, name);
|
|
}
|
|
}
|
|
|
|
|
|
init_count++;
|
|
init_count++;
|