diff options
author | Jaewon Kim <[email protected]> | 2023-05-10 20:39:42 +0900 |
---|---|---|
committer | Mark Brown <[email protected]> | 2023-05-11 10:30:43 +0900 |
commit | 26cd10a0b9761bffd4669a429f8a33cbccef5bbd (patch) | |
tree | 6136a34273438a7afc291fc0ffeda0d27dc046ac | |
parent | 057e1ae7443cefb4c59923a574512b7bc69683f8 (diff) |
spi: s3c64xx: Disable IRQ mode when using DMA
Fixing the problem of enabling DMA mode and IRQ mode at the same time.
In this case, a value of more than 6bits is written to RDY_LVL, it can
cause an invasion of other registers, potentially leading to SPI
transfer failure.
Fixes: 1ee806718d5e ("spi: s3c64xx: support interrupt based pio mode")
Signed-off-by: Jaewon Kim <[email protected]
Reported-by: Marek Szyprowski <[email protected]
Tested-by: Marek Szyprowski <[email protected]
Reviewed-by: Krzysztof Kozlowski <[email protected]
Link: https://lore.kernel.org/r/[email protected]
Signed-off-by: Mark Brown <[email protected]
-rw-r--r-- | drivers/spi/spi-s3c64xx.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/spi/spi-s3c64xx.c b/drivers/spi/spi-s3c64xx.c index f79732ff3a27..e30562f96a4c 100644 --- a/drivers/spi/spi-s3c64xx.c +++ b/drivers/spi/spi-s3c64xx.c @@ -782,7 +782,7 @@ static int s3c64xx_spi_transfer_one(struct spi_master *master, do { /* transfer size is greater than 32, change to IRQ mode */ - if (xfer->len > S3C64XX_SPI_POLLING_SIZE) + if (!use_dma && xfer->len > S3C64XX_SPI_POLLING_SIZE) use_irq = true; if (use_irq) { |