mirror of
https://github.com/AsahiLinux/u-boot
synced 2024-11-28 07:31:15 +00:00
mmc: fix to assign to correct clock value when clock is enabling
When clock is enabling, it's assigned to 0 as mmc->clock.
Then it can't initialize any card.
Fix to assign to correct clock value as mmc->cfg->f_min or f_max.
Fixes: 9546eb92cb
("mmc: fix the wrong disabling clock")
Signed-off-by: Jaehoon Chung <jh80.chung@samsung.com>
Tested-by: Guillaume GARDET <guillaume.gardet@free.fr>
Tested-by: Anand Moon <linux.amoon@gmail.com>
Tested-by: Stephen Warren <swarren@nvidia.com>
This commit is contained in:
parent
f35cdb7135
commit
c0fafe64a5
1 changed files with 1 additions and 1 deletions
|
@ -1501,7 +1501,7 @@ static int mmc_set_ios(struct mmc *mmc)
|
|||
|
||||
int mmc_set_clock(struct mmc *mmc, uint clock, bool disable)
|
||||
{
|
||||
if (!disable && clock != 0) {
|
||||
if (!disable) {
|
||||
if (clock > mmc->cfg->f_max)
|
||||
clock = mmc->cfg->f_max;
|
||||
|
||||
|
|
Loading…
Reference in a new issue