aboutsummaryrefslogtreecommitdiff
path: root/drivers/mmc/renesas-sdhi.c
diff options
context:
space:
mode:
authorTom Rini <trini@konsulko.com>2019-09-08 21:14:22 -0400
committerTom Rini <trini@konsulko.com>2019-09-08 21:15:13 -0400
commit40e362a9ab5f1d409822942ee89d4473c2e01ee6 (patch)
treead63f4fdcc210a0a758e41528fb2f15ecedf6a31 /drivers/mmc/renesas-sdhi.c
parent2f760735c170c854ffca76be5607cec5c56fdc4f (diff)
parentcd45d6f3955c919b7f10793014db3dbcfd7df3bb (diff)
Merge tag 'mmc-9-6-2019' of https://gitlab.denx.de/u-boot/custodians/u-boot-mmc
Bug fixes to mmc_spi Add Aspeed SD driver Fix dw_mmc timeout calculation Fix timeout values passed to mmc_wait_dat0 sdhci dt caps/mask update [trini: Fix evb-ast2500_defconfig CONFIG_MMC line] Signed-off-by: Tom Rini <trini@konsulko.com>
Diffstat (limited to 'drivers/mmc/renesas-sdhi.c')
-rw-r--r--drivers/mmc/renesas-sdhi.c7
1 files changed, 4 insertions, 3 deletions
diff --git a/drivers/mmc/renesas-sdhi.c b/drivers/mmc/renesas-sdhi.c
index 7c53aa221e..0cb65b480d 100644
--- a/drivers/mmc/renesas-sdhi.c
+++ b/drivers/mmc/renesas-sdhi.c
@@ -499,15 +499,16 @@ static int renesas_sdhi_set_ios(struct udevice *dev)
}
#if CONFIG_IS_ENABLED(MMC_UHS_SUPPORT)
-static int renesas_sdhi_wait_dat0(struct udevice *dev, int state, int timeout)
+static int renesas_sdhi_wait_dat0(struct udevice *dev, int state,
+ int timeout_us)
{
int ret = -ETIMEDOUT;
bool dat0_high;
bool target_dat0_high = !!state;
struct tmio_sd_priv *priv = dev_get_priv(dev);
- timeout = DIV_ROUND_UP(timeout, 10); /* check every 10 us. */
- while (timeout--) {
+ timeout_us = DIV_ROUND_UP(timeout_us, 10); /* check every 10 us. */
+ while (timeout_us--) {
dat0_high = !!(tmio_sd_readl(priv, TMIO_SD_INFO2) & TMIO_SD_INFO2_DAT0);
if (dat0_high == target_dat0_high) {
ret = 0;