X-Git-Url: https://git.sur5r.net/?a=blobdiff_plain;f=drivers%2Fmmc%2Fbfin_sdh.c;h=993a00cdb1aeb515383b59272952434000ed9cf4;hb=2cb5d67c1aceb758033954cc06382367ac89e6ac;hp=9bdfbbca01175187ac717942e8144d09ebb82b10;hpb=04de09f89bbc647d5b72db3512d1af1475a13bbd;p=u-boot diff --git a/drivers/mmc/bfin_sdh.c b/drivers/mmc/bfin_sdh.c index 9bdfbbca01..993a00cdb1 100644 --- a/drivers/mmc/bfin_sdh.c +++ b/drivers/mmc/bfin_sdh.c @@ -12,7 +12,7 @@ #include #include -#include +#include #include #include #include @@ -109,9 +109,9 @@ sdh_send_cmd(struct mmc *mmc, struct mmc_cmd *mmc_cmd) } if (status & CMD_TIME_OUT) - ret = TIMEOUT; + ret = -ETIMEDOUT; else if (status & CMD_CRC_FAIL && flags & MMC_RSP_CRC) - ret = COMM_ERR; + ret = -ECOMM; else ret = 0; @@ -136,7 +136,7 @@ static int sdh_setup_data(struct mmc *mmc, struct mmc_data *data) /* Don't support write yet. */ if (data->flags & MMC_DATA_WRITE) - return UNUSABLE_ERR; + return -EOPNOTSUPP; #ifndef RSI_BLKSZ data_ctl |= ((ffs(data->blocksize) - 1) << 4); #else @@ -194,10 +194,10 @@ static int bfin_sdh_request(struct mmc *mmc, struct mmc_cmd *cmd, if (status & DAT_TIME_OUT) { bfin_write_SDH_STATUS_CLR(DAT_TIMEOUT_STAT); - ret |= TIMEOUT; + ret = -ETIMEDOUT; } else if (status & (DAT_CRC_FAIL | RX_OVERRUN)) { bfin_write_SDH_STATUS_CLR(DAT_CRC_FAIL_STAT | RX_OVERRUN_STAT); - ret |= COMM_ERR; + ret = -ECOMM; } else bfin_write_SDH_STATUS_CLR(DAT_BLK_END_STAT | DAT_END_STAT);