aboutsummaryrefslogtreecommitdiffstats
path: root/arch/arm/common/timer-sp.c
diff options
context:
space:
mode:
authorOlof Johansson <olof@lixom.net>2014-03-09 01:53:27 -0500
committerOlof Johansson <olof@lixom.net>2014-03-09 01:53:27 -0500
commitba0e1fa928e6e7a47d54008b1a701b02a858d0e4 (patch)
tree1678c0ca4697b7e698a0a162481eca28272758a1 /arch/arm/common/timer-sp.c
parentcfbf8d4857c26a8a307fb7cd258074c9dcd8c691 (diff)
parent29525484cd2524a31ee0924831ab43b46ea6ebe1 (diff)
Merge branch 'integrator/multiplatform-base' into next/cleanup2
* integrator/multiplatform-base: ARM: integrator: select GPIO block ARM: integrator: register the IM-PD1 VIC ARM: integrator: use managed resources for the IM-PD1 irqchip: support cascaded VICs irqchip: vic: update the base IRQ member correctly clk: versatile: respect parent rate in ICST clock clk: versatile: pass a parent to the ICST clock ARM: integrator: switch to fetch clocks from device tree ARM: SP804: make Integrator/CP timer pick clock from DT ARM: integrator: define clocks in the device trees
Diffstat (limited to 'arch/arm/common/timer-sp.c')
-rw-r--r--arch/arm/common/timer-sp.c8
1 files changed, 6 insertions, 2 deletions
diff --git a/arch/arm/common/timer-sp.c b/arch/arm/common/timer-sp.c
index 53c6a26b633d..fd6bff0c5b96 100644
--- a/arch/arm/common/timer-sp.c
+++ b/arch/arm/common/timer-sp.c
@@ -271,10 +271,14 @@ static void __init integrator_cp_of_init(struct device_node *np)
271 void __iomem *base; 271 void __iomem *base;
272 int irq; 272 int irq;
273 const char *name = of_get_property(np, "compatible", NULL); 273 const char *name = of_get_property(np, "compatible", NULL);
274 struct clk *clk;
274 275
275 base = of_iomap(np, 0); 276 base = of_iomap(np, 0);
276 if (WARN_ON(!base)) 277 if (WARN_ON(!base))
277 return; 278 return;
279 clk = of_clk_get(np, 0);
280 if (WARN_ON(IS_ERR(clk)))
281 return;
278 282
279 /* Ensure timer is disabled */ 283 /* Ensure timer is disabled */
280 writel(0, base + TIMER_CTRL); 284 writel(0, base + TIMER_CTRL);
@@ -283,13 +287,13 @@ static void __init integrator_cp_of_init(struct device_node *np)
283 goto err; 287 goto err;
284 288
285 if (!init_count) 289 if (!init_count)
286 sp804_clocksource_init(base, name); 290 __sp804_clocksource_and_sched_clock_init(base, name, clk, 0);
287 else { 291 else {
288 irq = irq_of_parse_and_map(np, 0); 292 irq = irq_of_parse_and_map(np, 0);
289 if (irq <= 0) 293 if (irq <= 0)
290 goto err; 294 goto err;
291 295
292 sp804_clockevents_init(base, irq, name); 296 __sp804_clockevents_init(base, irq, clk, name);
293 } 297 }
294 298
295 init_count++; 299 init_count++;