]> git.dujemihanovic.xyz Git - u-boot.git/commitdiff
mmc: tmio: sdhi: Touch SCC only when UHS capable
authorMarek Vasut <marek.vasut+renesas@gmail.com>
Sun, 28 Oct 2018 14:30:06 +0000 (15:30 +0100)
committerMarek Vasut <marex@denx.de>
Fri, 2 Nov 2018 15:04:44 +0000 (16:04 +0100)
Add check to avoid touching the SCC tuning registers in case the IP
doesn't support them or if the support isn't in place yet.

Signed-off-by: Marek Vasut <marek.vasut+renesas@gmail.com>
Cc: Masahiro Yamada <yamada.masahiro@socionext.com>
drivers/mmc/renesas-sdhi.c

index f8dc5f57ce16af300ffa362b8c550ab32dc14ec0..7c92bd92ad6c15a5aa0b4248bf29aac130253f0c 100644 (file)
@@ -294,7 +294,8 @@ static int renesas_sdhi_set_ios(struct udevice *dev)
 #if CONFIG_IS_ENABLED(MMC_HS200_SUPPORT)
        struct tmio_sd_priv *priv = dev_get_priv(dev);
 
-       renesas_sdhi_reset_tuning(priv);
+       if (priv->caps & TMIO_SD_CAP_RCAR_UHS)
+               renesas_sdhi_reset_tuning(priv);
 #endif
 
        return ret;
@@ -373,7 +374,7 @@ static int renesas_sdhi_probe(struct udevice *dev)
 
        ret = tmio_sd_probe(dev, quirks);
 #if CONFIG_IS_ENABLED(MMC_HS200_SUPPORT)
-       if (!ret)
+       if (!ret && (priv->caps & TMIO_SD_CAP_RCAR_UHS))
                renesas_sdhi_reset_tuning(priv);
 #endif
        return ret;