]> www.infradead.org Git - users/jedix/linux-maple.git/commit
mmc: sdhci-of-arasan: Ensure CD logic stabilization before power-up
authorSai Krishna Potthuri <sai.krishna.potthuri@amd.com>
Wed, 30 Jul 2025 06:05:43 +0000 (11:35 +0530)
committerUlf Hansson <ulf.hansson@linaro.org>
Mon, 18 Aug 2025 09:43:27 +0000 (11:43 +0200)
commite251709aaddb3ee1e8ac1ed5e361a608a1cc92de
tree611f7799c299f43aa8a46c25b1e1468764f622e5
parent340be332e420ed37d15d4169a1b4174e912ad6cb
mmc: sdhci-of-arasan: Ensure CD logic stabilization before power-up

During SD suspend/resume without a full card rescan (when using
non-removable SD cards for rootfs), the SD card initialization may fail
after resume. This occurs because, after a host controller reset, the
card detect logic may take time to stabilize due to debounce logic.
Without waiting for stabilization, the host may attempt powering up the
card prematurely, leading to command timeouts during resume flow.
Add sdhci_arasan_set_power_and_bus_voltage() to wait for the card detect
stable bit before power up the card. Since the stabilization time
is not fixed, a maximum timeout of one second is used to ensure
sufficient wait time for the card detect signal to stabilize.

Signed-off-by: Sai Krishna Potthuri <sai.krishna.potthuri@amd.com>
Cc: stable@vger.kernel.org
Link: https://lore.kernel.org/r/20250730060543.1735971-1-sai.krishna.potthuri@amd.com
Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org>
drivers/mmc/host/sdhci-of-arasan.c