]> asedeno.scripts.mit.edu Git - linux.git/commitdiff
mmc: sdhci: export sdhci_execute_tuning()
authorMasahiro Yamada <yamada.masahiro@socionext.com>
Thu, 8 Dec 2016 12:50:54 +0000 (21:50 +0900)
committerUlf Hansson <ulf.hansson@linaro.org>
Thu, 8 Dec 2016 14:02:45 +0000 (15:02 +0100)
Some SDHCI-compat controllers support not only SD, but also eMMC,
but they use different commands for tuning: CMD19 for SD, CMD21 for
eMMC.

Due to the difference of the underlying mechanism, some controllers
(at least, the Cadence IP is the case) provide their own registers
for the eMMC tuning.

This commit will be useful when we want to override .execute_tuning
callback (for eMMC HS200 tuning), but still let it fall back to
sdhci_execute_tuning() for SD timing.

Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>
Acked-by: Adrian Hunter <adrian.hunter@intel.com>
Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org>
drivers/mmc/host/sdhci.c
drivers/mmc/host/sdhci.h

index 2b89fb9e9a6b2ff0cbc07ec2d233d0b6cc134735..111991e5b9a0e7ecf587eaf402a5ecd0d2906f55 100644 (file)
@@ -2100,7 +2100,7 @@ static void __sdhci_execute_tuning(struct sdhci_host *host, u32 opcode,
        sdhci_reset_tuning(host);
 }
 
-static int sdhci_execute_tuning(struct mmc_host *mmc, u32 opcode)
+int sdhci_execute_tuning(struct mmc_host *mmc, u32 opcode)
 {
        struct sdhci_host *host = mmc_priv(mmc);
        int err = 0;
@@ -2168,6 +2168,7 @@ static int sdhci_execute_tuning(struct mmc_host *mmc, u32 opcode)
 
        return err;
 }
+EXPORT_SYMBOL_GPL(sdhci_execute_tuning);
 
 static int sdhci_select_drive_strength(struct mmc_card *card,
                                       unsigned int max_dtr, int host_drv,
index 2fe9e8053359afdd9d3e9df0c96a8fa107b8b3cd..0b66f210ae82c5d64f8301a81a6e938a39048b7f 100644 (file)
@@ -690,6 +690,7 @@ void sdhci_set_power_noreg(struct sdhci_host *host, unsigned char mode,
 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);
 
 #ifdef CONFIG_PM
 extern int sdhci_suspend_host(struct sdhci_host *host);