diff mbox series

[U-Boot,v3,07/13] mmc: sdhci: Make sdhci_set_clock() non static

Message ID 20190212085819.31395-8-faiz_abbas@ti.com
State Superseded
Delegated to: Tom Rini
Headers show
Series Add Support for eMMC in AM65x-evm | expand

Commit Message

Faiz Abbas Feb. 12, 2019, 8:58 a.m. UTC
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@ti.com>
Reviewed-by: Tom Rini <trini@konsulko.com>
---
 drivers/mmc/sdhci.c | 2 +-
 include/sdhci.h     | 1 +
 2 files changed, 2 insertions(+), 1 deletion(-)

Comments

Tom Rini April 12, 2019, 4:28 p.m. UTC | #1
On Tue, Feb 12, 2019 at 02:28:13PM +0530, Faiz Abbas wrote:

> 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@ti.com>
> Reviewed-by: Tom Rini <trini@konsulko.com>

Applied to u-boot/master, thanks!
diff mbox series

Patch

diff --git a/drivers/mmc/sdhci.c b/drivers/mmc/sdhci.c
index c8a8a299ba..635f5396c4 100644
--- a/drivers/mmc/sdhci.c
+++ b/drivers/mmc/sdhci.c
@@ -327,7 +327,7 @@  static int sdhci_execute_tuning(struct udevice *dev, uint opcode)
 	return 0;
 }
 #endif
-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 bef37df982..6cbba8f57a 100644
--- a/include/sdhci.h
+++ b/include/sdhci.h
@@ -426,6 +426,7 @@  int add_sdhci(struct sdhci_host *host, u32 f_max, u32 f_min);
 #ifdef CONFIG_DM_MMC
 /* 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;
 #else
 #endif