aboutsummaryrefslogtreecommitdiff
path: root/drivers/mmc/sdhci.c
diff options
context:
space:
mode:
authorJaehoon Chung2016-09-26 08:10:02 +0900
committerJaehoon Chung2016-10-10 15:23:33 +0900
commit2cb5d67c1aceb758033954cc06382367ac89e6ac (patch)
tree033c23524ed8a33e7364b29b34069f2ce5a6041f /drivers/mmc/sdhci.c
parent895549a2d994ecf1ca1636792e55019e56be2d7d (diff)
mmc: sdhci: use the generic error number
Use the generic error number instead of meaningless value. Signed-off-by: Jaehoon Chung <jh80.chung@samsung.com> Reviewed-by: Simon Glass <sjg@chromium.org>
Diffstat (limited to 'drivers/mmc/sdhci.c')
-rw-r--r--drivers/mmc/sdhci.c12
1 files changed, 6 insertions, 6 deletions
diff --git a/drivers/mmc/sdhci.c b/drivers/mmc/sdhci.c
index 73377227bef..837c53842b3 100644
--- a/drivers/mmc/sdhci.c
+++ b/drivers/mmc/sdhci.c
@@ -87,7 +87,7 @@ static int sdhci_transfer_data(struct sdhci_host *host, struct mmc_data *data,
if (stat & SDHCI_INT_ERROR) {
printf("%s: Error detected in status(0x%X)!\n",
__func__, stat);
- return -1;
+ return -EIO;
}
if (stat & rdy) {
if (!(sdhci_readl(host, SDHCI_PRESENT_STATE) & mask))
@@ -110,7 +110,7 @@ static int sdhci_transfer_data(struct sdhci_host *host, struct mmc_data *data,
udelay(10);
else {
printf("%s: Transfer data timeout\n", __func__);
- return -1;
+ return -ETIMEDOUT;
}
} while (!(stat & SDHCI_INT_DATA_END));
return 0;
@@ -303,7 +303,7 @@ static int sdhci_set_clock(struct mmc *mmc, unsigned int clock)
if (timeout == 0) {
printf("%s: Timeout to wait cmd & data inhibit\n",
__func__);
- return -1;
+ return -EBUSY;
}
timeout--;
@@ -374,7 +374,7 @@ static int sdhci_set_clock(struct mmc *mmc, unsigned int clock)
if (timeout == 0) {
printf("%s: Internal clock never stabilised.\n",
__func__);
- return -1;
+ return -EBUSY;
}
timeout--;
udelay(1000);
@@ -477,7 +477,7 @@ static int sdhci_init(struct mmc *mmc)
if (!aligned_buffer) {
printf("%s: Aligned buffer alloc failed!!!\n",
__func__);
- return -1;
+ return -ENOMEM;
}
}
@@ -631,7 +631,7 @@ int add_sdhci(struct sdhci_host *host, u32 max_clk, u32 min_clk)
host->mmc = mmc_create(&host->cfg, host);
if (host->mmc == NULL) {
printf("%s: mmc create fail!\n", __func__);
- return -1;
+ return -ENOMEM;
}
return 0;