summaryrefslogtreecommitdiff
path: root/drivers/spi
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/spi')
-rw-r--r--drivers/spi/spi_qsd.c1
-rw-r--r--drivers/spi/spi_qsd.h7
2 files changed, 8 insertions, 0 deletions
diff --git a/drivers/spi/spi_qsd.c b/drivers/spi/spi_qsd.c
index 4e1e12969b8d..2d52fcaf954a 100644
--- a/drivers/spi/spi_qsd.c
+++ b/drivers/spi/spi_qsd.c
@@ -2484,6 +2484,7 @@ static int msm_spi_probe(struct platform_device *pdev)
dd->use_dma = 1;
}
+ spi_dma_mask(&pdev->dev);
skip_dma_resources:
spin_lock_init(&dd->queue_lock);
diff --git a/drivers/spi/spi_qsd.h b/drivers/spi/spi_qsd.h
index 53ec1e600594..7a5cfadaa5a0 100644
--- a/drivers/spi/spi_qsd.h
+++ b/drivers/spi/spi_qsd.h
@@ -165,6 +165,13 @@ enum msm_spi_state {
/* Data Mover commands should be aligned to 64 bit(8 bytes) */
#define DM_BYTE_ALIGN 8
+#if defined(CONFIG_ARM64) || defined(CONFIG_LPAE)
+#define spi_dma_mask(dev) (dma_set_mask((dev), DMA_BIT_MASK(36)))
+#else
+#define spi_dma_mask(dev) (dma_set_mask((dev), DMA_BIT_MASK(32)))
+#endif
+
+
enum msm_spi_qup_version {
SPI_QUP_VERSION_NONE = 0x0,
SPI_QUP_VERSION_BFAM = 0x2,