summaryrefslogtreecommitdiff
path: root/drivers/mmc/mmc-uclass.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/mmc/mmc-uclass.c')
-rw-r--r--drivers/mmc/mmc-uclass.c48
1 files changed, 33 insertions, 15 deletions
diff --git a/drivers/mmc/mmc-uclass.c b/drivers/mmc/mmc-uclass.c
index a9c8f335c1..551007905c 100644
--- a/drivers/mmc/mmc-uclass.c
+++ b/drivers/mmc/mmc-uclass.c
@@ -47,20 +47,6 @@ int mmc_set_ios(struct mmc *mmc)
return dm_mmc_set_ios(mmc->dev);
}
-void dm_mmc_send_init_stream(struct udevice *dev)
-{
- struct dm_mmc_ops *ops = mmc_get_ops(dev);
-
- if (ops->send_init_stream)
- ops->send_init_stream(dev);
-}
-
-void mmc_send_init_stream(struct mmc *mmc)
-{
- dm_mmc_send_init_stream(mmc->dev);
-}
-
-#if CONFIG_IS_ENABLED(MMC_UHS_SUPPORT)
int dm_mmc_wait_dat0(struct udevice *dev, int state, int timeout)
{
struct dm_mmc_ops *ops = mmc_get_ops(dev);
@@ -74,7 +60,6 @@ int mmc_wait_dat0(struct mmc *mmc, int state, int timeout)
{
return dm_mmc_wait_dat0(mmc->dev, state, timeout);
}
-#endif
int dm_mmc_get_wp(struct udevice *dev)
{
@@ -120,6 +105,23 @@ int mmc_execute_tuning(struct mmc *mmc, uint opcode)
}
#endif
+#if CONFIG_IS_ENABLED(MMC_HS400_ES_SUPPORT)
+int dm_mmc_set_enhanced_strobe(struct udevice *dev)
+{
+ struct dm_mmc_ops *ops = mmc_get_ops(dev);
+
+ if (ops->set_enhanced_strobe)
+ return ops->set_enhanced_strobe(dev);
+
+ return -ENOTSUPP;
+}
+
+int mmc_set_enhanced_strobe(struct mmc *mmc)
+{
+ return dm_mmc_set_enhanced_strobe(mmc->dev);
+}
+#endif
+
int mmc_of_parse(struct udevice *dev, struct mmc_config *cfg)
{
int val;
@@ -170,6 +172,22 @@ int mmc_of_parse(struct udevice *dev, struct mmc_config *cfg)
cfg->host_caps |= MMC_CAP(MMC_HS_400);
if (dev_read_bool(dev, "mmc-hs400-1_2v"))
cfg->host_caps |= MMC_CAP(MMC_HS_400);
+ if (dev_read_bool(dev, "mmc-hs400-enhanced-strobe"))
+ cfg->host_caps |= MMC_CAP(MMC_HS_400_ES);
+
+ if (dev_read_bool(dev, "non-removable")) {
+ cfg->host_caps |= MMC_CAP_NONREMOVABLE;
+ } else {
+ if (dev_read_bool(dev, "cd-inverted"))
+ cfg->host_caps |= MMC_CAP_CD_ACTIVE_HIGH;
+ if (dev_read_bool(dev, "broken-cd"))
+ cfg->host_caps |= MMC_CAP_NEEDS_POLL;
+ }
+
+ if (dev_read_bool(dev, "no-1-8-v")) {
+ cfg->host_caps &= ~(UHS_CAPS | MMC_MODE_HS200 |
+ MMC_MODE_HS400 | MMC_MODE_HS400_ES);
+ }
return 0;
}