diff --git a/drivers/mmc/host/rk_sdmmc.c b/drivers/mmc/host/rk_sdmmc.c index 69c3711c899c..227bc7efa9b2 100755 --- a/drivers/mmc/host/rk_sdmmc.c +++ b/drivers/mmc/host/rk_sdmmc.c @@ -46,6 +46,7 @@ #include #include #include +#include #include "rk_sdmmc.h" #include "rk_sdmmc_dbg.h" #include @@ -639,7 +640,9 @@ static void dw_mci_edmac_start_dma(struct dw_mci *host, unsigned int sg_len) if (mburst > burst_limit) { mburst = burst_limit; - fifoth_val = SDMMC_SET_FIFOTH(mszs[3], mszs[3] - 1, (host->fifo_depth) / 2); + fifoth_val = SDMMC_SET_FIFOTH(ilog2(mburst) - 1, + (host->fifo_depth) / 2 - 1, + (host->fifo_depth) / 2); mci_writel(host, FIFOTH, fifoth_val); }