@@ -4,6 +4,7 @@
* (C) Copyright 2012
* Marvell Semiconductor <www.marvell.com>
* Written-by: Lior Amsalem <alior@marvell.com>
+ * Written-by: GĂ©rald Kerma <uboot@doukki.net>
* See file CREDITS for list of people who contributed to this
* project.
*
@@ -127,10 +128,9 @@ static int mrvl_mmc_send_cmd (struct mmc *mmc, struct mmc_cmd *cmd, struct mmc_d
SDIO_REG_WRITE16(SDIO_CMD, MRVL_MMC_MAKE_CMD(cmd->cmdidx, resptype));
/* Waiting for completion */
- timeout = 1000000;
+ timeout = 10000;
while (!((SDIO_REG_READ16(SDIO_NOR_INTR_STATUS)) & waittype)) {
- udelay(1);
if (SDIO_REG_READ16(SDIO_NOR_INTR_STATUS) & SDIO_NOR_ERROR) {
#ifdef DEBUG
printf("mrvl_mmc_send_cmd: error! cmd : %d, err reg: %04x\n", cmd->cmdidx, SDIO_REG_READ16(SDIO_ERR_INTR_STATUS));
@@ -139,6 +139,7 @@ static int mrvl_mmc_send_cmd (struct mmc *mmc, struct mmc_cmd *cmd, struct mmc_d
return TIMEOUT;
return COMM_ERR;
}
+ udelay(1000);
timeout--;
if (timeout <= 0) {
printf("MRVL MMC: command timed out\n");
Fix an issue with most SDHC cards because of timeout delay Signed-off-by: drEagle <dreagle@doukki.net> --- drivers/mmc/mrvl_mmc.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-)