mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* [PATCH v2 0/5] Poll mode for NXP DSPI driver
@ 2019-08-22 21:15 Vladimir Oltean
  2019-08-22 21:15 ` [PATCH v2 1/5] spi: spi-fsl-dspi: Reduce indentation level in dspi_interrupt Vladimir Oltean
                   ` (4 more replies)
  0 siblings, 5 replies; 25+ messages in thread
From: Vladimir Oltean @ 2019-08-22 21:15 UTC (permalink / raw)
  To: broonie; +Cc: linux-spi, linux-kernel, devicetree, netdev, Vladimir Oltean

This series makes the EOQ and TCFQ operating modes of spi-fsl-dspi work
when no platform IRQ is defined in the DT.

The NXP LS1021A-TSN board needs this setting for performance reasons,
and I am adding the corresponding DTS patch to this series to avoid
runtime errors that may occur if the DTS and the driver patches part
ways and get included through separate trees.

The series also contains a bug fix for the shared IRQ of the DSPI
driver. I am going to respin a version of it as a separate patch for
inclusion in stable trees, independent of this patchset.

Vladimir Oltean (5):
  spi: spi-fsl-dspi: Reduce indentation level in dspi_interrupt
  spi: spi-fsl-dspi: Exit the ISR with IRQ_NONE when it's not ours
  spi: spi-fsl-dspi: Remove impossible to reach error check
  spi: spi-fsl-dspi: Use poll mode in case the platform IRQ is missing
  ARM: dts: ls1021a-tsn: Use the DSPI controller in poll mode

 arch/arm/boot/dts/ls1021a-tsn.dts |   1 +
 drivers/spi/spi-fsl-dspi.c        | 128 ++++++++++++++++++------------
 2 files changed, 78 insertions(+), 51 deletions(-)

-- 
2.17.1


^ permalink raw reply	[flat|nested] 25+ messages in thread
* [PATCH 1/1] spi: spi-fsl-dspi: Exit the ISR with IRQ_NONE when it's not ours
@ 2019-08-22 21:24 Vladimir Oltean
  2019-08-23 10:46 ` Applied "spi: spi-fsl-dspi: Exit the ISR with IRQ_NONE when it's not ours" to the spi tree Mark Brown
  0 siblings, 1 reply; 25+ messages in thread
From: Vladimir Oltean @ 2019-08-22 21:24 UTC (permalink / raw)
  To: broonie; +Cc: linux-spi, linux-kernel, Vladimir Oltean

The DSPI interrupt can be shared between two controllers at least on the
LX2160A. In that case, the driver for one controller might misbehave and
consume the other's interrupt. Fix this by actually checking if any of
the bits in the status register have been asserted.

Fixes: 13aed2392741 ("spi: spi-fsl-dspi: use IRQF_SHARED mode to request IRQ")
Signed-off-by: Vladimir Oltean <olteanv@gmail.com>
---
 drivers/spi/spi-fsl-dspi.c | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/drivers/spi/spi-fsl-dspi.c b/drivers/spi/spi-fsl-dspi.c
index 5e10dc5c93a5..6c2a30f9d85b 100644
--- a/drivers/spi/spi-fsl-dspi.c
+++ b/drivers/spi/spi-fsl-dspi.c
@@ -874,9 +874,11 @@ static irqreturn_t dspi_interrupt(int irq, void *dev_id)
 					trans_mode);
 			}
 		}
+
+		return IRQ_HANDLED;
 	}
 
-	return IRQ_HANDLED;
+	return IRQ_NONE;
 }
 
 static const struct of_device_id fsl_dspi_dt_ids[] = {
-- 
2.17.1


^ permalink raw reply	[flat|nested] 25+ messages in thread

end of thread, other threads:[~2019-09-11  7:00 UTC | newest]

Thread overview: 25+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-08-22 21:15 [PATCH v2 0/5] Poll mode for NXP DSPI driver Vladimir Oltean
2019-08-22 21:15 ` [PATCH v2 1/5] spi: spi-fsl-dspi: Reduce indentation level in dspi_interrupt Vladimir Oltean
2019-08-23 11:02   ` Applied "spi: spi-fsl-dspi: Reduce indentation level in dspi_interrupt" to the spi tree Mark Brown
2019-08-22 21:15 ` [PATCH v2 2/5] spi: spi-fsl-dspi: Exit the ISR with IRQ_NONE when it's not ours Vladimir Oltean
2019-08-23 10:28   ` Mark Brown
2019-08-23 10:30     ` Vladimir Oltean
2019-08-23 10:50       ` Mark Brown
2019-08-23 10:59         ` Mark Brown
2019-08-23 12:06           ` Vladimir Oltean
2019-08-23 21:03             ` Mark Brown
2019-08-23 11:02   ` Applied "spi: spi-fsl-dspi: Exit the ISR with IRQ_NONE when it's not ours" to the spi tree Mark Brown
2019-08-22 21:15 ` [PATCH v2 3/5] spi: spi-fsl-dspi: Remove impossible to reach error check Vladimir Oltean
2019-08-23 11:02   ` Applied "spi: spi-fsl-dspi: Remove impossible to reach error check" to the spi tree Mark Brown
2019-08-22 21:15 ` [PATCH v2 4/5] spi: spi-fsl-dspi: Use poll mode in case the platform IRQ is missing Vladimir Oltean
2019-08-23 11:02   ` Applied "spi: spi-fsl-dspi: Use poll mode in case the platform IRQ is missing" to the spi tree Mark Brown
2019-08-22 21:15 ` [PATCH v2 5/5] ARM: dts: ls1021a-tsn: Use the DSPI controller in poll mode Vladimir Oltean
2019-08-26 13:10   ` Vladimir Oltean
2019-08-27 18:05     ` Mark Brown
2019-08-27 18:06       ` Vladimir Oltean
2019-08-27 18:13         ` Mark Brown
2019-08-27 18:16           ` Vladimir Oltean
2019-08-27 18:31             ` Mark Brown
2019-09-11  6:33             ` Shawn Guo
2019-09-11  7:00               ` Geert Uytterhoeven
2019-08-22 21:24 [PATCH 1/1] spi: spi-fsl-dspi: Exit the ISR with IRQ_NONE when it's not ours Vladimir Oltean
2019-08-23 10:46 ` Applied "spi: spi-fsl-dspi: Exit the ISR with IRQ_NONE when it's not ours" to the spi tree Mark Brown

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®