]> git.baikalelectronics.ru Git - kernel.git/commit
mmc: dw_mmc: Don't start commands while busy
authorDoug Anderson <dianders@chromium.org>
Fri, 20 Feb 2015 20:31:56 +0000 (12:31 -0800)
committerUlf Hansson <ulf.hansson@linaro.org>
Mon, 23 Mar 2015 13:13:30 +0000 (14:13 +0100)
commit4c2d338461046143e294858734a3219a3c27705c
tree3f4d6b083a0605215a82f82d703ca13036cc76e5
parent482a7c60a43a6a481fcd318e0ae1f8e018f3ff1f
mmc: dw_mmc: Don't start commands while busy

We've seen problems on some WiFi modules where we seem to send a CMD53
(which requires the data lines) while the module is asserting busy.
We shouldn't do that.

The Designware Databook says that before issuing a new data transfer
command we should check for busy, so that's what we'll do.

We'll leverage the existing dw_mmc knowledge about whether it should
wait for the previous command to finish to know whether we should
check for busy before sending the command.  This means we won't end up
incorrectly waiting for things like CMD52 (SDIO) or CMD13 (SD) which
don't use the data line.

Note that this also has the advantage of making sure that we don't
change the clock while the card is busy, too.

Signed-off-by: Doug Anderson <dianders@chromium.org>
Tested-by: Javier Martinez Canillas <javier.martinez@collabora.co.uk>
Signed-off-by: Jaehoon Chung <jh80.chung@samsung.com>
Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org>
drivers/mmc/host/dw_mmc.c