mmc: sdhci: Get rid of host->busy_handle
Now that there is host->data_cmd to record the command for which a data interrupt is expected, it is possible to determine whether a command with busy signaling has completed without an extra flag. So host->busy_handle is not needed. Remove it. Signed-off-by: Adrian Hunter <adrian.hunter@intel.com> Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org>
This commit is contained in:
parent
7c89a3d908
commit
ea96802384
|
@ -1014,7 +1014,6 @@ void sdhci_send_command(struct sdhci_host *host, struct mmc_command *cmd)
|
||||||
mod_timer(&host->timer, timeout);
|
mod_timer(&host->timer, timeout);
|
||||||
|
|
||||||
host->cmd = cmd;
|
host->cmd = cmd;
|
||||||
host->busy_handle = 0;
|
|
||||||
if (cmd->data || cmd->flags & MMC_RSP_BUSY) {
|
if (cmd->data || cmd->flags & MMC_RSP_BUSY) {
|
||||||
WARN_ON(host->data_cmd);
|
WARN_ON(host->data_cmd);
|
||||||
host->data_cmd = cmd;
|
host->data_cmd = cmd;
|
||||||
|
@ -1094,9 +1093,8 @@ static void sdhci_finish_command(struct sdhci_host *host)
|
||||||
if (cmd->data) {
|
if (cmd->data) {
|
||||||
DBG("Cannot wait for busy signal when also doing a data transfer");
|
DBG("Cannot wait for busy signal when also doing a data transfer");
|
||||||
} else if (!(host->quirks & SDHCI_QUIRK_NO_BUSY_IRQ) &&
|
} else if (!(host->quirks & SDHCI_QUIRK_NO_BUSY_IRQ) &&
|
||||||
!host->busy_handle) {
|
cmd == host->data_cmd) {
|
||||||
/* Mark that command complete before busy is ended */
|
/* Command complete before busy is ended */
|
||||||
host->busy_handle = 1;
|
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -2393,10 +2391,10 @@ static void sdhci_data_irq(struct sdhci_host *host, u32 intmask)
|
||||||
* before the command completed, so make
|
* before the command completed, so make
|
||||||
* sure we do things in the proper order.
|
* sure we do things in the proper order.
|
||||||
*/
|
*/
|
||||||
if (host->busy_handle)
|
if (host->cmd == data_cmd)
|
||||||
tasklet_schedule(&host->finish_tasklet);
|
return;
|
||||||
else
|
|
||||||
host->busy_handle = 1;
|
tasklet_schedule(&host->finish_tasklet);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -469,7 +469,6 @@ struct sdhci_host {
|
||||||
struct mmc_command *data_cmd; /* Current data command */
|
struct mmc_command *data_cmd; /* Current data command */
|
||||||
struct mmc_data *data; /* Current data request */
|
struct mmc_data *data; /* Current data request */
|
||||||
unsigned int data_early:1; /* Data finished before cmd */
|
unsigned int data_early:1; /* Data finished before cmd */
|
||||||
unsigned int busy_handle:1; /* Handling the order of Busy-end */
|
|
||||||
|
|
||||||
struct sg_mapping_iter sg_miter; /* SG state for PIO */
|
struct sg_mapping_iter sg_miter; /* SG state for PIO */
|
||||||
unsigned int blocks; /* remaining PIO blocks */
|
unsigned int blocks; /* remaining PIO blocks */
|
||||||
|
|
Loading…
Reference in New Issue