summaryrefslogtreecommitdiff
path: root/drivers/mmc/ftsdc010_mci.c
diff options
context:
space:
mode:
authorJaehoon Chung <jh80.chung@samsung.com>2016-07-19 16:33:36 +0900
committerJaehoon Chung <jh80.chung@samsung.com>2016-08-05 11:21:25 +0900
commit915ffa5213756568f6185d05cda2cb2f6050f974 (patch)
tree7f0d304eabe717a9c1c871cb346e6cdf18157a40 /drivers/mmc/ftsdc010_mci.c
parent70f862808e8ae4b97fe736ec9d9d496881ad84b2 (diff)
downloadu-boot-imx-915ffa5213756568f6185d05cda2cb2f6050f974.zip
u-boot-imx-915ffa5213756568f6185d05cda2cb2f6050f974.tar.gz
u-boot-imx-915ffa5213756568f6185d05cda2cb2f6050f974.tar.bz2
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/ftsdc010_mci.c')
-rw-r--r--drivers/mmc/ftsdc010_mci.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/drivers/mmc/ftsdc010_mci.c b/drivers/mmc/ftsdc010_mci.c
index a620678..c02740f 100644
--- a/drivers/mmc/ftsdc010_mci.c
+++ b/drivers/mmc/ftsdc010_mci.c
@@ -34,7 +34,7 @@ static inline int ftsdc010_send_cmd(struct mmc *mmc, struct mmc_cmd *mmc_cmd)
{
struct ftsdc010_chip *chip = mmc->priv;
struct ftsdc010_mmc __iomem *regs = chip->regs;
- int ret = TIMEOUT;
+ int ret = -ETIMEDOUT;
uint32_t ts, st;
uint32_t cmd = FTSDC010_CMD_IDX(mmc_cmd->cmdidx);
uint32_t arg = mmc_cmd->cmdarg;
@@ -126,7 +126,7 @@ static void ftsdc010_clkset(struct mmc *mmc, uint32_t rate)
static int ftsdc010_wait(struct ftsdc010_mmc __iomem *regs, uint32_t mask)
{
- int ret = TIMEOUT;
+ int ret = -ETIMEDOUT;
uint32_t st, ts;
for (ts = get_timer(0); get_timer(ts) < CFG_CMD_TIMEOUT; ) {
@@ -151,7 +151,7 @@ static int ftsdc010_wait(struct ftsdc010_mmc __iomem *regs, uint32_t mask)
static int ftsdc010_request(struct mmc *mmc, struct mmc_cmd *cmd,
struct mmc_data *data)
{
- int ret = UNUSABLE_ERR;
+ int ret = -EOPNOTSUPP;
uint32_t len = 0;
struct ftsdc010_chip *chip = mmc->priv;
struct ftsdc010_mmc __iomem *regs = chip->regs;
@@ -279,7 +279,7 @@ static int ftsdc010_init(struct mmc *mmc)
uint32_t ts;
if (readl(&regs->status) & FTSDC010_STATUS_CARD_DETECT)
- return NO_CARD_ERR;
+ return -ENOMEDIUM;
if (readl(&regs->status) & FTSDC010_STATUS_WRITE_PROT) {
printf("ftsdc010: write protected\n");
@@ -297,7 +297,7 @@ static int ftsdc010_init(struct mmc *mmc)
}
if (readl(&regs->cmd) & FTSDC010_CMD_SDC_RST) {
printf("ftsdc010: reset failed\n");
- return UNUSABLE_ERR;
+ return -EOPNOTSUPP;
}
/* 2. enter low speed mode (400k card detection) */