mmc: sdhci: Disable SD card clock before changing parameters
authorErick Shepherd <erick.shepherd@ni.com>
Thu, 24 Jul 2025 18:53:54 +0000 (13:53 -0500)
committerUlf Hansson <ulf.hansson@linaro.org>
Mon, 18 Aug 2025 09:19:45 +0000 (11:19 +0200)
commit5f755ba95ae10fd4fa28d64345056ffc18d12c5a
tree44e6b6733a84a2b5e348139b7d10214aa350952c
parentc17b750b3ad9f45f2b6f7e6f7f4679844244f0b9
mmc: sdhci: Disable SD card clock before changing parameters

Per the SD Host Controller Simplified Specification v4.20 ยง3.2.3, change
the SD card clock parameters only after first disabling the external card
clock. Doing this fixes a spurious clock pulse on Baytrail and Apollo Lake
SD controllers which otherwise breaks voltage switching with a specific
Swissbit SD card. This change is limited to Intel host controllers to
avoid an issue reported on ARM64 devices.

Signed-off-by: Kyle Roeschley <kyle.roeschley@ni.com>
Signed-off-by: Brad Mouring <brad.mouring@ni.com>
Signed-off-by: Erick Shepherd <erick.shepherd@ni.com>
Acked-by: Adrian Hunter <adrian.hunter@intel.com>
Link: https://lore.kernel.org/r/20250724185354.815888-1-erick.shepherd@ni.com
Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org>
drivers/mmc/host/sdhci-pci-core.c