* [PATCH] mmc: mmci: stm32: handle mmc power up
@ 2026-10-30 21:53 Marek Vasut
0 siblings, 0 replies; only message in thread
From: Marek Vasut @ 2026-10-30 21:53 UTC (permalink / raw)
To: linux-mmc
Cc: Christophe Kerello, Marek Vasut, Alexandre Torgue,
Maxime Coquelin, Ulf Hansson, kernel, linux-arm-kernel,
linux-kernel, linux-stm32
From: Christophe Kerello <christophe.kerello@foss.st.com>
Manage MMC POWER UP state like MMC POWER OFF state. In case of low
power use cases, it will avoid random initialization timeout. This
fixes a failure to switch DDR52 eMMC to 8 bit mode due to -EILSEQ
returned from mmc_get_ext_csd() in mmc_compare_ext_csds() called
from mmc_select_bus_width() after Standby1 suspend/resume cycle.
Fixes: 46b723dd867d ("mmc: mmci: add stm32 sdmmc variant")
Signed-off-by: Christophe Kerello <christophe.kerello@foss.st.com>
Signed-off-by: Marek Vasut <marex@nabladev.com>
---
Cc: Alexandre Torgue <alexandre.torgue@foss.st.com>
Cc: Christophe Kerello <christophe.kerello@foss.st.com>
Cc: Maxime Coquelin <mcoquelin.stm32@gmail.com>
Cc: Ulf Hansson <ulfh@kernel.org>
Cc: kernel@dh-electronics.com
Cc: linux-arm-kernel@lists.infradead.org
Cc: linux-kernel@vger.kernel.org
Cc: linux-mmc@vger.kernel.org
Cc: linux-stm32@st-md-mailman.stormreply.com
---
Marek: Update commit message
---
drivers/mmc/host/mmci_stm32_sdmmc.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/drivers/mmc/host/mmci_stm32_sdmmc.c b/drivers/mmc/host/mmci_stm32_sdmmc.c
index 9dc51859c2e51..659a5040729e9 100644
--- a/drivers/mmc/host/mmci_stm32_sdmmc.c
+++ b/drivers/mmc/host/mmci_stm32_sdmmc.c
@@ -368,7 +368,8 @@ static void mmci_sdmmc_set_pwrreg(struct mmci_host *host, unsigned int pwr)
if (dlyb && dlyb->ops->set_input_ck)
dlyb->ops->set_input_ck(dlyb);
- if (ios.power_mode == MMC_POWER_OFF) {
+ if (ios.power_mode == MMC_POWER_OFF ||
+ ios.power_mode == MMC_POWER_UP) {
/* Only a reset could power-off sdmmc */
reset_control_assert(host->rst);
udelay(2);
--
2.53.0
^ permalink raw reply related [flat|nested] only message in thread
only message in thread, other threads:[~2026-10-30 21:54 UTC | newest]
Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-10-30 21:53 [PATCH] mmc: mmci: stm32: handle mmc power up Marek Vasut
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox