[U-Boot] [PATCH v8 05/14] mmc: sdhci: Make sdhci_set_clock() non static

Faiz Abbas faiz_abbas at ti.com
Mon Jun 10 19:13:35 UTC 2019

The am654_sdhci driver needs to switch the clock off
before disabling its phy dll and needs to re-enable
the clock before enabling the phy again.

Therefore, make the sdhci_set_clock() function accessible
in the am654_sdhci driver.

Signed-off-by: Faiz Abbas <faiz_abbas at ti.com>
Reviewed-by: Tom Rini <trini at konsulko.com>
 drivers/mmc/sdhci.c | 2 +-
 include/sdhci.h     | 1 +
 2 files changed, 2 insertions(+), 1 deletion(-)

diff --git a/drivers/mmc/sdhci.c b/drivers/mmc/sdhci.c
index 666b2cbaa5..27706e5b88 100644
--- a/drivers/mmc/sdhci.c
+++ b/drivers/mmc/sdhci.c
@@ -409,7 +409,7 @@ static int sdhci_execute_tuning(struct udevice *dev, uint opcode)
 	return 0;
-static int sdhci_set_clock(struct mmc *mmc, unsigned int clock)
+int sdhci_set_clock(struct mmc *mmc, unsigned int clock)
 	struct sdhci_host *host = mmc->priv;
 	unsigned int div, clk = 0, timeout;
diff --git a/include/sdhci.h b/include/sdhci.h
index eee493ab5f..820cd16e92 100644
--- a/include/sdhci.h
+++ b/include/sdhci.h
@@ -470,6 +470,7 @@ int add_sdhci(struct sdhci_host *host, u32 f_max, u32 f_min);
 /* Export the operations to drivers */
 int sdhci_probe(struct udevice *dev);
+int sdhci_set_clock(struct mmc *mmc, unsigned int clock);
 extern const struct dm_mmc_ops sdhci_ops;

More information about the U-Boot mailing list