mmc: use the generic error number
[oweals/u-boot.git] / drivers / mmc / mxcmmc.c
index 561b2045986f5858bcc1f90b0398831dfa32f079..8038f904524adbbeb2ec85202818e12ebebbb26a 100644 (file)
@@ -211,11 +211,11 @@ static int mxcmci_finish_data(struct mxcmci_host *host, unsigned int stat)
                } else if (stat & STATUS_CRC_WRITE_ERR) {
                        u32 err_code = (stat >> 9) & 0x3;
                        if (err_code == 2) /* No CRC response */
-                               data_error = TIMEOUT;
+                               data_error = -ETIMEDOUT;
                        else
                                data_error = -EILSEQ;
                } else if (stat & STATUS_TIME_OUT_READ) {
-                       data_error = TIMEOUT;
+                       data_error = -ETIMEDOUT;
                } else {
                        data_error = -EIO;
                }
@@ -238,7 +238,7 @@ static int mxcmci_read_response(struct mxcmci_host *host, unsigned int stat)
 
        if (stat & STATUS_TIME_OUT_RESP) {
                printf("CMD TIMEOUT\n");
-               return TIMEOUT;
+               return -ETIMEDOUT;
        } else if (stat & STATUS_RESP_CRC_ERR && cmd->resp_type & MMC_RSP_CRC) {
                printf("cmd crc error\n");
                return -EILSEQ;