diff options
author | Tom Rini <trini@konsulko.com> | 2017-04-04 20:01:02 (GMT) |
---|---|---|
committer | Tom Rini <trini@konsulko.com> | 2017-04-04 20:01:02 (GMT) |
commit | 3b19c1dbe0464d1cdf3b3006042cc75bc439321f (patch) | |
tree | 8fd7cbfbcc6bbd6a55e3b195f1206efb4ff75e9c /drivers/mmc | |
parent | 4951e9420e179977f49549e25d8fd6437b37da72 (diff) | |
parent | ee92194acd3b2b8a6b2a096ec9588e9a7f326e95 (diff) | |
download | u-boot-3b19c1dbe0464d1cdf3b3006042cc75bc439321f.tar.xz |
Merge git://git.denx.de/u-boot-tegra
Diffstat (limited to 'drivers/mmc')
-rw-r--r-- | drivers/mmc/Kconfig | 11 | ||||
-rw-r--r-- | drivers/mmc/tegra_mmc.c | 16 |
2 files changed, 27 insertions, 0 deletions
diff --git a/drivers/mmc/Kconfig b/drivers/mmc/Kconfig index 05e0b10..560391f 100644 --- a/drivers/mmc/Kconfig +++ b/drivers/mmc/Kconfig @@ -367,6 +367,17 @@ config MMC_SUNXI endif +config TEGRA124_MMC_DISABLE_EXT_LOOPBACK + bool "Disable external clock loopback" + depends on MMC_SDHCI_TEGRA && TEGRA124 + help + Disable the external clock loopback and use the internal one on SDMMC3 + as per the SDMMC_VENDOR_MISC_CNTRL_0 register's SDMMC_SPARE1 bits + being set to 0xfffd according to the TRM. + + TODO(marcel.ziswiler@toradex.com): Move to device tree controlled + approach once proper kernel integration made it mainline. + endmenu config SYS_FSL_ERRATUM_ESDHC111 diff --git a/drivers/mmc/tegra_mmc.c b/drivers/mmc/tegra_mmc.c index 0df74ef..6c6affb 100644 --- a/drivers/mmc/tegra_mmc.c +++ b/drivers/mmc/tegra_mmc.c @@ -513,6 +513,22 @@ static int tegra_mmc_init(struct mmc *mmc) tegra_mmc_reset(priv, mmc); +#if defined(CONFIG_TEGRA124_MMC_DISABLE_EXT_LOOPBACK) + /* + * Disable the external clock loopback and use the internal one on + * SDMMC3 as per the SDMMC_VENDOR_MISC_CNTRL_0 register's SDMMC_SPARE1 + * bits being set to 0xfffd according to the TRM. + * + * TODO(marcel.ziswiler@toradex.com): Move to device tree controlled + * approach once proper kernel integration made it mainline. + */ + if (priv->reg == (void *)0x700b0400) { + mask = readl(&priv->reg->venmiscctl); + mask &= ~TEGRA_MMC_MISCON_ENABLE_EXT_LOOPBACK; + writel(mask, &priv->reg->venmiscctl); + } +#endif + priv->version = readw(&priv->reg->hcver); debug("host version = %x\n", priv->version); |