]> git.ipfire.org Git - thirdparty/kernel/stable.git/commit
mmc: sdhci-esdhc-imx: refactor clock loopback selection logic
authorLuke Wang <ziniu.wang_1@nxp.com>
Wed, 21 May 2025 02:55:01 +0000 (10:55 +0800)
committerUlf Hansson <ulf.hansson@linaro.org>
Tue, 24 Jun 2025 10:43:22 +0000 (12:43 +0200)
commit45310531a3e0f5e7467691c5800918068f337775
treebf9651a14f40925928ed40c556ac6be81c3f739a
parent031d9e30d569ca15ca32f64357c83eee6488e09d
mmc: sdhci-esdhc-imx: refactor clock loopback selection logic

i.MX reference manual specifies that internal clock loopback should be
used for SDR104/HS200/HS400 modes. Move ESDHC_MIX_CTRL_FBCLK_SEL
configuration into the timing selection function to:

1. Explicitly set internal loopback path for SDR104/HS200/HS400 modes
2. Avoid redundant bit manipulation across multiple functions

Preserve ESDHC_MIX_CTRL_FBCLK_SEL during system resume for SDIO devices
with MMC_PM_KEEP_POWER and MMC_PM_WAKE_SDIO_IRQ flag, as the controller
might lose register state during suspend while skipping card
re-initialization.

Signed-off-by: Luke Wang <ziniu.wang_1@nxp.com>
Acked-by: Adrian Hunter <adrian.hunter@intel.com>
Link: https://lore.kernel.org/r/20250521025502.112030-1-ziniu.wang_1@nxp.com
Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org>
drivers/mmc/host/sdhci-esdhc-imx.c