diff options
author | Tom Rini <trini@konsulko.com> | 2016-08-05 09:15:55 -0400 |
---|---|---|
committer | Tom Rini <trini@konsulko.com> | 2016-08-05 20:55:27 -0400 |
commit | a60d94b204412732409e70cb15236bd96d4da7d9 (patch) | |
tree | 4eb4d5b6b0783a6b244625109a724185c1b64a78 /drivers/mmc/omap_hsmmc.c | |
parent | d03a0308599bb658598848e86aadb0d140f65e0c (diff) | |
parent | 89f69e51734f5d704ef84503d24907bfde2f5577 (diff) | |
download | u-boot-imx-a60d94b204412732409e70cb15236bd96d4da7d9.zip u-boot-imx-a60d94b204412732409e70cb15236bd96d4da7d9.tar.gz u-boot-imx-a60d94b204412732409e70cb15236bd96d4da7d9.tar.bz2 |
Merge branch 'master' of git://git.denx.de/u-boot-mmc
Diffstat (limited to 'drivers/mmc/omap_hsmmc.c')
-rw-r--r-- | drivers/mmc/omap_hsmmc.c | 18 |
1 files changed, 9 insertions, 9 deletions
diff --git a/drivers/mmc/omap_hsmmc.c b/drivers/mmc/omap_hsmmc.c index d007b56..e80ac3d 100644 --- a/drivers/mmc/omap_hsmmc.c +++ b/drivers/mmc/omap_hsmmc.c @@ -231,7 +231,7 @@ static int omap_hsmmc_init_setup(struct mmc *mmc) while ((readl(&mmc_base->sysstatus) & RESETDONE) == 0) { if (get_timer(0) - start > MAX_RETRY_MS) { printf("%s: timedout waiting for cc2!\n", __func__); - return TIMEOUT; + return -ETIMEDOUT; } } writel(readl(&mmc_base->sysctl) | SOFTRESETALL, &mmc_base->sysctl); @@ -240,7 +240,7 @@ static int omap_hsmmc_init_setup(struct mmc *mmc) if (get_timer(0) - start > MAX_RETRY_MS) { printf("%s: timedout waiting for softresetall!\n", __func__); - return TIMEOUT; + return -ETIMEDOUT; } } writel(DTW_1_BITMODE | SDBP_PWROFF | SDVS_3V0, &mmc_base->hctl); @@ -262,7 +262,7 @@ static int omap_hsmmc_init_setup(struct mmc *mmc) while ((readl(&mmc_base->sysctl) & ICS_MASK) == ICS_NOTREADY) { if (get_timer(0) - start > MAX_RETRY_MS) { printf("%s: timedout waiting for ics!\n", __func__); - return TIMEOUT; + return -ETIMEDOUT; } } writel(readl(&mmc_base->sysctl) | CEN_ENABLE, &mmc_base->sysctl); @@ -337,7 +337,7 @@ static int omap_hsmmc_send_cmd(struct mmc *mmc, struct mmc_cmd *cmd, if (get_timer(0) - start > MAX_RETRY_MS) { printf("%s: timedout waiting on cmd inhibit to clear\n", __func__); - return TIMEOUT; + return -ETIMEDOUT; } } writel(0xFFFFFFFF, &mmc_base->stat); @@ -346,7 +346,7 @@ static int omap_hsmmc_send_cmd(struct mmc *mmc, struct mmc_cmd *cmd, if (get_timer(0) - start > MAX_RETRY_MS) { printf("%s: timedout waiting for STAT (%x) to clear\n", __func__, readl(&mmc_base->stat)); - return TIMEOUT; + return -ETIMEDOUT; } } /* @@ -410,13 +410,13 @@ static int omap_hsmmc_send_cmd(struct mmc *mmc, struct mmc_cmd *cmd, mmc_stat = readl(&mmc_base->stat); if (get_timer(0) - start > MAX_RETRY_MS) { printf("%s : timeout: No status update\n", __func__); - return TIMEOUT; + return -ETIMEDOUT; } } while (!mmc_stat); if ((mmc_stat & IE_CTO) != 0) { mmc_reset_controller_fsm(mmc_base, SYSCTL_SRC); - return TIMEOUT; + return -ETIMEDOUT; } else if ((mmc_stat & ERRI_MASK) != 0) return -1; @@ -464,7 +464,7 @@ static int mmc_read_data(struct hsmmc *mmc_base, char *buf, unsigned int size) if (get_timer(0) - start > MAX_RETRY_MS) { printf("%s: timedout waiting for status!\n", __func__); - return TIMEOUT; + return -ETIMEDOUT; } } while (mmc_stat == 0); @@ -519,7 +519,7 @@ static int mmc_write_data(struct hsmmc *mmc_base, const char *buf, if (get_timer(0) - start > MAX_RETRY_MS) { printf("%s: timedout waiting for status!\n", __func__); - return TIMEOUT; + return -ETIMEDOUT; } } while (mmc_stat == 0); |