ramips: mtk-mmc: set correct DMA mask
authorDENG Qingfang <dengqf6@mail2.sysu.edu.cn>
Fri, 17 Jan 2020 08:04:14 +0000 (16:04 +0800)
committerChuanhong Guo <gch981213@gmail.com>
Sat, 4 Apr 2020 04:04:13 +0000 (12:04 +0800)
Since commit f8c55dc ("MIPS: use generic dma noncoherent ops for
simple noncoherent platforms") changed MIPS dma handling, the mmc
driver fails because it doesn't have a dma mask is set.

So set the correct dma mask.

Signed-off-by: NeilBrown <neil@brown.name>
Signed-off-by: DENG Qingfang <dengqf6@mail2.sysu.edu.cn>
target/linux/ramips/files/drivers/mmc/host/mtk-mmc/sd.c

index cb0aa4231ab900ced8a36b2e1a19aedb8968c366..8cbc87da3afcf3e774281c56150e92ff31634fe6 100644 (file)
@@ -2284,7 +2284,7 @@ static int msdc_drv_probe(struct platform_device *pdev)
        host->mrq = NULL;
        //init_MUTEX(&host->sem); /* we don't need to support multiple threads access */
 
-       mmc_dev(mmc)->dma_mask = NULL;
+       dma_coerce_mask_and_coherent(mmc_dev(mmc), DMA_BIT_MASK(32));
 
        /* using dma_alloc_coherent*/  /* todo: using 1, for all 4 slots */
        host->dma.gpd = dma_alloc_coherent(&pdev->dev,