[U-Boot] [PATCH 1/2] mmc: Export {sd,mmc}_select_mode_and_width()
Marek Vasut
marek.vasut at gmail.com
Wed Feb 6 13:10:51 UTC 2019
Make {sd,mmc}_select_mode_and_width() functions available to drivers,
so that they can call these functions to reconfigure SD/MMC mode if
necessary.
Signed-off-by: Marek Vasut <marek.vasut+renesas at gmail.com>
---
drivers/mmc/mmc.c | 8 ++------
drivers/mmc/mmc_private.h | 4 ++++
2 files changed, 6 insertions(+), 6 deletions(-)
diff --git a/drivers/mmc/mmc.c b/drivers/mmc/mmc.c
index 84d157ff40..c7730c9233 100644
--- a/drivers/mmc/mmc.c
+++ b/drivers/mmc/mmc.c
@@ -23,10 +23,6 @@
static int mmc_set_signal_voltage(struct mmc *mmc, uint signal_voltage);
static int mmc_power_cycle(struct mmc *mmc);
-#if !CONFIG_IS_ENABLED(MMC_TINY)
-static int mmc_select_mode_and_width(struct mmc *mmc, uint card_caps);
-#endif
-
#if !CONFIG_IS_ENABLED(DM_MMC)
#if CONFIG_IS_ENABLED(MMC_UHS_SUPPORT)
@@ -1643,7 +1639,7 @@ static const struct mode_width_tuning sd_modes_by_pref[] = {
mwt++) \
if (caps & MMC_CAP(mwt->mode))
-static int sd_select_mode_and_width(struct mmc *mmc, uint card_caps)
+int sd_select_mode_and_width(struct mmc *mmc, uint card_caps)
{
int err;
uint widths[] = {MMC_MODE_4BIT, MMC_MODE_1BIT};
@@ -1912,7 +1908,7 @@ static int mmc_select_hs400(struct mmc *mmc)
ecbv++) \
if ((ddr == ecbv->is_ddr) && (caps & ecbv->cap))
-static int mmc_select_mode_and_width(struct mmc *mmc, uint card_caps)
+int mmc_select_mode_and_width(struct mmc *mmc, uint card_caps)
{
int err;
const struct mode_width_tuning *mwt;
diff --git a/drivers/mmc/mmc_private.h b/drivers/mmc/mmc_private.h
index f49b6eb573..7198baf4fd 100644
--- a/drivers/mmc/mmc_private.h
+++ b/drivers/mmc/mmc_private.h
@@ -18,6 +18,10 @@ extern int mmc_set_blocklen(struct mmc *mmc, int len);
#ifdef CONFIG_FSL_ESDHC_ADAPTER_IDENT
void mmc_adapter_card_type_ident(void);
#endif
+#if !CONFIG_IS_ENABLED(MMC_TINY)
+int sd_select_mode_and_width(struct mmc *mmc, uint card_caps);
+int mmc_select_mode_and_width(struct mmc *mmc, uint card_caps);
+#endif
#if CONFIG_IS_ENABLED(BLK)
ulong mmc_bread(struct udevice *dev, lbaint_t start, lbaint_t blkcnt,
--
2.19.2
More information about the U-Boot
mailing list