Skip to content

Commit 6b4f1c4

Browse files
juineegregkh
authored andcommitted
spi: spi-pxa2xx: Check status register to determine if SSSR_TINT is disabled
commit 02bc933 upstream. On Intel Baytrail, there is case when interrupt handler get called, no SPI message is captured. The RX FIFO is indeed empty when RX timeout pending interrupt (SSSR_TINT) happens. Use the BIOS version where both HSUART and SPI are on the same IRQ. Both drivers are using IRQF_SHARED when calling the request_irq function. When running two separate and independent SPI and HSUART application that generate data traffic on both components, user will see messages like below on the console: pxa2xx-spi pxa2xx-spi.0: bad message state in interrupt handler This commit will fix this by first checking Receiver Time-out Interrupt, if it is disabled, ignore the request and return without servicing. Signed-off-by: Tan, Jui Nee <[email protected]> Acked-by: Jarkko Nikula <[email protected]> Signed-off-by: Mark Brown <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>
1 parent 00b349a commit 6b4f1c4

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

drivers/spi/spi-pxa2xx.c

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -562,6 +562,10 @@ static irqreturn_t ssp_int(int irq, void *dev_id)
562562
if (!(sccr1_reg & SSCR1_TIE))
563563
mask &= ~SSSR_TFS;
564564

565+
/* Ignore RX timeout interrupt if it is disabled */
566+
if (!(sccr1_reg & SSCR1_TINTE))
567+
mask &= ~SSSR_TINT;
568+
565569
if (!(status & mask))
566570
return IRQ_NONE;
567571

0 commit comments

Comments
 (0)