hc
2023-12-11 d2ccde1c8e90d38cee87a1b0309ad2827f3fd30d
kernel/arch/arm/mach-cns3xxx/core.c
....@@ -1,11 +1,8 @@
1
+// SPDX-License-Identifier: GPL-2.0-only
12 /*
23 * Copyright 1999 - 2003 ARM Limited
34 * Copyright 2000 Deep Blue Solutions Ltd
45 * 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.
96 */
107
118 #include <linux/init.h>
....@@ -90,7 +87,7 @@
9087 /* used by entry-macro.S */
9188 void __init cns3xxx_init_irq(void)
9289 {
93
- gic_init(0, 29, IOMEM(CNS3XXX_TC11MP_GIC_DIST_BASE_VIRT),
90
+ gic_init(IOMEM(CNS3XXX_TC11MP_GIC_DIST_BASE_VIRT),
9491 IOMEM(CNS3XXX_TC11MP_GIC_CPU_BASE_VIRT));
9592 }
9693
....@@ -192,12 +189,6 @@
192189 return IRQ_HANDLED;
193190 }
194191
195
-static struct irqaction cns3xxx_timer_irq = {
196
- .name = "timer",
197
- .flags = IRQF_TIMER | IRQF_IRQPOLL,
198
- .handler = cns3xxx_timer_interrupt,
199
-};
200
-
201192 /*
202193 * Set up the clock source and clock events devices
203194 */
....@@ -248,7 +239,9 @@
248239 writel(val, cns3xxx_tmr1 + TIMER1_2_CONTROL_OFFSET);
249240
250241 /* 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);
252245
253246 cns3xxx_clockevents_init(timer_irq);
254247 }
....@@ -379,6 +372,7 @@
379372 /* De-Asscer SATA Reset */
380373 cns3xxx_pwr_soft_rst(CNS3XXX_PWR_SOFTWARE_RST(SATA));
381374 }
375
+ of_node_put(dn);
382376
383377 dn = of_find_compatible_node(NULL, NULL, "cavium,cns3420-sdhci");
384378 if (of_device_is_available(dn)) {
....@@ -392,6 +386,7 @@
392386 cns3xxx_pwr_clk_en(CNS3XXX_PWR_CLK_EN(SDIO));
393387 cns3xxx_pwr_soft_rst(CNS3XXX_PWR_SOFTWARE_RST(SDIO));
394388 }
389
+ of_node_put(dn);
395390
396391 pm_power_off = cns3xxx_power_off;
397392