Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

spi: pxa2xx: Prepare for edge-triggered interrupts

When using the a device with edge-triggered interrupts, such as MSIs,
the interrupt handler has to ensure that there is a point in time during
its execution where all interrupts sources are silent so that a new
event can trigger a new interrupt again.

This is achieved here by disabling all interrupt sources for a moment
before processing them according to the status register. If a new
interrupt should have arrived after we read the status, it will now
re-trigger the interrupt, even in edge mode.

Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com>
Acked-by: Robert Jarzmik <robert.jarzmik@free.fr>
Signed-off-by: Mark Brown <broonie@kernel.org>

authored by

Jan Kiszka and committed by
Mark Brown
e51e9b93 b0312482

+3
+3
drivers/spi/spi-pxa2xx.c
··· 785 785 if (!(status & mask)) 786 786 return IRQ_NONE; 787 787 788 + pxa2xx_spi_write(drv_data, SSCR1, sccr1_reg & ~drv_data->int_cr1); 789 + pxa2xx_spi_write(drv_data, SSCR1, sccr1_reg); 790 + 788 791 if (!drv_data->master->cur_msg) { 789 792 handle_bad_msg(drv_data); 790 793 /* Never fail */