openwrt/target/linux/bcm27xx/patches-6.1/961-2-pinctrl-rp1-Use-the-correct-per-bank-GPIO-base.patch
Álvaro Fernández Rojas 6512333518 bcm27xx: bcm2712: backport RP1 interrupt affinity
Support for setting the CPU affinity on RP1 has been added to RPi linux v6.6

Signed-off-by: Álvaro Fernández Rojas <noltari@gmail.com>
2024-04-07 22:12:42 +02:00

31 lines
1.0 KiB
Diff

From d11b1d7f7df4bd1a5ab4df35b2a5c8569f2eacbe Mon Sep 17 00:00:00 2001
From: Phil Elwell <phil@raspberrypi.com>
Date: Thu, 4 Apr 2024 10:47:46 +0100
Subject: [PATCH 2/5] pinctrl: rp1: Use the correct per-bank GPIO base
The GPIO start for each bank - min_gpio - must be used in the IRQ
handler.
Signed-off-by: Phil Elwell <phil@raspberrypi.com>
---
drivers/pinctrl/pinctrl-rp1.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
--- a/drivers/pinctrl/pinctrl-rp1.c
+++ b/drivers/pinctrl/pinctrl-rp1.c
@@ -781,12 +781,12 @@ static void rp1_gpio_irq_handler(struct
ints = readl(pc->gpio_base + bank->ints_offset);
for_each_set_bit(b, &ints, 32) {
- struct rp1_pin_info *pin = rp1_get_pin(chip, b);
+ struct rp1_pin_info *pin = rp1_get_pin(chip, bank->min_gpio + b);
writel(RP1_GPIO_CTRL_IRQRESET,
pin->gpio + RP1_SET_OFFSET + RP1_GPIO_CTRL);
generic_handle_irq(irq_linear_revmap(pc->gpio_chip.irq.domain,
- bank->gpio_offset + b));
+ bank->min_gpio + b));
}
chained_irq_exit(host_chip, desc);