mirror of
https://source.denx.de/u-boot/u-boot.git
synced 2025-12-17 07:21:36 +01:00
mmc: tmio: sdhi: Filter out HS400 on certain SoCs
Filter out HS400 support on SoCs where HS400 is not supported yet. Signed-off-by: Marek Vasut <marek.vasut+renesas@gmail.com> Cc: Masahiro Yamada <yamada.masahiro@socionext.com>
This commit is contained in:
parent
ed427dab2e
commit
d34bd2deda
@ -363,6 +363,23 @@ static ulong renesas_sdhi_clk_get_rate(struct tmio_sd_priv *priv)
|
|||||||
return clk_get_rate(&priv->clk);
|
return clk_get_rate(&priv->clk);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
static void renesas_sdhi_filter_caps(struct udevice *dev)
|
||||||
|
{
|
||||||
|
struct tmio_sd_plat *plat = dev_get_platdata(dev);
|
||||||
|
struct tmio_sd_priv *priv = dev_get_priv(dev);
|
||||||
|
|
||||||
|
if (!(priv->caps & TMIO_SD_CAP_RCAR_GEN3))
|
||||||
|
return;
|
||||||
|
|
||||||
|
/* HS400 is not supported on H3 ES1.x and M3W ES1.0,ES1.1 */
|
||||||
|
if (((rmobile_get_cpu_type() == RMOBILE_CPU_TYPE_R8A7795) &&
|
||||||
|
(rmobile_get_cpu_rev_integer() <= 1)) ||
|
||||||
|
((rmobile_get_cpu_type() == RMOBILE_CPU_TYPE_R8A7796) &&
|
||||||
|
(rmobile_get_cpu_rev_integer() == 1) &&
|
||||||
|
(rmobile_get_cpu_rev_fraction() <= 1)))
|
||||||
|
plat->cfg.host_caps &= ~MMC_MODE_HS400;
|
||||||
|
}
|
||||||
|
|
||||||
static int renesas_sdhi_probe(struct udevice *dev)
|
static int renesas_sdhi_probe(struct udevice *dev)
|
||||||
{
|
{
|
||||||
struct tmio_sd_priv *priv = dev_get_priv(dev);
|
struct tmio_sd_priv *priv = dev_get_priv(dev);
|
||||||
@ -407,6 +424,9 @@ static int renesas_sdhi_probe(struct udevice *dev)
|
|||||||
}
|
}
|
||||||
|
|
||||||
ret = tmio_sd_probe(dev, quirks);
|
ret = tmio_sd_probe(dev, quirks);
|
||||||
|
|
||||||
|
renesas_sdhi_filter_caps(dev);
|
||||||
|
|
||||||
#if CONFIG_IS_ENABLED(MMC_HS200_SUPPORT)
|
#if CONFIG_IS_ENABLED(MMC_HS200_SUPPORT)
|
||||||
if (!ret && (priv->caps & TMIO_SD_CAP_RCAR_UHS))
|
if (!ret && (priv->caps & TMIO_SD_CAP_RCAR_UHS))
|
||||||
renesas_sdhi_reset_tuning(priv);
|
renesas_sdhi_reset_tuning(priv);
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user