diff options
author | Ulf Hansson <ulf.hansson@linaro.org> | 2018-05-22 10:26:26 -0400 |
---|---|---|
committer | Ulf Hansson <ulf.hansson@linaro.org> | 2018-05-29 06:24:26 -0400 |
commit | c8a4e30d9ac0a7d405c4d26e313af7464ee00929 (patch) | |
tree | 3da5459b4769e9e42310f15d918b4890aa0fd65e | |
parent | e1cb88ad4655dd7484e56c01a05a2986496f56a8 (diff) |
mmc: core: Move calls to ->prepare_hs400_tuning() closer to mmc code
Move the calls to ->prepare_hs400_tuning(), from mmc_retune() into
mmc_hs400_to_hs200(), as it better belongs there, rather than being generic
to all type of cards.
Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org>
Reviewed-by: Simon Horman <horms+renesas@verge.net.au>
-rw-r--r-- | drivers/mmc/core/host.c | 3 | ||||
-rw-r--r-- | drivers/mmc/core/mmc.c | 4 |
2 files changed, 4 insertions, 3 deletions
diff --git a/drivers/mmc/core/host.c b/drivers/mmc/core/host.c index c57ffff18e37..abf9e884386c 100644 --- a/drivers/mmc/core/host.c +++ b/drivers/mmc/core/host.c | |||
@@ -143,9 +143,6 @@ int mmc_retune(struct mmc_host *host) | |||
143 | goto out; | 143 | goto out; |
144 | 144 | ||
145 | return_to_hs400 = true; | 145 | return_to_hs400 = true; |
146 | |||
147 | if (host->ops->prepare_hs400_tuning) | ||
148 | host->ops->prepare_hs400_tuning(host, &host->ios); | ||
149 | } | 146 | } |
150 | 147 | ||
151 | err = mmc_execute_tuning(host->card); | 148 | err = mmc_execute_tuning(host->card); |
diff --git a/drivers/mmc/core/mmc.c b/drivers/mmc/core/mmc.c index 57a8bd39cdde..4466f5de54d4 100644 --- a/drivers/mmc/core/mmc.c +++ b/drivers/mmc/core/mmc.c | |||
@@ -1282,6 +1282,10 @@ int mmc_hs400_to_hs200(struct mmc_card *card) | |||
1282 | 1282 | ||
1283 | mmc_set_bus_speed(card); | 1283 | mmc_set_bus_speed(card); |
1284 | 1284 | ||
1285 | /* Prepare tuning for HS400 mode. */ | ||
1286 | if (host->ops->prepare_hs400_tuning) | ||
1287 | host->ops->prepare_hs400_tuning(host, &host->ios); | ||
1288 | |||
1285 | return 0; | 1289 | return 0; |
1286 | 1290 | ||
1287 | out_err: | 1291 | out_err: |