u-boot-brain/drivers/mmc
Marek Vasut b9a2a0e2e9 mmc: Add support for downgrading HS200/HS400 to HS mode
The mmc_select_mode_and_width() function can be called while the card
is in HS200/HS400 mode and can be used to downgrade the card to lower
mode, e.g. HS. This is used for example by mmc_boot_part_access_chk()
which cannot access the card in HS200/HS400 mode and which is in turn
called by saveenv if env is in the MMC.

In such case, forcing the card clock to legacy frequency cannot work.
Instead, the card must be switched to HS mode first, from which it can
then be reprogrammed as needed.

However, this procedure needs additional code changes, since the current
implementation checks whether the card correctly switched to HS mode in
mmc_set_card_speed(). The check only expects that the card will be going
to HS mode from lower modes, not from higher modes, hence add a parameter
which indicates that the HS200/HS400 to HS downgrade is happening. This
makes the code send the switch command first, reconfigure the controller
next and finally perform the EXT_CSD readback check. The last two steps
cannot be done in reverse order as the card is already in HS mode when
the clock are being switched on the controller side.

Signed-off-by: Marek Vasut <marek.vasut+renesas@gmail.com>
Cc: Jaehoon Chung <jh80.chung@samsung.com>
2019-01-15 15:28:42 -05:00
..
arm_pl180_mmci.c mmc: arm_pl180_mmci: Remove cd_inverted host's struct field 2018-08-03 19:53:54 -04:00
arm_pl180_mmci.h mmc: arm_pl180_mmci: Remove cd_inverted host's struct field 2018-08-03 19:53:54 -04:00
atmel_sdhci.c SPDX: Convert all of our single license tags to Linux Kernel style 2018-05-07 09:34:12 -04:00
bcm2835_sdhci.c mmc: use core clock frequency in bcm2835 sdhost 2018-04-05 13:17:43 +02:00
bcm2835_sdhost.c mmc: Unirqify bcm2835_sdhost and fix writes 2018-05-23 22:31:42 +02:00
bcmstb_sdhci.c board: arm: Add support for Broadcom BCM7445 2018-07-10 16:55:57 -04:00
davinci_mmc.c MMC: davinici_mmc: Enable CD and WP with DM and OF_CONTROL 2018-09-11 21:49:02 -04:00
dw_mmc.c mmc: dw_mmc: Add RCRC handling 2018-11-10 08:16:30 -05:00
exynos_dw_mmc.c ARM: Odroid XU3: Modify exynos dw_mmc driver to support Odroid XU3 in DM MMC 2018-08-06 10:53:53 +09:00
fsl_esdhc_spl.c SPDX: Convert all of our single license tags to Linux Kernel style 2018-05-07 09:34:12 -04:00
fsl_esdhc.c mmc: fsl_esdhc: Avoid infinite loop in esdhc_send_cmd_common() 2019-01-14 11:26:12 -05:00
ftsdc010_mci.c mmc: ftsdc010_mci: Sync compatible with DT mmc node 2018-05-29 14:45:03 +08:00
ftsdc010_mci.h SPDX: Convert all of our single license tags to Linux Kernel style 2018-05-07 09:34:12 -04:00
gen_atmel_mci.c SPDX: Convert all of our single license tags to Linux Kernel style 2018-05-07 09:34:12 -04:00
hi6220_dw_mmc.c mmc: Convert HI6220 MMC driver to driver model 2019-01-15 15:28:10 -05:00
jz_mmc.c mmc: Add JZ47xx SD/MMC controller driver 2018-12-19 15:23:01 +01:00
k3_arsan_sdhci.c mmc: k3_arasan: Add sdhci driver support for K3 family SoCs 2018-09-11 08:32:55 -04:00
Kconfig mmc: Add JZ47xx SD/MMC controller driver 2018-12-19 15:23:01 +01:00
kona_sdhci.c SPDX: Convert all of our single license tags to Linux Kernel style 2018-05-07 09:34:12 -04:00
Makefile mmc: Add JZ47xx SD/MMC controller driver 2018-12-19 15:23:01 +01:00
meson_gx_mmc.c mmc: meson-gx: Add AXG compatible 2018-11-26 14:39:57 +01:00
mmc_boot.c SPDX: Convert all of our single license tags to Linux Kernel style 2018-05-07 09:34:12 -04:00
mmc_legacy.c mmc: Improve tinification 2018-05-13 07:57:32 -04:00
mmc_private.h SPDX: Convert all of our single license tags to Linux Kernel style 2018-05-07 09:34:12 -04:00
mmc_spi.c lib: merge CRC16-CCITT into u-boot/crc.h 2018-12-08 20:18:32 -05:00
mmc_write.c SPDX: Convert all of our single license tags to Linux Kernel style 2018-05-07 09:34:12 -04:00
mmc-uclass.c mmc: Parse HS400 DT properties 2018-12-03 12:51:16 +01:00
mmc.c mmc: Add support for downgrading HS200/HS400 to HS mode 2019-01-15 15:28:42 -05:00
msm_sdhci.c SPDX: Convert all of our single license tags to Linux Kernel style 2018-05-07 09:34:12 -04:00
mtk-sd.c mmc: mtk-sd: add SD/MMC host controller driver for MT7623 SoC 2018-11-28 23:04:54 -05:00
mv_sdhci.c SPDX: Convert all of our single license tags to Linux Kernel style 2018-05-07 09:34:12 -04:00
mvebu_mmc.c SPDX: Convert all of our single license tags to Linux Kernel style 2018-05-07 09:34:12 -04:00
mxcmmc.c mmc: change the set_ios return type from void to int 2017-01-11 19:40:13 +09:00
mxsmmc.c SPDX: Convert all of our single license tags to Linux Kernel style 2018-05-07 09:34:12 -04:00
omap_hsmmc.c mmc: omap: Surround DM_FLAG_PRE_RELOC flag with OF_CONTROL check 2018-11-14 09:16:28 -08:00
pci_mmc.c SPDX: Convert all of our single license tags to Linux Kernel style 2018-05-07 09:34:12 -04:00
pic32_sdhci.c SPDX: Convert all of our single license tags to Linux Kernel style 2018-05-07 09:34:12 -04:00
pxa_mmc_gen.c SPDX: Convert all of our single license tags to Linux Kernel style 2018-05-07 09:34:12 -04:00
renesas-sdhi.c mmc: tmio: sdhi: Add HS400 support 2018-12-03 12:51:17 +01:00
rockchip_dw_mmc.c rockchip: dwmmc: add rk2928-dw-mshc compatible 2018-10-02 09:35:09 +02:00
rockchip_sdhci.c SPDX: Convert all of our single license tags to Linux Kernel style 2018-05-07 09:34:12 -04:00
rpmb.c mmc: rpmb: add mmc_rpmb_route_frames() 2018-10-07 10:47:38 -04:00
s5p_sdhci.c SPDX: Convert all of our single license tags to Linux Kernel style 2018-05-07 09:34:12 -04:00
sandbox_mmc.c SPDX: Convert all of our single license tags to Linux Kernel style 2018-05-07 09:34:12 -04:00
sdhci-cadence.c SPDX: Convert all of our single license tags to Linux Kernel style 2018-05-07 09:34:12 -04:00
sdhci.c mmc: sdhci: Fix MMC HS200 tuning command failures 2018-06-15 08:54:04 +02:00
sh_mmcif.c SPDX: Convert all of our single license tags to Linux Kernel style 2018-05-07 09:34:12 -04:00
sh_mmcif.h SPDX: Convert all of our single license tags to Linux Kernel style 2018-05-07 09:34:12 -04:00
sh_sdhi.c SPDX: Convert all of our single license tags to Linux Kernel style 2018-05-07 09:34:12 -04:00
socfpga_dw_mmc.c mmc: socfpga: Add clock framework support 2018-08-13 22:35:42 +02:00
sti_sdhci.c SPDX: Convert all of our single license tags to Linux Kernel style 2018-05-07 09:34:12 -04:00
stm32_sdmmc2.c mmc: stm32_sdmmc2: update pwron management 2018-07-19 16:31:35 -04:00
sunxi_mmc.c mmc: sunxi: Fix mmc clocks for DM_MMC 2019-01-10 14:45:15 +05:30
tangier_sdhci.c SPDX: Convert all of our single license tags to Linux Kernel style 2018-05-07 09:34:12 -04:00
tegra_mmc.c SPDX: Convert all of our single license tags to Linux Kernel style 2018-05-07 09:34:12 -04:00
tmio-common.c mmc: tmio: Reorder TMIO clock handling 2018-12-03 12:51:16 +01:00
tmio-common.h mmc: tmio: sdhi: Add HS400 support 2018-12-03 12:51:17 +01:00
uniphier-sd.c mmc: tmio: Switch to clock framework 2018-12-03 12:51:16 +01:00
xenon_sdhci.c SPDX: Convert all of our single license tags to Linux Kernel style 2018-05-07 09:34:12 -04:00
zynq_sdhci.c mmc: zynq: Fix tuning_loop_counter type in arasan_sdhci_execute_tuning() 2018-06-15 08:54:04 +02:00