提交 33a57adb 编写于 作者: A Adrian Hunter 提交者: Ulf Hansson

mmc: sdhci: Do not reset cmd or data circuits that are in use

In order to support commands during data transfer, it will be possible to
need to reset the command circuit while the data circuit is in use, and
vice versa. It is now easy to determine whether the command or data circuit
is in use, and so just skip the corresponding reset if it is.
Signed-off-by: NAdrian Hunter <adrian.hunter@intel.com>
Signed-off-by: NUlf Hansson <ulf.hansson@linaro.org>
上级 0293d501
......@@ -986,9 +986,9 @@ static void sdhci_finish_mrq(struct sdhci_host *host, struct mmc_request *mrq)
static void sdhci_finish_data(struct sdhci_host *host)
{
struct mmc_data *data;
struct mmc_command *data_cmd = host->data_cmd;
struct mmc_data *data = host->data;
data = host->data;
host->data = NULL;
host->data_cmd = NULL;
......@@ -1022,6 +1022,7 @@ static void sdhci_finish_data(struct sdhci_host *host)
* upon error conditions.
*/
if (data->error) {
if (!host->cmd || host->cmd == data_cmd)
sdhci_do_reset(host, SDHCI_RESET_CMD);
sdhci_do_reset(host, SDHCI_RESET_DATA);
}
......@@ -2305,7 +2306,9 @@ static bool sdhci_request_done(struct sdhci_host *host)
/* Spec says we should do both at the same time, but Ricoh
controllers do not like that. */
if (!host->cmd)
sdhci_do_reset(host, SDHCI_RESET_CMD);
if (!host->data_cmd)
sdhci_do_reset(host, SDHCI_RESET_DATA);
host->pending_reset = false;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册