diff options
author | Loic Poulain <loic.poulain@linaro.org> | 2022-05-26 16:37:21 +0200 |
---|---|---|
committer | Jaehoon Chung <jh80.chung@samsung.com> | 2022-06-15 15:39:56 +0900 |
commit | d6ad5a0af9e6a12f47008141259f77b568c73ab2 (patch) | |
tree | 838b7cfc31fed81c09e4c65ab8d0c5cf6fa10d5c /drivers | |
parent | d72267049b484577294e17140b369dee339b2352 (diff) | |
download | u-boot-d6ad5a0af9e6a12f47008141259f77b568c73ab2.zip u-boot-d6ad5a0af9e6a12f47008141259f77b568c73ab2.tar.gz u-boot-d6ad5a0af9e6a12f47008141259f77b568c73ab2.tar.bz2 |
mmc: Add support for wait_dat0 callback
There is no wait_dat0 mmc ops, causing operations waiting for data
line state change (e.g mmc_switch_voltage) to fallback to a 250ms
active delay. mmc_ops still used when DM_MMC is not enabled, which
is often the case for SPL. The result can be unexpectly long SPL
boot time.
This change adds support for wait_dat0() mmc operation.
Signed-off-by: Loic Poulain <loic.poulain@linaro.org>
Reviewed-by: Jaehoon Chung <jh80.chung@samsung.com>
Diffstat (limited to 'drivers')
-rw-r--r-- | drivers/mmc/mmc.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/drivers/mmc/mmc.c b/drivers/mmc/mmc.c index 8a7d073..12d29da 100644 --- a/drivers/mmc/mmc.c +++ b/drivers/mmc/mmc.c @@ -34,6 +34,9 @@ static int mmc_set_signal_voltage(struct mmc *mmc, uint signal_voltage); static int mmc_wait_dat0(struct mmc *mmc, int state, int timeout_us) { + if (mmc->cfg->ops->wait_dat0) + return mmc->cfg->ops->wait_dat0(mmc, state, timeout_us); + return -ENOSYS; } |