diff options
author | Álvaro Fernández Rojas <noltari@gmail.com> | 2023-04-27 13:49:10 +0200 |
---|---|---|
committer | Álvaro Fernández Rojas <noltari@gmail.com> | 2023-04-27 15:39:09 +0200 |
commit | c3549b931902e02a76a5cdf31817c58a8c315f12 (patch) | |
tree | 24252c42d4fdb4d56b0ce3df27310d8277ebe610 /target/linux/bmips | |
parent | e9f5b773d29ef6d10f5e23e21edb1897a8d828e6 (diff) | |
download | openwrt-c3549b931902e02a76a5cdf31817c58a8c315f12.tar.gz openwrt-c3549b931902e02a76a5cdf31817c58a8c315f12.tar.bz2 openwrt-c3549b931902e02a76a5cdf31817c58a8c315f12.zip |
bmips: fix external interrupt controller
- irq_domain_add_simple() can't be used on bmips since interrupts aren't
hardcoded with specific offsets for internal and external as opposed to
bcm63xx. This is needed to avoid collisions with other interrupts.
- remove unused bcm63xx-specific code.
Signed-off-by: Álvaro Fernández Rojas <noltari@gmail.com>
Diffstat (limited to 'target/linux/bmips')
-rw-r--r-- | target/linux/bmips/patches-5.15/100-irqchip-add-support-for-bcm6345-style-external-inter.patch | 23 |
1 files changed, 2 insertions, 21 deletions
diff --git a/target/linux/bmips/patches-5.15/100-irqchip-add-support-for-bcm6345-style-external-inter.patch b/target/linux/bmips/patches-5.15/100-irqchip-add-support-for-bcm6345-style-external-inter.patch index ba55107bb1..d64426ea1d 100644 --- a/target/linux/bmips/patches-5.15/100-irqchip-add-support-for-bcm6345-style-external-inter.patch +++ b/target/linux/bmips/patches-5.15/100-irqchip-add-support-for-bcm6345-style-external-inter.patch @@ -73,7 +73,7 @@ Signed-off-by: Jonas Gorski <jogo@openwrt.org> obj-$(CONFIG_BCM7120_L2_IRQ) += irq-bcm7120-l2.o --- /dev/null +++ b/drivers/irqchip/irq-bcm6345-ext.c -@@ -0,0 +1,299 @@ +@@ -0,0 +1,280 @@ +/* + * This file is subject to the terms and conditions of the GNU General Public + * License. See the file "COPYING" in the main directory of this archive @@ -94,14 +94,6 @@ Signed-off-by: Jonas Gorski <jogo@openwrt.org> +#include <linux/slab.h> +#include <linux/spinlock.h> + -+#ifdef CONFIG_BCM63XX -+#include <asm/mach-bcm63xx/bcm63xx_irq.h> -+ -+#define VIRQ_BASE IRQ_EXTERNAL_BASE -+#else -+#define VIRQ_BASE 0 -+#endif -+ +#define MAX_IRQS 4 + +#define EXTIRQ_CFG_SENSE 0 @@ -271,7 +263,6 @@ Signed-off-by: Jonas Gorski <jogo@openwrt.org> +{ + struct intc_data *data; + unsigned int i; -+ int start = VIRQ_BASE; + + data = kzalloc(sizeof(*data), GFP_KERNEL); + if (!data) @@ -296,17 +287,7 @@ Signed-off-by: Jonas Gorski <jogo@openwrt.org> + data->chip.irq_unmask = bcm6345_ext_intc_irq_unmask; + data->chip.irq_set_type = bcm6345_ext_intc_set_type; + -+ /* -+ * If we have less than 4 irqs, this is the second controller on -+ * bcm63xx. So increase the VIRQ start to not overlap with the first -+ * one, but only do so if we actually use a non-zero start. -+ * -+ * This can be removed when bcm63xx has no legacy users anymore. -+ */ -+ if (start && num_irqs < 4) -+ start += 4; -+ -+ data->domain = irq_domain_add_simple(node, num_irqs, start, ++ data->domain = irq_domain_add_linear(node, num_irqs, + &bcm6345_ext_domain_ops, data); + if (!data->domain) { + kfree(data); |