|
@@ -1196,14 +1196,18 @@ static inline int bus_width(uint cap)
|
|
}
|
|
}
|
|
|
|
|
|
#if !CONFIG_IS_ENABLED(DM_MMC)
|
|
#if !CONFIG_IS_ENABLED(DM_MMC)
|
|
-static void mmc_set_ios(struct mmc *mmc)
|
|
|
|
|
|
+static int mmc_set_ios(struct mmc *mmc)
|
|
{
|
|
{
|
|
|
|
+ int ret = 0;
|
|
|
|
+
|
|
if (mmc->cfg->ops->set_ios)
|
|
if (mmc->cfg->ops->set_ios)
|
|
- mmc->cfg->ops->set_ios(mmc);
|
|
|
|
|
|
+ ret = mmc->cfg->ops->set_ios(mmc);
|
|
|
|
+
|
|
|
|
+ return ret;
|
|
}
|
|
}
|
|
#endif
|
|
#endif
|
|
|
|
|
|
-void mmc_set_clock(struct mmc *mmc, uint clock)
|
|
|
|
|
|
+int mmc_set_clock(struct mmc *mmc, uint clock)
|
|
{
|
|
{
|
|
if (clock > mmc->cfg->f_max)
|
|
if (clock > mmc->cfg->f_max)
|
|
clock = mmc->cfg->f_max;
|
|
clock = mmc->cfg->f_max;
|
|
@@ -1213,14 +1217,14 @@ void mmc_set_clock(struct mmc *mmc, uint clock)
|
|
|
|
|
|
mmc->clock = clock;
|
|
mmc->clock = clock;
|
|
|
|
|
|
- mmc_set_ios(mmc);
|
|
|
|
|
|
+ return mmc_set_ios(mmc);
|
|
}
|
|
}
|
|
|
|
|
|
-static void mmc_set_bus_width(struct mmc *mmc, uint width)
|
|
|
|
|
|
+static int mmc_set_bus_width(struct mmc *mmc, uint width)
|
|
{
|
|
{
|
|
mmc->bus_width = width;
|
|
mmc->bus_width = width;
|
|
|
|
|
|
- mmc_set_ios(mmc);
|
|
|
|
|
|
+ return mmc_set_ios(mmc);
|
|
}
|
|
}
|
|
|
|
|
|
#if CONFIG_IS_ENABLED(MMC_VERBOSE) || defined(DEBUG)
|
|
#if CONFIG_IS_ENABLED(MMC_VERBOSE) || defined(DEBUG)
|