From f98ac45a635072bd085c2977d0d51a17134c22b4 Mon Sep 17 00:00:00 2001 From: AmadeusGhost <42570690+AmadeusGhost@users.noreply.github.com> Date: Mon, 24 Feb 2020 20:26:25 +0800 Subject: [PATCH] ramips: fix mmc driver (#3285) 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 Signed-off-by: DENG Qingfang Co-authored-by: DENG Qingfang --- target/linux/ramips/files-4.14/drivers/mmc/host/mtk-mmc/sd.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/target/linux/ramips/files-4.14/drivers/mmc/host/mtk-mmc/sd.c b/target/linux/ramips/files-4.14/drivers/mmc/host/mtk-mmc/sd.c index cb0aa4231..8cbc87da3 100644 --- a/target/linux/ramips/files-4.14/drivers/mmc/host/mtk-mmc/sd.c +++ b/target/linux/ramips/files-4.14/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,