From mboxrd@z Thu Jan 1 00:00:00 1970
From: Przemyslaw Marczak
Date: Fri, 13 Sep 2013 14:59:17 +0200
Subject: [U-Boot] [PATCH] mmc:sdhci: Fix card ready status timeout.
In-Reply-To: <1378731514-12564-1-git-send-email-p.marczak@samsung.com>
References: <5229F375.9060805@samsung.com>
<1378731514-12564-1-git-send-email-p.marczak@samsung.com>
Message-ID: <52330C25.3030409@samsung.com>
List-Id:
MIME-Version: 1.0
Content-Type: text/plain; charset="us-ascii"
Content-Transfer-Encoding: 7bit
To: u-boot@lists.denx.de
Dear Pantelis,
On 09/09/2013 02:58 PM, 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 does 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. Default values are
> now defined with "if defined" directive so it can be redefined
> at board config if needed.
>
> Tested on Goni and Trats.
>
> Signed-off-by: Przemyslaw Marczak
> Cc: Pantelis Antoniou
Please do not apply this patch yet due to still not enough results on
some targets.
Timeout value should depends on internal cards operations execution time
but this time is unpredictably and that is why JEDEC not specifies it.
Maybe u-boot sdhci driver needs some more changes to be more flexible
for such operations. In example sdhci background operations timeout at
kernel is specified to 4 minutes.
I need to make more research.
Regards,
--
Przemyslaw Marczak
Samsung R&D Institute Poland
Samsung Electronics
p.marczak at samsung.com