X-Git-Url: https://git.sur5r.net/?a=blobdiff_plain;f=drivers%2Fmmc%2Fmvebu_mmc.c;h=a2792ac4ecb76c4c7757ba4bc45e6b242a5b1619;hb=895549a2d994ecf1ca1636792e55019e56be2d7d;hp=721ebcc6d43f4bd3d95f907db9dc29eb64f5dc70;hpb=02b2739e8fd90f3bc6945824d87ca1647cf95aef;p=u-boot diff --git a/drivers/mmc/mvebu_mmc.c b/drivers/mmc/mvebu_mmc.c index 721ebcc6d4..a2792ac4ec 100644 --- a/drivers/mmc/mvebu_mmc.c +++ b/drivers/mmc/mvebu_mmc.c @@ -9,6 +9,7 @@ */ #include +#include #include #include #include @@ -172,15 +173,15 @@ static int mvebu_mmc_send_cmd(struct mmc *mmc, struct mmc_cmd *cmd, (SDIO_ERR_CMD_TIMEOUT | SDIO_ERR_DATA_TIMEOUT)) { debug("%s: command READ timed out\n", DRIVER_NAME); - return TIMEOUT; + return -ETIMEDOUT; } debug("%s: command READ error\n", DRIVER_NAME); - return COMM_ERR; + return -ECOMM; } if ((get_timer(0) - start) > TIMEOUT_DELAY) { debug("%s: command timed out\n", DRIVER_NAME); - return TIMEOUT; + return -ETIMEDOUT; } } @@ -232,7 +233,7 @@ static int mvebu_mmc_send_cmd(struct mmc *mmc, struct mmc_cmd *cmd, if (mvebu_mmc_read(SDIO_ERR_INTR_STATUS) & (SDIO_ERR_CMD_TIMEOUT | SDIO_ERR_DATA_TIMEOUT)) - return TIMEOUT; + return -ETIMEDOUT; return 0; } @@ -403,8 +404,6 @@ static int mvebu_mmc_initialize(struct mmc *mmc) /* SW reset */ mvebu_mmc_write(SDIO_SW_RESET, SDIO_SW_RESET_NOW); - udelay(10*1000); - return 0; } @@ -420,7 +419,7 @@ static struct mmc_config mvebu_mmc_cfg = { .f_min = MVEBU_MMC_BASE_FAST_CLOCK / MVEBU_MMC_BASE_DIV_MAX, .f_max = MVEBU_MMC_CLOCKRATE_MAX, .voltages = MMC_VDD_32_33 | MMC_VDD_33_34, - .host_caps = MMC_MODE_4BIT | MMC_MODE_HS | MMC_MODE_HC | + .host_caps = MMC_MODE_4BIT | MMC_MODE_HS | MMC_MODE_HS_52MHz, .part_type = PART_TYPE_DOS, .b_max = CONFIG_SYS_MMC_MAX_BLK_COUNT,