summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJaehoon Chung <jh80.chung@samsung.com>2018-01-23 14:04:30 +0900
committerJaehoon Chung <jh80.chung@samsung.com>2018-01-24 16:08:27 +0900
commitc0fafe64a5a8fbbd48c4d3bed730f45dfa6d85b5 (patch)
treefbc5d62799f6af1273f957ddeab69397da884500
parentf35cdb713521f9b192c6df946921d295827c0e9c (diff)
downloadu-boot-c0fafe64a5a8fbbd48c4d3bed730f45dfa6d85b5.tar.gz
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 <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>
-rw-r--r--drivers/mmc/mmc.c2
1 files changed, 1 insertions, 1 deletions
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;