From c0fafe64a5a8fbbd48c4d3bed730f45dfa6d85b5 Mon Sep 17 00:00:00 2001 From: Jaehoon Chung Date: Tue, 23 Jan 2018 14:04:30 +0900 Subject: 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: 9546eb92cb6 ("mmc: fix the wrong disabling clock") Signed-off-by: Jaehoon Chung Tested-by: Guillaume GARDET Tested-by: Anand Moon Tested-by: Stephen Warren --- drivers/mmc/mmc.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'drivers/mmc/mmc.c') diff --git a/drivers/mmc/mmc.c b/drivers/mmc/mmc.c index 311f51f237..2d0e7bb3a2 100644 --- a/drivers/mmc/mmc.c +++ b/drivers/mmc/mmc.c @@ -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; -- cgit v1.2.3