summaryrefslogtreecommitdiff
path: root/drivers/spi
diff options
context:
space:
mode:
authorLinux Build Service Account <lnxbuild@localhost>2017-02-15 17:01:00 -0800
committerGerrit - the friendly Code Review server <code-review@localhost>2017-02-15 17:00:59 -0800
commit4ebfafd8eef001f77b11c88eb23c988ff7caa176 (patch)
tree23838bc709f3d033d1aa5fadfe16180e01aecfde /drivers/spi
parentfa797838bc0e9c04f7d9c4bb90ffe5805371c5ee (diff)
parentf61d2a9a02ff10fca288aac31e0f12d878172d9f (diff)
Merge "spi: spi_qsd: Set DMA mask for SPI device"
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,