From: Jaehoon Chung <jh80.chung@samsung.com>
To: u-boot@lists.denx.de
Subject: [U-Boot] [PATCH 1/2] mmc: dw_mmc: transfer proper bytes to FIFO
Date: Thu, 28 Jul 2016 17:09:25 +0900 [thread overview]
Message-ID: <5799BDB5.6090905@samsung.com> (raw)
In-Reply-To: <1469672748-21986-1-git-send-email-xzy.xu@rock-chips.com>
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 <jh80.chung@samsung.com>
Best Regards,
Jaehoon Chung
>
> Signed-off-by: Ziyuan Xu <xzy.xu@rock-chips.com>
> ---
>
> 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++);
>
next prev parent reply other threads:[~2016-07-28 8:09 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <CGME20160728022619epcas1p3fea43436d829548e76a6483a24103b18@epcas1p3.samsung.com>
2016-07-28 2:25 ` [U-Boot] [PATCH 1/2] mmc: dw_mmc: transfer proper bytes to FIFO Ziyuan Xu
2016-07-28 2:25 ` [U-Boot] [PATCH 2/2] mmc: dw_mmc: fix data starvation by host timeout under FIFO mode Ziyuan Xu
2016-07-28 8:09 ` Jaehoon Chung
2016-08-01 2:21 ` Simon Glass
2016-08-05 2:27 ` [U-Boot] [U-Boot, " Jaehoon Chung
2016-07-28 8:09 ` Jaehoon Chung [this message]
2016-08-01 2:21 ` [U-Boot] [PATCH 1/2] mmc: dw_mmc: transfer proper bytes to FIFO Simon Glass
2016-08-02 2:37 ` Shawn Lin
2016-08-05 2:27 ` [U-Boot] [U-Boot, " Jaehoon Chung
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=5799BDB5.6090905@samsung.com \
--to=jh80.chung@samsung.com \
--cc=u-boot@lists.denx.de \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.