2
0
mirror of git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git synced 2025-09-04 20:19:47 +08:00
linux/drivers/mmc/host
Andy-ld Lu 3e68abf2b9 mmc: mtk-sd: Fix register settings for hs400(es) mode
For hs400(es) mode, the 'hs400-ds-delay' is typically configured in the
dts. However, some projects may only define 'mediatek,hs400-ds-dly3',
which can lead to initialization failures in hs400es mode. CMD13 reported
response crc error in the mmc_switch_status() just after switching to
hs400es mode.

[    1.914038][   T82] mmc0: mmc_select_hs400es failed, error -84
[    1.914954][   T82] mmc0: error -84 whilst initialising MMC card

Currently, the hs400_ds_dly3 value is set within the tuning function. This
means that the PAD_DS_DLY3 field is not configured before tuning process,
which is the reason for the above-mentioned CMD13 response crc error.

Move the PAD_DS_DLY3 field configuration into msdc_prepare_hs400_tuning(),
and add a value check of hs400_ds_delay to prevent overwriting by zero when
the 'hs400-ds-delay' is not set in the dts. In addition, since hs400(es)
only tune the PAD_DS_DLY1, the PAD_DS_DLY2_SEL bit should be cleared to
bypass it.

Fixes: c4ac38c653 ("mmc: mtk-sd: Add HS400 online tuning support")
Signed-off-by: Andy-ld Lu <andy-ld.lu@mediatek.com>
Reviewed-by: AngeloGioacchino Del Regno <angelogioacchino.delregno@collabora.com>
Cc: stable@vger.kernel.org
Link: https://lore.kernel.org/r/20250123092644.7359-1-andy-ld.lu@mediatek.com
Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org>
2025-02-03 13:34:50 +01:00
..
alcor.c mmc: Switch back to struct platform_driver::remove() 2024-10-14 12:29:01 +02:00
atmel-mci.c mmc: host: Fix typos in comments across various files 2024-10-14 12:40:10 +02:00
au1xmmc.c mmc: host: Fix typos in comments across various files 2024-10-14 12:40:10 +02:00
bcm2835.c mmc: bcm2835: add suspend/resume pm support 2024-12-10 11:18:45 +01:00
cavium-octeon.c mmc: host: Fix typos in comments across various files 2024-10-14 12:40:10 +02:00
cavium-thunderx.c mmc: Explicitly include correct DT includes 2023-08-09 13:21:48 +02:00
cavium.c
cavium.h
cb710-mmc.c mmc: Switch back to struct platform_driver::remove() 2024-10-14 12:29:01 +02:00
cb710-mmc.h mmc: Convert from tasklet to BH workqueue 2024-07-08 11:41:30 +02:00
cqhci-core.c mmc: cqhci: Make use of cqhci_halted() routine 2024-09-03 14:22:10 +02:00
cqhci-crypto.c mmc: sdhci-msm: convert to use custom crypto profile 2024-12-19 14:43:33 +01:00
cqhci-crypto.h
cqhci.h mmc: sdhci-msm: convert to use custom crypto profile 2024-12-19 14:43:33 +01:00
davinci_mmc.c mmc: davinci: use generic device_get_match_data() 2024-10-14 12:40:11 +02:00
dw_mmc-bluefield.c mmc: Switch back to struct platform_driver::remove() 2024-10-14 12:29:01 +02:00
dw_mmc-exynos.c mmc: Switch back to struct platform_driver::remove() 2024-10-14 12:29:01 +02:00
dw_mmc-exynos.h
dw_mmc-hi3798cv200.c mmc: Switch back to struct platform_driver::remove() 2024-10-14 12:29:01 +02:00
dw_mmc-hi3798mv200.c mmc: hi3798mv200: Use syscon_regmap_lookup_by_phandle_args 2025-01-13 16:36:13 +01:00
dw_mmc-k3.c mmc: Switch back to struct platform_driver::remove() 2024-10-14 12:29:01 +02:00
dw_mmc-pci.c
dw_mmc-pltfm.c mmc: Switch back to struct platform_driver::remove() 2024-10-14 12:29:01 +02:00
dw_mmc-pltfm.h mmc: dw_mmc: Make dw_mci_pltfm_remove() return void 2023-06-12 15:16:18 +02:00
dw_mmc-rockchip.c mmc: Switch back to struct platform_driver::remove() 2024-10-14 12:29:01 +02:00
dw_mmc-starfive.c mmc: Switch back to struct platform_driver::remove() 2024-10-14 12:29:01 +02:00
dw_mmc.c mmc: Merge branch fixes into next 2024-11-12 19:41:24 +01:00
dw_mmc.h mmc: dw_mmc: Add support for platform specific eMMC HW reset 2024-07-08 15:02:33 +02:00
jz4740_mmc.c mmc: Switch back to struct platform_driver::remove() 2024-10-14 12:29:01 +02:00
Kconfig mmc: sdhci: Make MMC_SDHCI_UHS2 config symbol invisible 2024-10-30 12:06:25 +01:00
litex_mmc.c mmc: Switch back to struct platform_driver::remove() 2024-10-14 12:29:01 +02:00
Makefile mmc: sdhci: add UHS-II module and add a kernel configuration 2024-10-24 14:36:08 +02:00
meson-gx-mmc.c mmc: host: Fix typos in comments across various files 2024-10-14 12:40:10 +02:00
meson-mx-sdhc-clkc.c mmc: meson-mx-sdhc: Use devm_clk_hw_get_clk() for clock retrieval 2024-02-27 13:39:12 +01:00
meson-mx-sdhc-mmc.c mmc: Switch back to struct platform_driver::remove() 2024-10-14 12:29:01 +02:00
meson-mx-sdhc.h
meson-mx-sdio.c mmc: Switch back to struct platform_driver::remove() 2024-10-14 12:29:01 +02:00
mmc_hsq.c mmc: hsq: Improve random I/O write performance for 4k buffers 2023-09-27 12:13:18 +02:00
mmc_hsq.h mmc: hsq: Improve random I/O write performance for 4k buffers 2023-09-27 12:13:18 +02:00
mmc_spi.c mmc: mmc_spi: drop buggy snprintf() 2024-10-14 12:40:11 +02:00
mmci_qcom_dml.c
mmci_stm32_sdmmc.c dma-mapping: don't return errors from dma_set_max_seg_size 2024-08-29 07:22:49 +03:00
mmci.c mmc: mmci: stm32: add SDIO in-band interrupt mode 2023-12-07 14:08:44 +01:00
mmci.h mmc: host: Fix typos in comments across various files 2024-10-14 12:40:10 +02:00
moxart-mmc.c mmc: Switch back to struct platform_driver::remove() 2024-10-14 12:29:01 +02:00
mtk-sd.c mmc: mtk-sd: Fix register settings for hs400(es) mode 2025-02-03 13:34:50 +01:00
mvsdio.c mmc: Switch back to struct platform_driver::remove() 2024-10-14 12:29:01 +02:00
mvsdio.h
mxcmmc.c mmc: Use of_property_present() for non-boolean properties 2025-01-13 16:32:56 +01:00
mxs-mmc.c mmc: Switch back to struct platform_driver::remove() 2024-10-14 12:29:01 +02:00
of_mmc_spi.c mmc: add missing MODULE_DESCRIPTION() macros 2024-06-20 14:40:55 +02:00
omap_hsmmc.c mmc: Switch back to struct platform_driver::remove() 2024-10-14 12:29:01 +02:00
omap.c mmc: Switch back to struct platform_driver::remove() 2024-10-14 12:29:01 +02:00
owl-mmc.c mmc: Switch back to struct platform_driver::remove() 2024-10-14 12:29:01 +02:00
pxamci.c mmc: Switch back to struct platform_driver::remove() 2024-10-14 12:29:01 +02:00
pxamci.h
renesas_sdhi_core.c - New Drivers 2024-07-17 17:42:20 -07:00
renesas_sdhi_internal_dmac.c mmc: Switch back to struct platform_driver::remove() 2024-10-14 12:29:01 +02:00
renesas_sdhi_sys_dmac.c mmc: Switch back to struct platform_driver::remove() 2024-10-14 12:29:01 +02:00
renesas_sdhi.h mmc: sdhi: Convert from tasklet to BH workqueue 2024-07-08 11:35:18 +02:00
rtsx_pci_sdmmc.c mmc: core: Drop the MMC_RSP_R1_NO_CRC response 2024-12-10 11:18:45 +01:00
rtsx_usb_sdmmc.c mmc: core: Drop the MMC_RSP_R1_NO_CRC response 2024-12-10 11:18:45 +01:00
sdhci_am654.c Revert "mmc: sdhci_am654: Add sdhci_am654_start_signal_voltage_switch" 2025-02-03 13:33:58 +01:00
sdhci_f_sdh30.c mmc: Switch back to struct platform_driver::remove() 2024-10-14 12:29:01 +02:00
sdhci_f_sdh30.h mmc: f-sdh30: Add support for non-removable media 2022-12-07 13:22:36 +01:00
sdhci-acpi.c mmc: sdhci-acpi: Use devm_platform_ioremap_resource() 2024-12-18 15:42:35 +01:00
sdhci-bcm-kona.c mmc: Switch back to struct platform_driver::remove() 2024-10-14 12:29:01 +02:00
sdhci-brcmstb.c mmc: Switch back to struct platform_driver::remove() 2024-10-14 12:29:01 +02:00
sdhci-cadence.c mmc: Switch back to struct platform_driver::remove() 2024-10-14 12:29:01 +02:00
sdhci-cqhci.h mmc: cqhci: Provide helper for resetting both SDHCI and CQHCI 2022-11-07 13:28:47 +01:00
sdhci-dove.c mmc: Switch back to struct platform_driver::remove() 2024-10-14 12:29:01 +02:00
sdhci-esdhc-imx.c mmc: Use of_property_present() for non-boolean properties 2025-01-13 16:32:56 +01:00
sdhci-esdhc-mcf.c mmc: Switch back to struct platform_driver::remove() 2024-10-14 12:29:01 +02:00
sdhci-esdhc.h
sdhci-iproc.c mmc: Switch back to struct platform_driver::remove() 2024-10-14 12:29:01 +02:00
sdhci-milbeaut.c mmc: Switch back to struct platform_driver::remove() 2024-10-14 12:29:01 +02:00
sdhci-msm.c mmc: sdhci-msm: Correctly set the load for the regulator 2025-01-17 12:31:03 +01:00
sdhci-npcm.c mmc: Switch back to struct platform_driver::remove() 2024-10-14 12:29:01 +02:00
sdhci-of-arasan.c mmc: sdhci-of-arasan: Support for emmc hardware reset 2024-10-14 12:40:10 +02:00
sdhci-of-aspeed-test.c mmc: sdhci-of-aspeed: test: Use kunit_test_suite() macro 2022-07-11 17:13:32 -06:00
sdhci-of-aspeed.c mmc: Switch back to struct platform_driver::remove() 2024-10-14 12:29:01 +02:00
sdhci-of-at91.c mmc: Switch back to struct platform_driver::remove() 2024-10-14 12:29:01 +02:00
sdhci-of-dwcmshc.c mmc: Switch back to struct platform_driver::remove() 2024-10-14 12:29:01 +02:00
sdhci-of-esdhc.c mmc: Switch back to struct platform_driver::remove() 2024-10-14 12:29:01 +02:00
sdhci-of-hlwd.c mmc: Switch back to struct platform_driver::remove() 2024-10-14 12:29:01 +02:00
sdhci-of-ma35d1.c mmc: Switch back to struct platform_driver::remove() 2024-10-14 12:29:01 +02:00
sdhci-of-sparx5.c mmc: Switch back to struct platform_driver::remove() 2024-10-14 12:29:01 +02:00
sdhci-omap.c mmc: Switch back to struct platform_driver::remove() 2024-10-14 12:29:01 +02:00
sdhci-pci-arasan.c
sdhci-pci-core.c mmc: sdhci-pci: Add DMI quirk for missing CD GPIO on Vexia Edu Atla 10 tablet 2024-12-02 15:06:03 +01:00
sdhci-pci-dwc-mshc.c
sdhci-pci-gli.c mmc: Merge branch fixes into next 2024-10-28 12:32:09 +01:00
sdhci-pci-o2micro.c mmc: sdhci-pci-o2micro: Convert PCIBIOS_* return codes to errnos 2024-06-20 10:57:44 +02:00
sdhci-pci.h mmc: sdhci-pci: Add DMI quirk for missing CD GPIO on Vexia Edu Atla 10 tablet 2024-12-02 15:06:03 +01:00
sdhci-pic32.c mmc: Switch back to struct platform_driver::remove() 2024-10-14 12:29:01 +02:00
sdhci-pltfm.c mmc: sdhci-pltfm: Make driver OF independent 2023-10-10 15:46:39 +02:00
sdhci-pltfm.h mmc: sdhci-pltfm: Rename sdhci_pltfm_register() 2023-08-15 13:36:02 +02:00
sdhci-pxav2.c mmc: Switch back to struct platform_driver::remove() 2024-10-14 12:29:01 +02:00
sdhci-pxav3.c mmc: Switch back to struct platform_driver::remove() 2024-10-14 12:29:01 +02:00
sdhci-s3c.c mmc: Switch back to struct platform_driver::remove() 2024-10-14 12:29:01 +02:00
sdhci-spear.c mmc: Switch back to struct platform_driver::remove() 2024-10-14 12:29:01 +02:00
sdhci-sprd.c mmc: Switch back to struct platform_driver::remove() 2024-10-14 12:29:01 +02:00
sdhci-st.c mmc: Switch back to struct platform_driver::remove() 2024-10-14 12:29:01 +02:00
sdhci-tegra.c mmc: sdhci-tegra: Remove SDHCI_QUIRK_BROKEN_ADMA_ZEROLEN_DESC quirk 2024-12-10 16:00:07 +01:00
sdhci-uhs2.c mmc: sdhci-uhs2: correction a warning caused by incorrect type in argument 2024-11-04 12:11:17 +01:00
sdhci-uhs2.h mmc: sdhci-uhs2: add irq() and others 2024-10-24 14:37:42 +02:00
sdhci-xenon-phy.c mmc: sdhci-xenon: add timeout for PHY init complete 2024-02-28 13:41:35 +01:00
sdhci-xenon.c mmc: Switch back to struct platform_driver::remove() 2024-10-14 12:29:01 +02:00
sdhci-xenon.h mmc: xenon: Add ac5 support via bounce buffer 2024-01-05 11:03:56 +01:00
sdhci.c mmc: sdhci-uhs2: add request() and others 2024-10-24 14:37:50 +02:00
sdhci.h mmc: sdhci-uhs2: add pre-detect_init hook 2024-10-24 14:37:55 +02:00
sdricoh_cs.c mmc: sdricoh_cs: remove unused sdricoh_readw function 2023-03-24 16:48:01 +01:00
sh_mmcif.c mmc: sh_mmcif: correctly report success when obtaining DMA channels 2024-10-14 12:40:10 +02:00
sunplus-mmc.c mmc: Switch back to struct platform_driver::remove() 2024-10-14 12:29:01 +02:00
sunxi-mmc.c mmc: Merge branch fixes into next 2024-11-12 19:41:24 +01:00
tifm_sd.c mmc: Convert from tasklet to BH workqueue 2024-07-08 11:41:30 +02:00
tmio_mmc_core.c mmc: core: Drop the MMC_RSP_R1_NO_CRC response 2024-12-10 11:18:45 +01:00
tmio_mmc.h mmc: sdhi: Convert from tasklet to BH workqueue 2024-07-08 11:35:18 +02:00
toshsd.c mmc: toshsd: fix return value check of mmc_add_host() 2022-12-07 13:22:34 +01:00
toshsd.h
uniphier-sd.c mmc: Switch back to struct platform_driver::remove() 2024-10-14 12:29:01 +02:00
usdhi6rol0.c mmc: Switch back to struct platform_driver::remove() 2024-10-14 12:29:01 +02:00
ushc.c
via-sdmmc.c mmc: Convert from tasklet to BH workqueue 2024-07-08 11:41:30 +02:00
vub300.c mmc: vub300: fix an error code 2023-11-03 12:04:34 +01:00
wbsd.c mmc: Switch back to struct platform_driver::remove() 2024-10-14 12:29:01 +02:00
wbsd.h mmc: Convert from tasklet to BH workqueue 2024-07-08 11:41:30 +02:00
wmt-sdmmc.c mmc: Switch back to struct platform_driver::remove() 2024-10-14 12:29:01 +02:00