summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorKishon Vijay Abraham I <kishon@ti.com>2017-09-21 16:30:05 +0200
committerJaehoon Chung <jh80.chung@samsung.com>2018-01-12 18:11:04 +0900
commitec841209a7d250c1616d56744e1e79acab6c2921 (patch)
tree3dfea8b04f0f76e34e251e618d44fc69d7b7c247 /include
parent2e7410d76ad11856d09284c18d262d0bb2a3da0c (diff)
downloadu-boot-ec841209a7d250c1616d56744e1e79acab6c2921.tar.gz
mmc: Add a execute_tuning() callback to the mmc operations.
Tuning is a mandatory step in the initialization of SDR104 and HS200 modes. This callback execute the tuning process. Signed-off-by: Kishon Vijay Abraham I <kishon@ti.com> Signed-off-by: Jean-Jacques Hiblot <jjhiblot@ti.com>
Diffstat (limited to 'include')
-rw-r--r--include/mmc.h11
1 files changed, 11 insertions, 0 deletions
diff --git a/include/mmc.h b/include/mmc.h
index 8d6e0f8fb0..56fa869ea8 100644
--- a/include/mmc.h
+++ b/include/mmc.h
@@ -383,6 +383,15 @@ struct dm_mmc_ops {
* @return 0 if write-enabled, 1 if write-protected, -ve on error
*/
int (*get_wp)(struct udevice *dev);
+
+ /**
+ * execute_tuning() - Start the tuning process
+ *
+ * @dev: Device to start the tuning
+ * @opcode: Command opcode to send
+ * @return 0 if OK, -ve on error
+ */
+ int (*execute_tuning)(struct udevice *dev, uint opcode);
};
#define mmc_get_ops(dev) ((struct dm_mmc_ops *)(dev)->driver->ops)
@@ -393,12 +402,14 @@ int dm_mmc_set_ios(struct udevice *dev);
void dm_mmc_send_init_stream(struct udevice *dev);
int dm_mmc_get_cd(struct udevice *dev);
int dm_mmc_get_wp(struct udevice *dev);
+int dm_mmc_execute_tuning(struct udevice *dev, uint opcode);
/* Transition functions for compatibility */
int mmc_set_ios(struct mmc *mmc);
void mmc_send_init_stream(struct mmc *mmc);
int mmc_getcd(struct mmc *mmc);
int mmc_getwp(struct mmc *mmc);
+int mmc_execute_tuning(struct mmc *mmc, uint opcode);
#else
struct mmc_ops {