[COMMON] spi: s3c64xx: set DMA_BIT_MASK from 32 to 36
authorYoungmin Nam <youngmin.nam@samsung.com>
Thu, 12 Nov 2015 02:41:53 +0000 (11:41 +0900)
committermyung-su.cha <myung-su.cha@samsung.com>
Wed, 9 May 2018 12:14:45 +0000 (21:14 +0900)
This patch changes DMA_BIT_MASK to 36 to disable ZONE_DMA

Change-Id: Idf2b475b2acc4d7cd2755c38b720435712fbffa9
Signed-off-by: Youngmin Nam <youngmin.nam@samsung.com>
drivers/spi/spi-s3c64xx.c

index 641b550cbe68175913fadd70b8d588b64954d6bf..639d576cfd657dece73bba026c6f9fb1ddb689d8 100644 (file)
@@ -788,7 +788,7 @@ static void s3c64xx_spi_config(struct s3c64xx_spi_driver_data *sdd)
        }
 }
 
-#define XFER_DMAADDR_INVALID DMA_BIT_MASK(32)
+#define XFER_DMAADDR_INVALID DMA_BIT_MASK(36)
 
 static int s3c64xx_spi_map_mssg(struct s3c64xx_spi_driver_data *sdd,
                                                struct spi_message *msg)
@@ -1434,6 +1434,10 @@ static int s3c64xx_spi_probe(struct platform_device *pdev)
        char clk_name[16];
        int fifosize;
 
+       ret = dma_set_mask_and_coherent(&pdev->dev, DMA_BIT_MASK(36));
+       if (ret)
+               return ret;
+
        if (!sci && pdev->dev.of_node) {
                sci = s3c64xx_spi_parse_dt(&pdev->dev);
                if (IS_ERR(sci))