mmc: sdhci: Move busy signal handling into sdhci_finish_cmd()
authorAdrian Hunter <adrian.hunter@intel.com>
Wed, 29 Jun 2016 13:24:20 +0000 (16:24 +0300)
committerUlf Hansson <ulf.hansson@linaro.org>
Mon, 25 Jul 2016 08:34:36 +0000 (10:34 +0200)
commit6bde868181dd98aef14ac3ba02a3216b40466867
tree5d1e3004d60a141c07446eaa0bac910f602919e2
parent00884b61fb3968da088f7bf26eef9b90233b69df
mmc: sdhci: Move busy signal handling into sdhci_finish_cmd()

In order to support commands during data transfer, command and data
handling needs to be untangled.

That means sdhci_finish_cmd() must not be called from the data IRQ
handler. It is being called because of busy signal handling, which
is treating the command as not finished until the busy signal is
released.

Instead, move busy signal handling from sdhci_cmd_irq() into
sdhci_finish_cmd(). Then the data IRQ handler does not need to call
sdhci_finish_cmd() and can instead finish the request.

What this means in practice for a command with busy signaling, is that
the command response is read from the host controller when the command
complete interrupt is received, thus freeing up the command circuit for
other commands.

Signed-off-by: Adrian Hunter <adrian.hunter@intel.com>
Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org>
drivers/mmc/host/sdhci.c