All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH v1] spi: pxa2xx: Setup maximum supported DMA transfer length
@ 2019-02-19 20:21 ` Andy Shevchenko
  0 siblings, 0 replies; 5+ messages in thread
From: Andy Shevchenko @ 2019-02-19 20:21 UTC (permalink / raw)
  To: Daniel Mack, Haojian Zhuang, Robert Jarzmik, linux-arm-kernel,
	Mark Brown, linux-spi
  Cc: Andy Shevchenko, Jarkko Nikula

When the commit b6ced294fb61

   ("spi: pxa2xx: Switch to SPI core DMA mapping functionality")

switches to SPI core provided DMA helpers, it missed to setup maximum
supported DMA transfer length for the controller and thus users
mistakenly try to send more data than supported with the following
warning:

  ili9341 spi-PRP0001:01: DMA disabled for transfer length 153600 greater than 65536

Setup maximum supported DMA transfer length in order to make users know
the limit.

Fixes: b6ced294fb61 ("spi: pxa2xx: Switch to SPI core DMA mapping functionality")
Cc: Jarkko Nikula <jarkko.nikula@linux.intel.com>
Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
---
 drivers/spi/spi-pxa2xx.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/drivers/spi/spi-pxa2xx.c b/drivers/spi/spi-pxa2xx.c
index 3458912b4efa..a90d0d5b18a5 100644
--- a/drivers/spi/spi-pxa2xx.c
+++ b/drivers/spi/spi-pxa2xx.c
@@ -1711,6 +1711,7 @@ static int pxa2xx_spi_probe(struct platform_device *pdev)
 			platform_info->enable_dma = false;
 		} else {
 			master->can_dma = pxa2xx_spi_can_dma;
+			master->max_dma_len = MAX_DMA_LEN;
 		}
 	}
 
-- 
2.20.1

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

end of thread, other threads:[~2019-02-20 17:53 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2019-02-19 20:21 [PATCH v1] spi: pxa2xx: Setup maximum supported DMA transfer length Andy Shevchenko
2019-02-19 20:21 ` Andy Shevchenko
2019-02-20 17:53 ` Applied "spi: pxa2xx: Setup maximum supported DMA transfer length" to the spi tree Mark Brown
2019-02-20 17:53   ` Mark Brown
2019-02-20 17:53   ` Mark Brown

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.