drivers: gpio: rpi_pico: route ISR to the right irq_ctrl

gpio_rpi_isr() always addressed io_bank0->proc0_irq_ctrl, so any
interrupts taken while code was running on core 1 were invisible and
left pending.
Use get_core_num() to pick proc1_irq_ctrl when the ISR executes on core
1, ensuring callbacks fire from both cores.
Also fix stray `iobank0_hw` symbol for the correct `io_bank0_hw`.

Signed-off-by: Benjamin Cabé <benjamin@zephyrproject.org>
This commit is contained in:
Benjamin Cabé 2025-06-09 22:14:50 +02:00 committed by Dan Kalowsky
commit d9dedff71a

View file

@ -392,7 +392,8 @@ static void gpio_rpi_isr(const struct device *dev)
uint32_t events;
uint32_t pin;
irq_ctrl_base = &iobank0_hw->proc0_irq_ctrl;
irq_ctrl_base = get_core_num() ? &io_bank0_hw->proc1_irq_ctrl
: &io_bank0_hw->proc0_irq_ctrl;
for (pin = 0; pin < NUM_BANK0_GPIOS; pin++) {
status_reg = &irq_ctrl_base->ints[pin / 8];
events = (*status_reg >> 4 * (pin % 8)) & ALL_EVENTS;