diff options
author | Jean-Jacques Hiblot <jjhiblot@ti.com> | 2017-09-21 16:30:07 +0200 |
---|---|---|
committer | Jaehoon Chung <jh80.chung@samsung.com> | 2018-01-12 18:11:04 +0900 |
commit | c10b85d6c25f9ae0cdcf3ec9809a3063e0c3c2c9 (patch) | |
tree | 49d54c8944725cf9f2f9c26020682c7d99069936 /drivers/mmc/mmc-uclass.c | |
parent | 634d48494011fafc615ce613ab9aeeee77a9434d (diff) | |
download | u-boot-c10b85d6c25f9ae0cdcf3ec9809a3063e0c3c2c9.tar.gz u-boot-c10b85d6c25f9ae0cdcf3ec9809a3063e0c3c2c9.tar.bz2 u-boot-c10b85d6c25f9ae0cdcf3ec9809a3063e0c3c2c9.zip |
mmc: Add support for UHS modes
Add UHS modes to the list of supported modes, get the UHS capabilites of
the SDcard and implement the procedure to switch the voltage (UHS modes
use 1v8 IO lines)
During the voltage switch procedure, DAT0 is used by the card to signal
when it's ready. The optional card_busy() callback can be used to get this
information from the host driver.
Signed-off-by: Kishon Vijay Abraham I <kishon@ti.com>
Signed-off-by: Jean-Jacques Hiblot <jjhiblot@ti.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Diffstat (limited to 'drivers/mmc/mmc-uclass.c')
-rw-r--r-- | drivers/mmc/mmc-uclass.c | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/drivers/mmc/mmc-uclass.c b/drivers/mmc/mmc-uclass.c index 60cc0ac4cc..7856e0ad08 100644 --- a/drivers/mmc/mmc-uclass.c +++ b/drivers/mmc/mmc-uclass.c @@ -64,6 +64,20 @@ void mmc_send_init_stream(struct mmc *mmc) dm_mmc_send_init_stream(mmc->dev); } +int dm_mmc_wait_dat0(struct udevice *dev, int state, int timeout) +{ + struct dm_mmc_ops *ops = mmc_get_ops(dev); + + if (!ops->wait_dat0) + return -ENOSYS; + return ops->wait_dat0(dev, state, timeout); +} + +int mmc_wait_dat0(struct mmc *mmc, int state, int timeout) +{ + return dm_mmc_wait_dat0(mmc->dev, state, timeout); +} + int dm_mmc_get_wp(struct udevice *dev) { struct dm_mmc_ops *ops = mmc_get_ops(dev); |