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:
parent
67b4055d57
commit
d9dedff71a
1 changed files with 2 additions and 1 deletions
|
@ -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;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue