mmc: core: Don't use ->card_busy() and CMD13 in combination when polling
authorUlf Hansson <ulf.hansson@linaro.org>
Wed, 19 Oct 2016 14:15:31 +0000 (16:15 +0200)
committerNitin Garg <nitin.garg@nxp.com>
Mon, 19 Mar 2018 20:36:49 +0000 (15:36 -0500)
commit28ad42b6e13e4eef6f05b1642158943fa4ffd6a6
tree451777494bc5bb3b0c84e2fbb416ebce6aef3c0b
parent79e39050c4307526e53de71f8bdff1f9616554f5
mmc: core: Don't use ->card_busy() and CMD13 in combination when polling

When polling for busy after sending a MMC_SWITCH command, both the optional
->card_busy() callback and CMD13 are being used in conjunction.

This doesn't make sense. Instead it's more reasonable to rely solely on the
->card_busy() callback when it exists. Let's change that and instead use
the CMD13 as a fall-back. In this way we avoid sending CMD13, unless it's
really needed.

Within this context, let's also take the opportunity to make some
additional clean-ups and clarifications to the related code.

Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org>
Acked-by: Jaehoon Chung <jh80.chung@samsung.com>
Tested-by: Jaehoon Chung <jh80.chung@samsung.com>
(cherry picked from commit 70562644f4ee15214986966720ffe82fad03e693)
drivers/mmc/core/mmc_ops.c