mmc: sdhci: Move the code related to setting the clock from sdhci_set_ios_common...
authorBen Chuang <ben.chuang@genesyslogic.com.tw>
Thu, 11 Sep 2025 02:40:20 +0000 (10:40 +0800)
committerUlf Hansson <ulf.hansson@linaro.org>
Fri, 12 Sep 2025 13:00:52 +0000 (15:00 +0200)
commit7b7e71683b4ccbe0dbd7d434707623327e852f20
treea55a35ffcfaa52ae2460082c1745a1a21bec2a55
parent8ab2f1c35669bff7d7ed1bb16bf5cc989b3e2e17
mmc: sdhci: Move the code related to setting the clock from sdhci_set_ios_common() into sdhci_set_ios()

The sdhci_set_clock() is called in sdhci_set_ios_common() and
__sdhci_uhs2_set_ios(). According to Section 3.13.2 "Card Interface
Detection Sequence" of the SD Host Controller Standard Specification
Version 7.00, the SD clock is supplied after power is supplied, so we only
need one in __sdhci_uhs2_set_ios(). Let's move the code related to setting
the clock from sdhci_set_ios_common() into sdhci_set_ios() and modify
the parameters passed to sdhci_set_clock() in __sdhci_uhs2_set_ios().

Fixes: 10c8298a052b ("mmc: sdhci-uhs2: add set_ios()")
Cc: stable@vger.kernel.org # v6.13+
Signed-off-by: Ben Chuang <ben.chuang@genesyslogic.com.tw>
Acked-by: Adrian Hunter <adrian.hunter@intel.com>
Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org>
drivers/mmc/host/sdhci-uhs2.c
drivers/mmc/host/sdhci.c