Hi Ziyuan, On 07/28/2016 11:25 AM, Ziyuan Xu wrote: > The former implement, dw_mmc will push and pop the redundant data to > FIFO, we should transfer it according to the real size.
Looks good to me. Acked-by: Jaehoon Chung <[email protected]> Best Regards, Jaehoon Chung > > Signed-off-by: Ziyuan Xu <[email protected]> > --- > > drivers/mmc/dw_mmc.c | 2 ++ > 1 file changed, 2 insertions(+) > > diff --git a/drivers/mmc/dw_mmc.c b/drivers/mmc/dw_mmc.c > index 2cf7bae..38d4a64 100644 > --- a/drivers/mmc/dw_mmc.c > +++ b/drivers/mmc/dw_mmc.c > @@ -126,6 +126,7 @@ static int dwmci_data_transfer(struct dwmci_host *host, > struct mmc_data *data) > len = dwmci_readl(host, DWMCI_STATUS); > len = (len >> DWMCI_FIFO_SHIFT) & > DWMCI_FIFO_MASK; > + len = min(size, len); > for (i = 0; i < len; i++) > *buf++ = > dwmci_readl(host, DWMCI_DATA); > @@ -139,6 +140,7 @@ static int dwmci_data_transfer(struct dwmci_host *host, > struct mmc_data *data) > len = fifo_depth - ((len >> > DWMCI_FIFO_SHIFT) & > DWMCI_FIFO_MASK); > + len = min(size, len); > for (i = 0; i < len; i++) > dwmci_writel(host, DWMCI_DATA, > *buf++); > _______________________________________________ U-Boot mailing list [email protected] http://lists.denx.de/mailman/listinfo/u-boot

