projects
/
project
/
bcm63xx
/
u-boot.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
14bed52
)
mmc: dw_mmc: transfer proper bytes to FIFO
author
Xu Ziyuan
<
[email protected]
>
Thu, 28 Jul 2016 02:25:47 +0000
(10:25 +0800)
committer
Jaehoon Chung
<
[email protected]
>
Fri, 5 Aug 2016 05:04:31 +0000
(14:04 +0900)
The former implement, dw_mmc will push and pop the redundant data to
FIFO, we should transfer it according to the real size.
Signed-off-by: Ziyuan Xu <
[email protected]
>
Acked-by: Jaehoon Chung <
[email protected]
>
Reviewed-by: Simon Glass <
[email protected]
>
Reviewed-by: Shawn Lin <
[email protected]
>
Signed-off-by: Jaehoon Chung <
[email protected]
>
drivers/mmc/dw_mmc.c
patch
|
blob
|
history
diff --git
a/drivers/mmc/dw_mmc.c
b/drivers/mmc/dw_mmc.c
index a6a5fc65790a18db6f52d6cdeb0b11bf7a0377fa..a0a582b4421d632a17fe59159f742c571faa2788 100644
(file)
--- a/
drivers/mmc/dw_mmc.c
+++ b/
drivers/mmc/dw_mmc.c
@@
-125,6
+125,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);
@@
-138,6
+139,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++);