Skip to content

Commit d9dedff

Browse files
kartbendkalowsk
authored andcommitted
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>
1 parent 67b4055 commit d9dedff

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

drivers/gpio/gpio_rpi_pico.c

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -392,7 +392,8 @@ static void gpio_rpi_isr(const struct device *dev)
392392
uint32_t events;
393393
uint32_t pin;
394394

395-
irq_ctrl_base = &iobank0_hw->proc0_irq_ctrl;
395+
irq_ctrl_base = get_core_num() ? &io_bank0_hw->proc1_irq_ctrl
396+
: &io_bank0_hw->proc0_irq_ctrl;
396397
for (pin = 0; pin < NUM_BANK0_GPIOS; pin++) {
397398
status_reg = &irq_ctrl_base->ints[pin / 8];
398399
events = (*status_reg >> 4 * (pin % 8)) & ALL_EVENTS;

0 commit comments

Comments
 (0)