summaryrefslogtreecommitdiff
path: root/drivers
diff options
context:
space:
mode:
authorXu Ziyuan <xzy.xu@rock-chips.com>2016-07-28 10:25:48 +0800
committerJaehoon Chung <jh80.chung@samsung.com>2016-08-05 14:04:36 +0900
commit720724d09852858a3938f7bfcbbb3d1a0fdd6b4c (patch)
tree3a8245484625a04eaa345c3d30338301df8c6e47 /drivers
parent2990e07a33159b1c23325c2c789cdb3f9ab4d89c (diff)
downloadu-boot-imx-720724d09852858a3938f7bfcbbb3d1a0fdd6b4c.zip
u-boot-imx-720724d09852858a3938f7bfcbbb3d1a0fdd6b4c.tar.gz
u-boot-imx-720724d09852858a3938f7bfcbbb3d1a0fdd6b4c.tar.bz2
mmc: dw_mmc: fix data starvation by host timeout under FIFO mode
This patch fixes data starvation by host timeout(HTO) error interrupt which occurred under FIFO mode transfer on rk3036 board. The former implement, the actual bytes were transmitted may be less than should be. The size will still subtract value of len in case of there is no receive/transmit FIFO data request interrupt. Signed-off-by: Ziyuan Xu <xzy.xu@rock-chips.com> Acked-by: Jaehoon Chung <jh80.chung@samsung.com> Reviewed-by: Simon Glass <sjg@chromium.org> Signed-off-by: Jaehoon Chung <jh80.chung@samsung.com>
Diffstat (limited to 'drivers')
-rw-r--r--drivers/mmc/dw_mmc.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/drivers/mmc/dw_mmc.c b/drivers/mmc/dw_mmc.c
index a0a582b..afc674d 100644
--- a/drivers/mmc/dw_mmc.c
+++ b/drivers/mmc/dw_mmc.c
@@ -119,6 +119,7 @@ static int dwmci_data_transfer(struct dwmci_host *host, struct mmc_data *data)
}
if (host->fifo_mode && size) {
+ len = 0;
if (data->flags == MMC_DATA_READ) {
if ((dwmci_readl(host, DWMCI_RINTSTS) &
DWMCI_INTMSK_RXDR)) {