diff options
author | Jaehoon Chung | 2016-07-19 16:33:36 +0900 |
---|---|---|
committer | Jaehoon Chung | 2016-08-05 11:21:25 +0900 |
commit | 915ffa5213756568f6185d05cda2cb2f6050f974 (patch) | |
tree | 7f0d304eabe717a9c1c871cb346e6cdf18157a40 /drivers/mmc/omap_hsmmc.c | |
parent | 70f862808e8ae4b97fe736ec9d9d496881ad84b2 (diff) |
mmc: use the generic error number
Use the generic error number instead of specific error number.
If use the generic error number, it can debug more easier.
Signed-off-by: Jaehoon Chung <jh80.chung@samsung.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Minkyu Kang <mk7.kang@samsung.com>
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 d007b562936..e80ac3d7220 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); |