Commit 401059df authored by BOUGH CHEN's avatar BOUGH CHEN Committed by Ulf Hansson
Browse files

mmc: sdhci: correct the maximum timeout when enable CMDQ

Change to use sdhci_set_timeout() to set the maximum timeout, so that
the host can use it's own set_timeout() callback to set the maximum
timeout if the host has.

Signed-off-by: default avatarHaibo Chen <>
Acked-by: default avatarAdrian Hunter <>
Signed-off-by: default avatarUlf Hansson <>
parent 029e2476
......@@ -883,7 +883,7 @@ static u8 sdhci_calc_timeout(struct sdhci_host *host, struct mmc_command *cmd,
bool *too_big)
u8 count;
struct mmc_data *data = cmd->data;
struct mmc_data *data;
unsigned target_timeout, current_timeout;
*too_big = true;
......@@ -897,6 +897,11 @@ static u8 sdhci_calc_timeout(struct sdhci_host *host, struct mmc_command *cmd,
return 0xE;
/* Unspecified command, asume max */
if (cmd == NULL)
return 0xE;
data = cmd->data;
/* Unspecified timeout, assume max */
if (!data && !cmd->busy_timeout)
return 0xE;
......@@ -3364,7 +3369,7 @@ void sdhci_cqe_enable(struct mmc_host *mmc)
/* Set maximum timeout */
sdhci_writeb(host, 0xE, SDHCI_TIMEOUT_CONTROL);
sdhci_set_timeout(host, NULL);
host->ier = host->cqe_ier;
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment