spi: spi-pxa2xx: Check status register to determine if SSSR_TINT is disabled
PATCH 1/1 spi: spi-pxa2xx: Check status register to determine if SSSR_TINT is disabled
From: "Tan, Jui Nee" <[email protected]>
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.
--- drivers/spi/spi-pxa2xx.c | 4 ++++ 1 file changed, 4 insertions(+)
drivers/spi/spi-pxa2xx.c +4 -0
@@ -654,6 +654,10 @@ static irqreturn_t ssp_int(int irq, void *dev_id)if (!(sccr1_reg &SSCR1_TIE )) mask &= ~SSSR_TFS ; +/* Ignore RX timeout interrupt if it is disabled */ +if (!(sccr1_reg &SSCR1_TINTE )) + mask &= ~SSSR_TINT ; +if (!(status & mask))return IRQ_NONE ;
Signature · 6 lines
1.9.3 -- To unsubscribe from this list: send the line "unsubscribe linux-spi" in the body of a message to [email protected] More majordomo info at http://vger.kernel.org/majordomo-info.html
Quoted 14 lines · Tan Jui Nee
From: "Tan, Jui Nee" <[email protected]>
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_SHAREDwhen calling therequest_irqfunction. 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
Quoted 8 lines
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]>--- drivers/spi/spi-pxa2xx.c | 4 ++++ 1 file changed, 4 insertions(+)
--
To unsubscribe from this list: send the line "unsubscribe linux-spi" in the body of a message to [email protected] More majordomo info at http://vger.kernel.org/majordomo-info.html
Applied "spi: spi-pxa2xx: Check status register to determine if SSSR_TINT is disabled" to the spi tree
In reply to a message not in the archiveThe patch
spi: spi-pxa2xx: Check status register to determine if SSSR_TINT is disabled
has been applied to the spi tree at
git://git.kernel.org/pub/scm/linux/kernel/git/broonie/spi.git
All being well this means that it will be integrated into the linux-next tree (usually sometime in the next 24 hours) and sent to Linus during the next merge window (or sooner if it is a bug fix), however if problems are discovered then the patch may be dropped or reverted.
You may get further e-mails resulting from automated or manual testing and review of the tree, please engage with people reporting problems and send followup patches addressing any issues that are reported if needed.
If any updates are required or you are submitting further changes they should be sent as incremental updates against current git, existing patches will not be replaced.
Please add any relevant lists and maintainers to the CCs when replying to this mail.
Thanks,
Mark
Quoted 1 line
From
02bc933ebb59208f42c2e6305b2c17fd306f695dMon Sep 17 00:00:00 2001
From: "Tan, Jui Nee" <[email protected]>
Date: Tue, 1 Sep 2015 10:22:51 +0800
Subject: [PATCH] spi: spi-pxa2xx: Check status register to determine if
SSSR_TINT is disabled
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.
--- drivers/spi/spi-pxa2xx.c | 4 ++++ 1 file changed, 4 insertions(+)
drivers/spi/spi-pxa2xx.c +4 -0
@@ -643,6 +643,10 @@ static irqreturn_t ssp_int(int irq, void *dev_id)if (!(sccr1_reg &SSCR1_TIE )) mask &= ~SSSR_TFS ; +/* Ignore RX timeout interrupt if it is disabled */ +if (!(sccr1_reg &SSCR1_TINTE )) + mask &= ~SSSR_TINT ; +if (!(status & mask))return IRQ_NONE ;
Signature · 6 lines
2.5.0 -- To unsubscribe from this list: send the line "unsubscribe linux-spi" in the body of a message to [email protected] More majordomo info at http://vger.kernel.org/majordomo-info.html