aboutsummaryrefslogtreecommitdiff
path: root/include/mmc.h
diff options
context:
space:
mode:
authorYangbo Lu2020-09-01 16:58:04 +0800
committerPeng Fan2020-10-12 15:46:34 +0800
commitd271e10581e7f15451e9d4c3cdd39044440a848a (patch)
tree0d1d90084cc5c89957fd5aa4e9603962e36dd934 /include/mmc.h
parent8c96880814b23b5e17b5e7d350ea6066dae54bc6 (diff)
mmc: add a mmc_hs400_prepare_ddr() interface
Add a mmc_hs400_prepare_ddr() interface for controllers which needs preparation before switching to DDR mode for HS400 mode. Signed-off-by: Yangbo Lu <yangbo.lu@nxp.com>
Diffstat (limited to 'include/mmc.h')
-rw-r--r--include/mmc.h15
1 files changed, 14 insertions, 1 deletions
diff --git a/include/mmc.h b/include/mmc.h
index bea1c491512..ac7b54f1a7e 100644
--- a/include/mmc.h
+++ b/include/mmc.h
@@ -513,6 +513,14 @@ struct dm_mmc_ops {
* @return maximum number of blocks for this transfer
*/
int (*get_b_max)(struct udevice *dev, void *dst, lbaint_t blkcnt);
+
+ /**
+ * hs400_prepare_ddr - prepare to switch to DDR mode
+ *
+ * @dev: Device to check
+ * @return 0 if success, -ve on error
+ */
+ int (*hs400_prepare_ddr)(struct udevice *dev);
};
#define mmc_get_ops(dev) ((struct dm_mmc_ops *)(dev)->driver->ops)
@@ -540,7 +548,7 @@ int mmc_host_power_cycle(struct mmc *mmc);
int mmc_deferred_probe(struct mmc *mmc);
int mmc_reinit(struct mmc *mmc);
int mmc_get_b_max(struct mmc *mmc, void *dst, lbaint_t blkcnt);
-
+int mmc_hs400_prepare_ddr(struct mmc *mmc);
#else
struct mmc_ops {
int (*send_cmd)(struct mmc *mmc,
@@ -552,6 +560,11 @@ struct mmc_ops {
int (*host_power_cycle)(struct mmc *mmc);
int (*get_b_max)(struct mmc *mmc, void *dst, lbaint_t blkcnt);
};
+
+static inline int mmc_hs400_prepare_ddr(struct mmc *mmc)
+{
+ return 0;
+}
#endif
struct mmc_config {