diff options
author | Ulf Hansson <ulf.hansson@linaro.org> | 2019-06-17 23:41:15 +0200 |
---|---|---|
committer | Ulf Hansson <ulf.hansson@linaro.org> | 2019-07-10 13:18:29 +0200 |
commit | ee550947a0d696f7ddfe88b204d4eae7f879b583 (patch) | |
tree | 45581b58c2adf7f5d178fb410bea818bbd919043 /drivers/mmc/core/sdio.c | |
parent | cd23042d05468ab2e66e0298b46ee90a5f8d9a74 (diff) | |
download | linux-stable-ee550947a0d696f7ddfe88b204d4eae7f879b583.tar.gz linux-stable-ee550947a0d696f7ddfe88b204d4eae7f879b583.tar.bz2 linux-stable-ee550947a0d696f7ddfe88b204d4eae7f879b583.zip |
mmc: sdio: Move comment about re-initialization to mmc_sdio_reinit_card()
The comment in mmc_sdio_power_restore() belongs in mmc_sdio_reinit_card(),
which was created during a previous commit that re-factored some code. Fix
this by moving the comment into mmc_sdio_reinit_card().
Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org>
Reviewed-by: Douglas Anderson <dianders@chromium.org>
Diffstat (limited to 'drivers/mmc/core/sdio.c')
-rw-r--r-- | drivers/mmc/core/sdio.c | 34 |
1 files changed, 17 insertions, 17 deletions
diff --git a/drivers/mmc/core/sdio.c b/drivers/mmc/core/sdio.c index b3303b7d9956..29f86c1e9923 100644 --- a/drivers/mmc/core/sdio.c +++ b/drivers/mmc/core/sdio.c @@ -820,6 +820,23 @@ static int mmc_sdio_reinit_card(struct mmc_host *host, bool powered_resume) { int ret; + /* + * Reset the card by performing the same steps that are taken by + * mmc_rescan_try_freq() and mmc_attach_sdio() during a "normal" probe. + * + * sdio_reset() is technically not needed. Having just powered up the + * hardware, it should already be in reset state. However, some + * platforms (such as SD8686 on OLPC) do not instantly cut power, + * meaning that a reset is required when restoring power soon after + * powering off. It is harmless in other cases. + * + * The CMD5 reset (mmc_send_io_op_cond()), according to the SDIO spec, + * is not necessary for non-removable cards. However, it is required + * for OLPC SD8686 (which expects a [CMD5,5,3,7] init sequence), and + * harmless in other situations. + * + */ + sdio_reset(host); mmc_go_idle(host); mmc_send_if_cond(host, host->card->ocr); @@ -1013,23 +1030,6 @@ static int mmc_sdio_power_restore(struct mmc_host *host) { int ret; - /* - * Reset the card by performing the same steps that are taken by - * mmc_rescan_try_freq() and mmc_attach_sdio() during a "normal" probe. - * - * sdio_reset() is technically not needed. Having just powered up the - * hardware, it should already be in reset state. However, some - * platforms (such as SD8686 on OLPC) do not instantly cut power, - * meaning that a reset is required when restoring power soon after - * powering off. It is harmless in other cases. - * - * The CMD5 reset (mmc_send_io_op_cond()), according to the SDIO spec, - * is not necessary for non-removable cards. However, it is required - * for OLPC SD8686 (which expects a [CMD5,5,3,7] init sequence), and - * harmless in other situations. - * - */ - ret = mmc_sdio_reinit_card(host, mmc_card_keep_power(host)); if (!ret && host->sdio_irqs) mmc_signal_sdio_irq(host); |