diff options
author | Aswath Govindraju <a-govindraju@ti.com> | 2021-08-13 20:34:41 +0300 |
---|---|---|
committer | Peng Fan <peng.fan@nxp.com> | 2021-09-10 13:17:04 +0300 |
commit | 19f7a34a4642e25aa8b80c6d75129fe7848a158d (patch) | |
tree | 74c326eca33b00ff58048c052749f9452725fc13 /drivers/mmc/mmc-uclass.c | |
parent | 4a3ea75de4c5b3053eac326bf1c753ed65df8cb9 (diff) | |
download | u-boot-19f7a34a4642e25aa8b80c6d75129fe7848a158d.tar.xz |
mmc: Add support for enumerating MMC card in a given mode using mmc command
Add support for enumerating MMC card in a given mode using mmc rescan and
mmc dev commands. The speed mode is provided as the last argument in these
commands and is indicated using the index from enum bus_mode in
include/mmc.h. A speed mode can be set only if it has already been enabled
in the device tree.
Signed-off-by: Aswath Govindraju <a-govindraju@ti.com>
Reviewed-by: Jaehoon Chung <jh80.chung@samsung.com>
Tested-by: Jaehoon Chung <jh80.chung@samsung.com>
Diffstat (limited to 'drivers/mmc/mmc-uclass.c')
-rw-r--r-- | drivers/mmc/mmc-uclass.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/drivers/mmc/mmc-uclass.c b/drivers/mmc/mmc-uclass.c index 0e13238c7e..3ee92d03ca 100644 --- a/drivers/mmc/mmc-uclass.c +++ b/drivers/mmc/mmc-uclass.c @@ -342,6 +342,9 @@ void mmc_do_preinit(void) if (!m) continue; + + m->user_speed_mode = MMC_MODES_END; /* Initialising user set speed mode */ + if (m->preinit) mmc_start_init(m); } @@ -414,7 +417,7 @@ int mmc_bind(struct udevice *dev, struct mmc *mmc, const struct mmc_config *cfg) /* setup initial part type */ bdesc->part_type = cfg->part_type; mmc->dev = dev; - + mmc->user_speed_mode = MMC_MODES_END; return 0; } |