[PATCH] drivers/mci: pxa writedata timeout

Robert Jarzmik robert.jarzmik at free.fr
Mon Dec 19 04:17:18 EST 2011


The write data timeout is too small for old cards,
especially the Transcend 256MBytes SD card. Increase it from
10ms to 100ms.

Signed-off-by: Robert Jarzmik <robert.jarzmik at free.fr>
---
 drivers/mci/pxamci.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/drivers/mci/pxamci.c b/drivers/mci/pxamci.c
index 558116f..a3f8f22 100644
--- a/drivers/mci/pxamci.c
+++ b/drivers/mci/pxamci.c
@@ -123,7 +123,7 @@ static int pxamci_write_data(struct pxamci_host *host, const unsigned char *src,
 
 	if (!ret)
 		for (start = get_time_ns(), ret = -ETIMEDOUT;
-		     ret && !is_timeout(start, 10 * MSECOND);)  {
+		     ret && !is_timeout(start, 100 * MSECOND);)  {
 			stat = mmc_readl(MMC_STAT);
 			stat &= STAT_DATA_TRAN_DONE | STAT_PRG_DONE;
 			if (stat == (STAT_DATA_TRAN_DONE | STAT_PRG_DONE))
-- 
1.7.5.4




More information about the barebox mailing list