diff options
author | Álvaro Fernández Rojas <noltari@gmail.com> | 2022-05-16 23:40:32 +0200 |
---|---|---|
committer | Álvaro Fernández Rojas <noltari@gmail.com> | 2022-05-17 15:11:22 +0200 |
commit | 20ea6adbf199097c4f5f591ffee088340630dae4 (patch) | |
tree | d6719d95e136611a1c25bbf7789652d6d402779d /target/linux/bcm27xx/patches-5.15/950-0102-irqchip-irq-bcm2835-Calc.-FIQ_START-at-boot-time.patch | |
parent | bca05bd072180dc38ef740b37ded9572a6db1981 (diff) | |
download | upstream-20ea6adbf199097c4f5f591ffee088340630dae4.tar.gz upstream-20ea6adbf199097c4f5f591ffee088340630dae4.tar.bz2 upstream-20ea6adbf199097c4f5f591ffee088340630dae4.zip |
bcm27xx: add support for linux v5.15
Build system: x86_64
Build-tested: bcm2708, bcm2709, bcm2710, bcm2711
Run-tested: bcm2708/RPiB+, bcm2709/RPi3B, bcm2710/RPi3B, bcm2711/RPi4B
Signed-off-by: Marty Jones <mj8263788@gmail.com>
Signed-off-by: Álvaro Fernández Rojas <noltari@gmail.com>
Diffstat (limited to 'target/linux/bcm27xx/patches-5.15/950-0102-irqchip-irq-bcm2835-Calc.-FIQ_START-at-boot-time.patch')
-rw-r--r-- | target/linux/bcm27xx/patches-5.15/950-0102-irqchip-irq-bcm2835-Calc.-FIQ_START-at-boot-time.patch | 66 |
1 files changed, 66 insertions, 0 deletions
diff --git a/target/linux/bcm27xx/patches-5.15/950-0102-irqchip-irq-bcm2835-Calc.-FIQ_START-at-boot-time.patch b/target/linux/bcm27xx/patches-5.15/950-0102-irqchip-irq-bcm2835-Calc.-FIQ_START-at-boot-time.patch new file mode 100644 index 0000000000..08de1275fb --- /dev/null +++ b/target/linux/bcm27xx/patches-5.15/950-0102-irqchip-irq-bcm2835-Calc.-FIQ_START-at-boot-time.patch @@ -0,0 +1,66 @@ +From a30171a210cdb8a79cf766d720e4e4b01bef5da6 Mon Sep 17 00:00:00 2001 +From: Phil Elwell <phil@raspberrypi.org> +Date: Thu, 14 Jun 2018 11:21:04 +0100 +Subject: [PATCH] irqchip: irq-bcm2835: Calc. FIQ_START at boot-time + +ad83c7cb2f37 ("irqchip/irq-bcm2836: Add support for DT interrupt polarity") +changed the way that the BCM2836/7 local interrupts are mapped; instead +of being pre-mapped they are now mapped on-demand. A side effect of this +change is that the call to irq_of_parse_and_map from armctrl_of_init +creates a new mapping, forming a gap between the IRQs and the FIQs. This + gap breaks the FIQ<->IRQ mapping which up to now has been done by assuming: + +1) that the value of FIQ_START is the same as the number of normal IRQs +that will be mapped (still true), and + +2) that this value is also the offset between an IRQ and its equivalent +FIQ (which is no longer the case). + +Remove both assumptions by measuring the interval between the last IRQ +and the last FIQ, passing it as the parameter to init_FIQ(). + +Fixes: https://github.com/raspberrypi/linux/issues/2432 + +Signed-off-by: Phil Elwell <phil@raspberrypi.org> +--- + drivers/irqchip/irq-bcm2835.c | 8 ++++---- + 1 file changed, 4 insertions(+), 4 deletions(-) + +--- a/drivers/irqchip/irq-bcm2835.c ++++ b/drivers/irqchip/irq-bcm2835.c +@@ -74,8 +74,6 @@ + #define NR_BANKS 3 + #define IRQS_PER_BANK 32 + #define NUMBER_IRQS MAKE_HWIRQ(NR_BANKS, 0) +-#undef FIQ_START +-#define FIQ_START (NR_IRQS_BANK0 + MAKE_HWIRQ(NR_BANKS - 1, 0)) + + static const int reg_pending[] __initconst = { 0x00, 0x04, 0x08 }; + static const int reg_enable[] __initconst = { 0x18, 0x10, 0x14 }; +@@ -203,7 +201,7 @@ static int __init armctrl_of_init(struct + bool is_2836) + { + void __iomem *base; +- int irq, b, i; ++ int irq = 0, last_irq, b, i; + u32 reg; + + base = of_iomap(node, 0); +@@ -243,6 +241,8 @@ static int __init armctrl_of_init(struct + pr_err(FW_BUG "Bootloader left fiq enabled\n"); + } + ++ last_irq = irq; ++ + if (is_2836) { + int parent_irq = irq_of_parse_and_map(node, 0); + +@@ -273,7 +273,7 @@ static int __init armctrl_of_init(struct + } + } + #ifndef CONFIG_ARM64 +- init_FIQ(FIQ_START); ++ init_FIQ(irq - last_irq); + #endif + + return 0; |