aboutsummaryrefslogtreecommitdiffstats
path: root/arch/arm/mach-integrator/integrator_cp.c
diff options
context:
space:
mode:
Diffstat (limited to 'arch/arm/mach-integrator/integrator_cp.c')
-rw-r--r--arch/arm/mach-integrator/integrator_cp.c41
1 files changed, 2 insertions, 39 deletions
diff --git a/arch/arm/mach-integrator/integrator_cp.c b/arch/arm/mach-integrator/integrator_cp.c
index 2b0db82a5381..8c60fcb08a98 100644
--- a/arch/arm/mach-integrator/integrator_cp.c
+++ b/arch/arm/mach-integrator/integrator_cp.c
@@ -250,39 +250,6 @@ static void __init intcp_init_early(void)
250} 250}
251 251
252#ifdef CONFIG_OF 252#ifdef CONFIG_OF
253
254static void __init cp_of_timer_init(void)
255{
256 struct device_node *node;
257 const char *path;
258 void __iomem *base;
259 int err;
260 int irq;
261
262 err = of_property_read_string(of_aliases,
263 "arm,timer-primary", &path);
264 if (WARN_ON(err))
265 return;
266 node = of_find_node_by_path(path);
267 base = of_iomap(node, 0);
268 if (WARN_ON(!base))
269 return;
270 writel(0, base + TIMER_CTRL);
271 sp804_clocksource_init(base, node->name);
272
273 err = of_property_read_string(of_aliases,
274 "arm,timer-secondary", &path);
275 if (WARN_ON(err))
276 return;
277 node = of_find_node_by_path(path);
278 base = of_iomap(node, 0);
279 if (WARN_ON(!base))
280 return;
281 irq = irq_of_parse_and_map(node, 0);
282 writel(0, base + TIMER_CTRL);
283 sp804_clockevents_init(base, irq, node->name);
284}
285
286static const struct of_device_id fpga_irq_of_match[] __initconst = { 253static const struct of_device_id fpga_irq_of_match[] __initconst = {
287 { .compatible = "arm,versatile-fpga-irq", .data = fpga_irq_of_init, }, 254 { .compatible = "arm,versatile-fpga-irq", .data = fpga_irq_of_init, },
288 { /* Sentinel */ } 255 { /* Sentinel */ }
@@ -360,17 +327,14 @@ static void __init intcp_init_of(void)
360 'A' + (intcp_sc_id & 0x0f)); 327 'A' + (intcp_sc_id & 0x0f));
361 328
362 soc_dev = soc_device_register(soc_dev_attr); 329 soc_dev = soc_device_register(soc_dev_attr);
363 if (IS_ERR_OR_NULL(soc_dev)) { 330 if (IS_ERR(soc_dev)) {
364 kfree(soc_dev_attr->revision); 331 kfree(soc_dev_attr->revision);
365 kfree(soc_dev_attr); 332 kfree(soc_dev_attr);
366 return; 333 return;
367 } 334 }
368 335
369 parent = soc_device_to_device(soc_dev); 336 parent = soc_device_to_device(soc_dev);
370 337 integrator_init_sysfs(parent, intcp_sc_id);
371 if (!IS_ERR_OR_NULL(parent))
372 integrator_init_sysfs(parent, intcp_sc_id);
373
374 of_platform_populate(root, of_default_bus_match_table, 338 of_platform_populate(root, of_default_bus_match_table,
375 intcp_auxdata_lookup, parent); 339 intcp_auxdata_lookup, parent);
376} 340}
@@ -386,7 +350,6 @@ DT_MACHINE_START(INTEGRATOR_CP_DT, "ARM Integrator/CP (Device Tree)")
386 .init_early = intcp_init_early, 350 .init_early = intcp_init_early,
387 .init_irq = intcp_init_irq_of, 351 .init_irq = intcp_init_irq_of,
388 .handle_irq = fpga_handle_irq, 352 .handle_irq = fpga_handle_irq,
389 .init_time = cp_of_timer_init,
390 .init_machine = intcp_init_of, 353 .init_machine = intcp_init_of,
391 .restart = integrator_restart, 354 .restart = integrator_restart,
392 .dt_compat = intcp_dt_board_compat, 355 .dt_compat = intcp_dt_board_compat,