summaryrefslogtreecommitdiff
path: root/include/mmc.h
diff options
context:
space:
mode:
authorMarek Vasut <marek.vasut+renesas@gmail.com>2019-01-29 04:45:51 +0100
committerMarek Vasut <marex@denx.de>2019-02-16 18:12:17 +0100
commitfceea9926804c8e72bdcde27bf64bebedcf0a754 (patch)
treed70ef99f82839e325e93e9d582ad66ce38152871 /include/mmc.h
parentd391c13c99a2b48c98cef6df4479247cd4e62f9d (diff)
mmc: Downgrade SD/MMC from UHS/HS200/HS400 modes before boot
Older kernel versions or systems which do not connect eMMC reset line properly may not be able to handle situations where either the eMMC is left in HS200/HS400 mode or SD card in UHS modes by the bootloader and may misbehave. Downgrade the eMMC to HS/HS52 mode and/or SD card to non-UHS mode before booting the kernel to allow such older kernels to work with modern U-Boot. Signed-off-by: Marek Vasut <marek.vasut+renesas@gmail.com> Cc: Tom Rini <trini@konsulko.com>
Diffstat (limited to 'include/mmc.h')
-rw-r--r--include/mmc.h6
1 files changed, 6 insertions, 0 deletions
diff --git a/include/mmc.h b/include/mmc.h
index d84e4fca73..1f30f71d25 100644
--- a/include/mmc.h
+++ b/include/mmc.h
@@ -690,6 +690,12 @@ int mmc_initialize(bd_t *bis);
int mmc_init(struct mmc *mmc);
int mmc_send_tuning(struct mmc *mmc, u32 opcode, int *cmd_error);
+#if CONFIG_IS_ENABLED(MMC_UHS_SUPPORT) || \
+ CONFIG_IS_ENABLED(MMC_HS200_SUPPORT) || \
+ CONFIG_IS_ENABLED(MMC_HS400_SUPPORT)
+int mmc_deinit(struct mmc *mmc);
+#endif
+
/**
* mmc_of_parse() - Parse the device tree to get the capabilities of the host
*