* [U-Boot] [PATCH v2] mmc: increase MMC SDHCI read status timeout
@ 2016-06-29 20:42 Steve Rae
2016-06-30 1:41 ` Masahiro Yamada
2016-07-02 1:38 ` [U-Boot] [U-Boot, " Tom Rini
0 siblings, 2 replies; 4+ messages in thread
From: Steve Rae @ 2016-06-29 20:42 UTC (permalink / raw)
To: u-boot
Otherwise, ocassionally see errors like this:
Flashing sparse image at offset 2078720
Flashing Sparse Image
sdhci_send_command: Timeout for status update!
mmc fail to send stop cmd
write_sparse_image: Write failed, block #2181088 [0]
This does not affect the actual writing speed, which is controlled by
the default value:
CONFIG_SDHCI_CMD_DEFAULT_TIMEOUT
It only increases the retries when reading:
SDHCI_INT_STATUS
to avoid the timeout error.
Signed-off-by: Steve Rae <steve.rae@raedomain.com>
Reviewed-by: Stefan Roese <sr@denx.de>
Tested-by: Masahiro Yamada <yamada.masahiro@socionext.com>
---
as per the discussion in:
http://lists.denx.de/pipermail/u-boot/2016-June/258966.html
this supercedes:
http://patchwork.ozlabs.org/patch/615994/
Changes in v2:
dropped "CONFIG_" from the #define
dropped "arm:" in the commit message
drivers/mmc/sdhci.c | 5 +++--
1 file changed, 3 insertions(+), 2 deletions(-)
diff --git a/drivers/mmc/sdhci.c b/drivers/mmc/sdhci.c
index 5c71ab8..604f18d 100644
--- a/drivers/mmc/sdhci.c
+++ b/drivers/mmc/sdhci.c
@@ -127,6 +127,7 @@ static int sdhci_transfer_data(struct sdhci_host *host, struct mmc_data *data,
#define CONFIG_SDHCI_CMD_MAX_TIMEOUT 3200
#endif
#define CONFIG_SDHCI_CMD_DEFAULT_TIMEOUT 100
+#define SDHCI_READ_STATUS_TIMEOUT 1000
static int sdhci_send_command(struct mmc *mmc, struct mmc_cmd *cmd,
struct mmc_data *data)
@@ -243,9 +244,9 @@ static int sdhci_send_command(struct mmc *mmc, struct mmc_cmd *cmd,
if (stat & SDHCI_INT_ERROR)
break;
} while (((stat & mask) != mask) &&
- (get_timer(start) < CONFIG_SDHCI_CMD_DEFAULT_TIMEOUT));
+ (get_timer(start) < SDHCI_READ_STATUS_TIMEOUT));
- if (get_timer(start) >= CONFIG_SDHCI_CMD_DEFAULT_TIMEOUT) {
+ if (get_timer(start) >= SDHCI_READ_STATUS_TIMEOUT) {
if (host->quirks & SDHCI_QUIRK_BROKEN_R1B)
return 0;
else {
--
1.8.5
^ permalink raw reply related [flat|nested] 4+ messages in thread
* [U-Boot] [PATCH v2] mmc: increase MMC SDHCI read status timeout
2016-06-29 20:42 [U-Boot] [PATCH v2] mmc: increase MMC SDHCI read status timeout Steve Rae
@ 2016-06-30 1:41 ` Masahiro Yamada
2016-07-01 11:30 ` Jaehoon Chung
2016-07-02 1:38 ` [U-Boot] [U-Boot, " Tom Rini
1 sibling, 1 reply; 4+ messages in thread
From: Masahiro Yamada @ 2016-06-30 1:41 UTC (permalink / raw)
To: u-boot
2016-06-30 5:42 GMT+09:00 Steve Rae <steve.rae@raedomain.com>:
> Otherwise, ocassionally see errors like this:
> Flashing sparse image at offset 2078720
> Flashing Sparse Image
> sdhci_send_command: Timeout for status update!
> mmc fail to send stop cmd
> write_sparse_image: Write failed, block #2181088 [0]
>
> This does not affect the actual writing speed, which is controlled by
> the default value:
> CONFIG_SDHCI_CMD_DEFAULT_TIMEOUT
>
> It only increases the retries when reading:
> SDHCI_INT_STATUS
> to avoid the timeout error.
>
> Signed-off-by: Steve Rae <steve.rae@raedomain.com>
> Reviewed-by: Stefan Roese <sr@denx.de>
> Tested-by: Masahiro Yamada <yamada.masahiro@socionext.com>
Looks good to me. Thanks!
--
Best Regards
Masahiro Yamada
^ permalink raw reply [flat|nested] 4+ messages in thread
* [U-Boot] [PATCH v2] mmc: increase MMC SDHCI read status timeout
2016-06-30 1:41 ` Masahiro Yamada
@ 2016-07-01 11:30 ` Jaehoon Chung
0 siblings, 0 replies; 4+ messages in thread
From: Jaehoon Chung @ 2016-07-01 11:30 UTC (permalink / raw)
To: u-boot
On 06/30/2016 10:41 AM, Masahiro Yamada wrote:
> 2016-06-30 5:42 GMT+09:00 Steve Rae <steve.rae@raedomain.com>:
>> Otherwise, ocassionally see errors like this:
>> Flashing sparse image at offset 2078720
>> Flashing Sparse Image
>> sdhci_send_command: Timeout for status update!
>> mmc fail to send stop cmd
>> write_sparse_image: Write failed, block #2181088 [0]
>>
>> This does not affect the actual writing speed, which is controlled by
>> the default value:
>> CONFIG_SDHCI_CMD_DEFAULT_TIMEOUT
>>
>> It only increases the retries when reading:
>> SDHCI_INT_STATUS
>> to avoid the timeout error.
>>
>> Signed-off-by: Steve Rae <steve.rae@raedomain.com>
>> Reviewed-by: Stefan Roese <sr@denx.de>
>> Tested-by: Masahiro Yamada <yamada.masahiro@socionext.com>
Tested-by: Jaehoon Chung <jh80.chung@samsung.com>
Best Regards,
Jaehoon Chung
>
>
> Looks good to me. Thanks!
>
>
>
>
^ permalink raw reply [flat|nested] 4+ messages in thread
* [U-Boot] [U-Boot, v2] mmc: increase MMC SDHCI read status timeout
2016-06-29 20:42 [U-Boot] [PATCH v2] mmc: increase MMC SDHCI read status timeout Steve Rae
2016-06-30 1:41 ` Masahiro Yamada
@ 2016-07-02 1:38 ` Tom Rini
1 sibling, 0 replies; 4+ messages in thread
From: Tom Rini @ 2016-07-02 1:38 UTC (permalink / raw)
To: u-boot
On Wed, Jun 29, 2016 at 01:42:01PM -0700, Steve Rae wrote:
> Otherwise, ocassionally see errors like this:
> Flashing sparse image at offset 2078720
> Flashing Sparse Image
> sdhci_send_command: Timeout for status update!
> mmc fail to send stop cmd
> write_sparse_image: Write failed, block #2181088 [0]
>
> This does not affect the actual writing speed, which is controlled by
> the default value:
> CONFIG_SDHCI_CMD_DEFAULT_TIMEOUT
>
> It only increases the retries when reading:
> SDHCI_INT_STATUS
> to avoid the timeout error.
>
> Signed-off-by: Steve Rae <steve.rae@raedomain.com>
> Reviewed-by: Stefan Roese <sr@denx.de>
> Tested-by: Masahiro Yamada <yamada.masahiro@socionext.com>
> Tested-by: Jaehoon Chung <jh80.chung@samsung.com>
Applied to u-boot/master, thanks!
--
Tom
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 819 bytes
Desc: Digital signature
URL: <http://lists.denx.de/pipermail/u-boot/attachments/20160701/1580bff8/attachment.sig>
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2016-07-02 1:38 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-06-29 20:42 [U-Boot] [PATCH v2] mmc: increase MMC SDHCI read status timeout Steve Rae
2016-06-30 1:41 ` Masahiro Yamada
2016-07-01 11:30 ` Jaehoon Chung
2016-07-02 1:38 ` [U-Boot] [U-Boot, " Tom Rini
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.