mmc: rk_sdmmc: edmac limit FIFOTH when mburst exceed limitation
authorlintao <lintao@rock-chips.com>
Tue, 3 Mar 2015 13:31:10 +0000 (21:31 +0800)
committerlintao <lintao@rock-chips.com>
Tue, 3 Mar 2015 13:37:44 +0000 (21:37 +0800)
Signed-off-by: lintao <lintao@rock-chips.com>
drivers/mmc/host/rk_sdmmc.c

index aea1afa7b576f63cd57f7359796fb1beddf90c40..69c3711c899c55485ba1b72b35c1615d6245dcf0 100755 (executable)
@@ -637,7 +637,13 @@ static void dw_mci_edmac_start_dma(struct dw_mci *host, unsigned int sg_len)
        else
                burst_limit = 16;
 
-       slave_config.dst_maxburst = (mburst > burst_limit) ? burst_limit : mburst;
+       if (mburst > burst_limit) {
+               mburst = burst_limit;
+               fifoth_val = SDMMC_SET_FIFOTH(mszs[3], mszs[3] - 1, (host->fifo_depth) / 2);
+               mci_writel(host, FIFOTH, fifoth_val);
+       }
+
+       slave_config.dst_maxburst = mburst;
        slave_config.src_maxburst = slave_config.dst_maxburst;
 
        if(host->data->flags & MMC_DATA_WRITE){