X-Git-Url: https://git.librecmc.org/?a=blobdiff_plain;f=drivers%2Fmmc%2Fsh_mmcif.c;h=1ff59f06d576b77dbfe1fc92ba7f44f5a9d0e006;hb=31f044bd91df58bed6bb8cfadfc187eedac1442e;hp=76ba93b81d4f42e4307aaeca3213e956eef58462;hpb=1a9c8f12f2f2824a047ebeb3ae342109677b48cc;p=oweals%2Fu-boot.git diff --git a/drivers/mmc/sh_mmcif.c b/drivers/mmc/sh_mmcif.c index 76ba93b81d..1ff59f06d5 100644 --- a/drivers/mmc/sh_mmcif.c +++ b/drivers/mmc/sh_mmcif.c @@ -3,9 +3,7 @@ * * Copyright (C) 2011 Renesas Solutions Corp. * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation; either version 2 of the License. + * SPDX-License-Identifier: GPL-2.0 */ #include @@ -14,7 +12,7 @@ #include #include #include -#include +#include #include #include "sh_mmcif.h" @@ -170,7 +168,7 @@ static int sh_mmcif_error_manage(struct sh_mmcif_host *host) if (state2 & STS2_CRC_ERR) ret = -EILSEQ; else if (state2 & STS2_TIMEOUT_ERR) - ret = TIMEOUT; + ret = -ETIMEDOUT; else ret = -EILSEQ; return ret; @@ -485,7 +483,7 @@ static int sh_mmcif_start_cmd(struct sh_mmcif_host *host, case MMC_CMD_ALL_SEND_CID: case MMC_CMD_SELECT_CARD: case MMC_CMD_APP_CMD: - ret = TIMEOUT; + ret = -ETIMEDOUT; break; default: printf(DRIVER_NAME": Cmd(d'%d) err\n", cmd->cmdidx); @@ -522,14 +520,14 @@ static int sh_mmcif_request(struct mmc *mmc, struct mmc_cmd *cmd, switch (cmd->cmdidx) { case MMC_CMD_APP_CMD: - return TIMEOUT; + return -ETIMEDOUT; case MMC_CMD_SEND_EXT_CSD: /* = SD_SEND_IF_COND (8) */ if (data) /* ext_csd */ break; else /* send_if_cond cmd (not support) */ - return TIMEOUT; + return -ETIMEDOUT; default: break; } @@ -541,7 +539,7 @@ static int sh_mmcif_request(struct mmc *mmc, struct mmc_cmd *cmd, return ret; } -static void sh_mmcif_set_ios(struct mmc *mmc) +static int sh_mmcif_set_ios(struct mmc *mmc) { struct sh_mmcif_host *host = mmc->priv; @@ -556,6 +554,8 @@ static void sh_mmcif_set_ios(struct mmc *mmc) host->bus_width = MMC_BUS_WIDTH_1; debug("clock = %d, buswidth = %d\n", mmc->clock, mmc->bus_width); + + return 0; } static int sh_mmcif_init(struct mmc *mmc) @@ -577,7 +577,7 @@ static struct mmc_config sh_mmcif_cfg = { .name = DRIVER_NAME, .ops = &sh_mmcif_ops, .host_caps = MMC_MODE_HS | MMC_MODE_HS_52MHz | MMC_MODE_4BIT | - MMC_MODE_8BIT | MMC_MODE_HC, + MMC_MODE_8BIT, .voltages = MMC_VDD_32_33 | MMC_VDD_33_34, .b_max = CONFIG_SYS_MMC_MAX_BLK_COUNT, };