mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* [PATCH] spi/pxa2xx: enable DMA on newer Intel LPSS silicon
@ 2013-07-03 10:25 Mika Westerberg
  2013-07-03 11:12 ` Mark Brown
  0 siblings, 1 reply; 2+ messages in thread
From: Mika Westerberg @ 2013-07-03 10:25 UTC (permalink / raw)
  To: linux-spi
  Cc: Eric Miao, Russell King, Haojian Zhuang, Mark Brown,
	Grant Likely, Mika Westerberg, linux-kernel

There is an additional bit in the Intel LPSS SPI private registers that
needs to be set in order to be able to use DMA with the SPI controller.
Enable this as well.

Signed-off-by: Mika Westerberg <mika.westerberg@linux.intel.com>
---
 drivers/spi/spi-pxa2xx.c | 9 ++++++++-
 1 file changed, 8 insertions(+), 1 deletion(-)

diff --git a/drivers/spi/spi-pxa2xx.c b/drivers/spi/spi-pxa2xx.c
index 97e23c9..9196962 100644
--- a/drivers/spi/spi-pxa2xx.c
+++ b/drivers/spi/spi-pxa2xx.c
@@ -69,6 +69,8 @@ MODULE_ALIAS("platform:pxa2xx-spi");
 #define LPSS_TX_HITHRESH_DFLT	224
 
 /* Offset from drv_data->lpss_base */
+#define GENERAL_REG		0x08
+#define GENERAL_REG_RXTO_HOLDOFF_DISABLE BIT(24)
 #define SSP_REG			0x0c
 #define SPI_CS_CONTROL		0x18
 #define SPI_CS_CONTROL_SW_MODE	BIT(0)
@@ -142,8 +144,13 @@ detection_done:
 	__lpss_ssp_write_priv(drv_data, SPI_CS_CONTROL, value);
 
 	/* Enable multiblock DMA transfers */
-	if (drv_data->master_info->enable_dma)
+	if (drv_data->master_info->enable_dma) {
 		__lpss_ssp_write_priv(drv_data, SSP_REG, 1);
+
+		value = __lpss_ssp_read_priv(drv_data, GENERAL_REG);
+		value |= GENERAL_REG_RXTO_HOLDOFF_DISABLE;
+		__lpss_ssp_write_priv(drv_data, GENERAL_REG, value);
+	}
 }
 
 static void lpss_ssp_cs_control(struct driver_data *drv_data, bool enable)
-- 
1.8.3.2


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

* Re: [PATCH] spi/pxa2xx: enable DMA on newer Intel LPSS silicon
  2013-07-03 10:25 [PATCH] spi/pxa2xx: enable DMA on newer Intel LPSS silicon Mika Westerberg
@ 2013-07-03 11:12 ` Mark Brown
  0 siblings, 0 replies; 2+ messages in thread
From: Mark Brown @ 2013-07-03 11:12 UTC (permalink / raw)
  To: Mika Westerberg
  Cc: linux-spi, Eric Miao, Russell King, Haojian Zhuang, Grant Likely,
	linux-kernel

[-- Attachment #1: Type: text/plain, Size: 254 bytes --]

On Wed, Jul 03, 2013 at 01:25:06PM +0300, Mika Westerberg wrote:
> There is an additional bit in the Intel LPSS SPI private registers that
> needs to be set in order to be able to use DMA with the SPI controller.
> Enable this as well.

Applied, thanks.

[-- Attachment #2: Digital signature --]
[-- Type: application/pgp-signature, Size: 836 bytes --]

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

end of thread, other threads:[~2013-07-03 11:12 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2013-07-03 10:25 [PATCH] spi/pxa2xx: enable DMA on newer Intel LPSS silicon Mika Westerberg
2013-07-03 11:12 ` 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®