mmc: sdhci: add __sdhci_execute_tuning() to header 98/307398/1
authorDrew Fustini <dfustini@baylibre.com>
Fri, 10 Nov 2023 05:41:12 +0000 (21:41 -0800)
committerJaehoon Chung <jh80.chung@samsung.com>
Fri, 8 Mar 2024 04:50:04 +0000 (13:50 +0900)
Expose __sdhci_execute_tuning() so that it can be called from the
mmc host controller drivers.

In the sdhci-of-dwcmshc driver, sdhci_dwcmshc_th1520_ops sets
platform_execute_tuning to th1520_execute_tuning(). That function has
to manipulate phy registers before tuning can be performed. To avoid
copying the code verbatim from __sdhci_execute_tuning() into
th1520_execute_tuning(), make it possible for __sdhci_execute_tuning()
to be called from sdhci-of-dwcmshc.

Acked-by: Adrian Hunter <adrian.hunter@intel.com>
Signed-off-by: Drew Fustini <dfustini@baylibre.com>
Link: https://lore.kernel.org/r/20231109-th1520-mmc-v5-2-018bd039cf17@baylibre.com
Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org>
(cherry picked from commit 9cc811a342be78270d20d1fff3832bc0b23ef364)
Signed-off-by: Jaehoon Chung <jh80.chung@samsung.com>
Change-Id: I09c16cb610ab20299155797e87484e814b126dbf

drivers/mmc/host/sdhci.c
drivers/mmc/host/sdhci.h

index ff41aa56564eaac0bada1efdb687731d7bf69474..c79f73459915d42052d292cce3030729623451dc 100644 (file)
@@ -2841,7 +2841,7 @@ void sdhci_send_tuning(struct sdhci_host *host, u32 opcode)
 }
 EXPORT_SYMBOL_GPL(sdhci_send_tuning);
 
-static int __sdhci_execute_tuning(struct sdhci_host *host, u32 opcode)
+int __sdhci_execute_tuning(struct sdhci_host *host, u32 opcode)
 {
        int i;
 
@@ -2879,6 +2879,7 @@ static int __sdhci_execute_tuning(struct sdhci_host *host, u32 opcode)
        sdhci_reset_tuning(host);
        return -EAGAIN;
 }
+EXPORT_SYMBOL_GPL(__sdhci_execute_tuning);
 
 int sdhci_execute_tuning(struct mmc_host *mmc, u32 opcode)
 {
index f219bdea8f280d6ffb647ff4ac8523a13c6214c3..a20864fc0641270ff1d28459b1de2c8e836d0784 100644 (file)
@@ -793,6 +793,7 @@ void sdhci_set_bus_width(struct sdhci_host *host, int width);
 void sdhci_reset(struct sdhci_host *host, u8 mask);
 void sdhci_set_uhs_signaling(struct sdhci_host *host, unsigned timing);
 int sdhci_execute_tuning(struct mmc_host *mmc, u32 opcode);
+int __sdhci_execute_tuning(struct sdhci_host *host, u32 opcode);
 void sdhci_set_ios(struct mmc_host *mmc, struct mmc_ios *ios);
 int sdhci_start_signal_voltage_switch(struct mmc_host *mmc,
                                      struct mmc_ios *ios);