diff options
author | Jaehoon Chung <jh80.chung@samsung.com> | 2016-07-19 16:33:36 +0900 |
---|---|---|
committer | Jaehoon Chung <jh80.chung@samsung.com> | 2016-08-05 11:21:25 +0900 |
commit | 915ffa5213756568f6185d05cda2cb2f6050f974 (patch) | |
tree | 7f0d304eabe717a9c1c871cb346e6cdf18157a40 /drivers/mmc/sunxi_mmc.c | |
parent | 70f862808e8ae4b97fe736ec9d9d496881ad84b2 (diff) | |
download | u-boot-915ffa5213756568f6185d05cda2cb2f6050f974.tar.gz |
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/sunxi_mmc.c')
-rw-r--r-- | drivers/mmc/sunxi_mmc.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/drivers/mmc/sunxi_mmc.c b/drivers/mmc/sunxi_mmc.c index 5d8abdc897..6953accce1 100644 --- a/drivers/mmc/sunxi_mmc.c +++ b/drivers/mmc/sunxi_mmc.c @@ -304,7 +304,7 @@ static int mmc_rint_wait(struct mmc *mmc, unsigned int timeout_msecs, (status & SUNXI_MMC_RINT_INTERRUPT_ERROR_BIT)) { debug("%s timeout %x\n", what, status & SUNXI_MMC_RINT_INTERRUPT_ERROR_BIT); - return TIMEOUT; + return -ETIMEDOUT; } udelay(1000); } while (!(status & done_bit)); @@ -375,7 +375,7 @@ static int sunxi_mmc_send_cmd(struct mmc *mmc, struct mmc_cmd *cmd, if (ret) { error = readl(&mmchost->reg->rint) & \ SUNXI_MMC_RINT_INTERRUPT_ERROR_BIT; - error = TIMEOUT; + error = -ETIMEDOUT; goto out; } } @@ -402,7 +402,7 @@ static int sunxi_mmc_send_cmd(struct mmc *mmc, struct mmc_cmd *cmd, status = readl(&mmchost->reg->status); if (!timeout_msecs--) { debug("busy timeout\n"); - error = TIMEOUT; + error = -ETIMEDOUT; goto out; } udelay(1000); |