]> git.ipfire.org Git - thirdparty/kernel/stable.git/commit
mmc: sdhci-msm: Avoid early clock doubling during HS400 transition
authorSarthak Garg <sarthak.garg@oss.qualcomm.com>
Fri, 14 Nov 2025 08:28:24 +0000 (13:58 +0530)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Mon, 19 Jan 2026 12:09:48 +0000 (13:09 +0100)
commitd685237855bf0f27fe2ac9c321374ead30e744c8
treea33a1e482a593ccf72f940f7ef1ef117ab4ae1df
parent3fd7df4636d8fd5e3592371967a5941204368936
mmc: sdhci-msm: Avoid early clock doubling during HS400 transition

commit b1f856b1727c2eaa4be2c6d7cd7a8ed052bbeb87 upstream.

According to the hardware programming guide, the clock frequency must
remain below 52MHz during the transition to HS400 mode.

However,in the current implementation, the timing is set to HS400 (a
DDR mode) before adjusting the clock. This causes the clock to double
prematurely to 104MHz during the transition phase, violating the
specification and potentially resulting in CRC errors or CMD timeouts.

This change ensures that clock doubling is avoided during intermediate
transitions and is applied only when the card requires a 200MHz clock
for HS400 operation.

Signed-off-by: Sarthak Garg <sarthak.garg@oss.qualcomm.com>
Reviewed-by: Bjorn Andersson <andersson@kernel.org>
Acked-by: Adrian Hunter <adrian.hunter@intel.com>
Cc: stable@vger.kernel.org
Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/mmc/host/sdhci-msm.c