forked from ~ljy/RK356X_SDK_RELEASE

hc
2023-12-09 95099d4622f8cb224d94e314c7a8e0df60b13f87
kernel/drivers/irqchip/irq-brcmstb-l2.c
....@@ -1,16 +1,8 @@
1
+// SPDX-License-Identifier: GPL-2.0-only
12 /*
23 * Generic Broadcom Set Top Box Level 2 Interrupt controller driver
34 *
45 * Copyright (C) 2014-2017 Broadcom
5
- *
6
- * This program 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
- *
10
- * This program is distributed in the hope that it will be useful,
11
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
12
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13
- * GNU General Public License for more details.
146 */
157
168 #define pr_fmt(fmt) KBUILD_MODNAME ": " fmt
....@@ -262,7 +254,10 @@
262254 */
263255 data->gc->wake_enabled = 0xffffffff;
264256 ct->chip.irq_set_wake = irq_gc_set_wake;
257
+ enable_irq_wake(parent_irq);
265258 }
259
+
260
+ pr_info("registered L2 intc (%pOF, parent irq: %d)\n", np, parent_irq);
266261
267262 return 0;
268263
....@@ -275,14 +270,18 @@
275270 return ret;
276271 }
277272
278
-int __init brcmstb_l2_edge_intc_of_init(struct device_node *np,
273
+static int __init brcmstb_l2_edge_intc_of_init(struct device_node *np,
279274 struct device_node *parent)
280275 {
281276 return brcmstb_l2_intc_of_init(np, parent, &l2_edge_intc_init);
282277 }
283278 IRQCHIP_DECLARE(brcmstb_l2_intc, "brcm,l2-intc", brcmstb_l2_edge_intc_of_init);
279
+IRQCHIP_DECLARE(brcmstb_hif_spi_l2_intc, "brcm,hif-spi-l2-intc",
280
+ brcmstb_l2_edge_intc_of_init);
281
+IRQCHIP_DECLARE(brcmstb_upg_aux_aon_l2_intc, "brcm,upg-aux-aon-l2-intc",
282
+ brcmstb_l2_edge_intc_of_init);
284283
285
-int __init brcmstb_l2_lvl_intc_of_init(struct device_node *np,
284
+static int __init brcmstb_l2_lvl_intc_of_init(struct device_node *np,
286285 struct device_node *parent)
287286 {
288287 return brcmstb_l2_intc_of_init(np, parent, &l2_lvl_intc_init);