diff options
author | Tom Rini <trini@konsulko.com> | 2016-08-05 09:15:55 -0400 |
---|---|---|
committer | Tom Rini <trini@konsulko.com> | 2016-08-05 20:55:27 -0400 |
commit | a60d94b204412732409e70cb15236bd96d4da7d9 (patch) | |
tree | 4eb4d5b6b0783a6b244625109a724185c1b64a78 /drivers/mmc/fsl_esdhc.c | |
parent | d03a0308599bb658598848e86aadb0d140f65e0c (diff) | |
parent | 89f69e51734f5d704ef84503d24907bfde2f5577 (diff) | |
download | u-boot-imx-a60d94b204412732409e70cb15236bd96d4da7d9.zip u-boot-imx-a60d94b204412732409e70cb15236bd96d4da7d9.tar.gz u-boot-imx-a60d94b204412732409e70cb15236bd96d4da7d9.tar.bz2 |
Merge branch 'master' of git://git.denx.de/u-boot-mmc
Diffstat (limited to 'drivers/mmc/fsl_esdhc.c')
-rw-r--r-- | drivers/mmc/fsl_esdhc.c | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/drivers/mmc/fsl_esdhc.c b/drivers/mmc/fsl_esdhc.c index a865c7b..103b32e 100644 --- a/drivers/mmc/fsl_esdhc.c +++ b/drivers/mmc/fsl_esdhc.c @@ -12,11 +12,11 @@ #include <config.h> #include <common.h> #include <command.h> +#include <errno.h> #include <hwconfig.h> #include <mmc.h> #include <part.h> #include <malloc.h> -#include <mmc.h> #include <fsl_esdhc.h> #include <fdt_support.h> #include <asm/io.h> @@ -253,7 +253,7 @@ static int esdhc_setup_data(struct mmc *mmc, struct mmc_data *data) if ((esdhc_read32(®s->prsstat) & PRSSTAT_WPSPL) == 0) { printf("\nThe SD card is locked. Can not write to a locked card.\n\n"); - return TIMEOUT; + return -ETIMEDOUT; } } @@ -411,12 +411,12 @@ esdhc_send_cmd(struct mmc *mmc, struct mmc_cmd *cmd, struct mmc_data *data) irqstat = esdhc_read32(®s->irqstat); if (irqstat & CMD_ERR) { - err = COMM_ERR; + err = -ECOMM; goto out; } if (irqstat & IRQSTAT_CTOE) { - err = TIMEOUT; + err = -ETIMEDOUT; goto out; } @@ -442,7 +442,7 @@ esdhc_send_cmd(struct mmc *mmc, struct mmc_cmd *cmd, struct mmc_data *data) if (timeout <= 0) { printf("Timeout waiting for DAT0 to go high!\n"); - err = TIMEOUT; + err = -ETIMEDOUT; goto out; } } @@ -471,12 +471,12 @@ esdhc_send_cmd(struct mmc *mmc, struct mmc_cmd *cmd, struct mmc_data *data) irqstat = esdhc_read32(®s->irqstat); if (irqstat & IRQSTAT_DTOE) { - err = TIMEOUT; + err = -ETIMEDOUT; goto out; } if (irqstat & DATA_ERR) { - err = COMM_ERR; + err = -ECOMM; goto out; } } while ((irqstat & DATA_COMPLETE) != DATA_COMPLETE); |