From: Jaehoon Chung <jh80.chung@samsung.com>
To: u-boot@lists.denx.de
Subject: [U-Boot] [PATCH] mmc:sdhci: Fix card ready status timeout.
Date: Thu, 29 Aug 2013 12:16:05 +0900 [thread overview]
Message-ID: <521EBCF5.3020007@samsung.com> (raw)
In-Reply-To: <1377708592-16702-1-git-send-email-p.marczak@samsung.com>
Hi Przemyslaw,
Could you give me the test-case?
I want to test this problem.
On 08/29/2013 01:49 AM, Przemyslaw Marczak wrote:
> According to JEDEC eMMC specification, after data transfer
> (multiple or single block) host must wait for card ready
> status. This is done by waiting for command and data lines
> to be at idle state after transfer. JEDEC does not specify
> maximum timeout.
>
> Before this change max timeout was 10 ms but in case of UMS
> - when system do multiple read/write operations on random
> card blocks - timeout causes I/O errors.
> The timeout has been increased to 200ms after data transfer.
> For other transfers it stays unchanged.
>
> Tested on Goni and Trats.
>
> Signed-off-by: Przemyslaw Marczak <p.marczak@samsung.com>
> Cc: Pantelis Antoniou <panto@antoniou-consulting.com>
> ---
> drivers/mmc/sdhci.c | 6 ++++--
> 1 file changed, 4 insertions(+), 2 deletions(-)
>
> diff --git a/drivers/mmc/sdhci.c b/drivers/mmc/sdhci.c
> index 4261991..22c18d1 100644
> --- a/drivers/mmc/sdhci.c
> +++ b/drivers/mmc/sdhci.c
> @@ -121,8 +121,10 @@ int sdhci_send_command(struct mmc *mmc, struct mmc_cmd *cmd,
> unsigned int timeout, start_addr = 0;
> unsigned int retry = 10000;
>
> - /* Wait max 10 ms */
> - timeout = 10;
> + if (!data)
> + timeout = 200;
> + else
> + timeout = 10;
And timeout = data ? 10 : 200; ?
Best Regards,
Jaehoon Chung
>
> sdhci_writel(host, SDHCI_INT_ALL_MASK, SDHCI_INT_STATUS);
> mask = SDHCI_CMD_INHIBIT | SDHCI_DATA_INHIBIT;
>
next prev parent reply other threads:[~2013-08-29 3:16 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-08-28 16:49 [U-Boot] [PATCH] mmc:sdhci: Fix card ready status timeout Przemyslaw Marczak
2013-08-29 3:16 ` Jaehoon Chung [this message]
2013-09-02 14:16 ` Przemyslaw Marczak
-- strict thread matches above, loose matches on Subject: below --
2013-09-03 12:50 Przemyslaw Marczak
2013-09-06 13:24 ` Pantelis Antoniou
2013-09-06 15:23 ` Przemyslaw Marczak
2013-09-06 15:27 ` Pantelis Antoniou
2013-09-09 12:58 ` Przemyslaw Marczak
2013-09-13 12:59 ` Przemyslaw Marczak
2013-09-16 16:34 ` Pantelis Antoniou
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=521EBCF5.3020007@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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox