.. | .. |
---|
| 1 | +// SPDX-License-Identifier: GPL-2.0-only |
---|
1 | 2 | /* |
---|
2 | 3 | * Copyright 1999 - 2003 ARM Limited |
---|
3 | 4 | * Copyright 2000 Deep Blue Solutions Ltd |
---|
4 | 5 | * Copyright 2008 Cavium Networks |
---|
5 | | - * |
---|
6 | | - * This file is free software; you can redistribute it and/or modify |
---|
7 | | - * it under the terms of the GNU General Public License, Version 2, as |
---|
8 | | - * published by the Free Software Foundation. |
---|
9 | 6 | */ |
---|
10 | 7 | |
---|
11 | 8 | #include <linux/init.h> |
---|
.. | .. |
---|
90 | 87 | /* used by entry-macro.S */ |
---|
91 | 88 | void __init cns3xxx_init_irq(void) |
---|
92 | 89 | { |
---|
93 | | - gic_init(0, 29, IOMEM(CNS3XXX_TC11MP_GIC_DIST_BASE_VIRT), |
---|
| 90 | + gic_init(IOMEM(CNS3XXX_TC11MP_GIC_DIST_BASE_VIRT), |
---|
94 | 91 | IOMEM(CNS3XXX_TC11MP_GIC_CPU_BASE_VIRT)); |
---|
95 | 92 | } |
---|
96 | 93 | |
---|
.. | .. |
---|
192 | 189 | return IRQ_HANDLED; |
---|
193 | 190 | } |
---|
194 | 191 | |
---|
195 | | -static struct irqaction cns3xxx_timer_irq = { |
---|
196 | | - .name = "timer", |
---|
197 | | - .flags = IRQF_TIMER | IRQF_IRQPOLL, |
---|
198 | | - .handler = cns3xxx_timer_interrupt, |
---|
199 | | -}; |
---|
200 | | - |
---|
201 | 192 | /* |
---|
202 | 193 | * Set up the clock source and clock events devices |
---|
203 | 194 | */ |
---|
.. | .. |
---|
248 | 239 | writel(val, cns3xxx_tmr1 + TIMER1_2_CONTROL_OFFSET); |
---|
249 | 240 | |
---|
250 | 241 | /* Make irqs happen for the system timer */ |
---|
251 | | - setup_irq(timer_irq, &cns3xxx_timer_irq); |
---|
| 242 | + if (request_irq(timer_irq, cns3xxx_timer_interrupt, |
---|
| 243 | + IRQF_TIMER | IRQF_IRQPOLL, "timer", NULL)) |
---|
| 244 | + pr_err("Failed to request irq %d (timer)\n", timer_irq); |
---|
252 | 245 | |
---|
253 | 246 | cns3xxx_clockevents_init(timer_irq); |
---|
254 | 247 | } |
---|
.. | .. |
---|
379 | 372 | /* De-Asscer SATA Reset */ |
---|
380 | 373 | cns3xxx_pwr_soft_rst(CNS3XXX_PWR_SOFTWARE_RST(SATA)); |
---|
381 | 374 | } |
---|
| 375 | + of_node_put(dn); |
---|
382 | 376 | |
---|
383 | 377 | dn = of_find_compatible_node(NULL, NULL, "cavium,cns3420-sdhci"); |
---|
384 | 378 | if (of_device_is_available(dn)) { |
---|
.. | .. |
---|
392 | 386 | cns3xxx_pwr_clk_en(CNS3XXX_PWR_CLK_EN(SDIO)); |
---|
393 | 387 | cns3xxx_pwr_soft_rst(CNS3XXX_PWR_SOFTWARE_RST(SDIO)); |
---|
394 | 388 | } |
---|
| 389 | + of_node_put(dn); |
---|
395 | 390 | |
---|
396 | 391 | pm_power_off = cns3xxx_power_off; |
---|
397 | 392 | |
---|