Browse Source

ramips: mtk-mmc: set correct DMA mask

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 <[email protected]>
Signed-off-by: DENG Qingfang <[email protected]>
DENG Qingfang 6 years ago
parent
commit
d75c9b8f81
1 changed files with 1 additions and 1 deletions
  1. 1 1
      target/linux/ramips/files/drivers/mmc/host/mtk-mmc/sd.c

+ 1 - 1
target/linux/ramips/files/drivers/mmc/host/mtk-mmc/sd.c

@@ -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,