Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit f565dc42 authored by qctecmdr's avatar qctecmdr Committed by Gerrit - the friendly Code Review server
Browse files

Merge "mmc: host: Use max timeout supported by sdcc"

parents fac73e20 f3bc95e7
Loading
Loading
Loading
Loading
+3 −9
Original line number Diff line number Diff line
@@ -892,12 +892,6 @@ static u8 sdhci_calc_timeout(struct sdhci_host *host, struct mmc_command *cmd,
	if (!data && !cmd->busy_timeout)
		return 0xE;

	/* During initialization, don't use max timeout as the clock is slow */
	if ((host->quirks2 & SDHCI_QUIRK2_USE_RESERVED_MAX_TIMEOUT) &&
		(host->clock > 400000)) {
		return 0xF;
	}

	/* timeout in us */
	target_timeout = sdhci_target_timeout(host, cmd, data);

@@ -927,9 +921,9 @@ static u8 sdhci_calc_timeout(struct sdhci_host *host, struct mmc_command *cmd,
			break;
	}

	if (count >= 0xF) {
		if (!(host->quirks2 & SDHCI_QUIRK2_DISABLE_HW_TIMEOUT) ||
		    !(host->quirks2 & SDHCI_QUIRK2_USE_RESERVED_MAX_TIMEOUT))
	if (count >= 0xF &&
		!(host->quirks2 & SDHCI_QUIRK2_USE_RESERVED_MAX_TIMEOUT)) {
		if (!(host->quirks2 & SDHCI_QUIRK2_DISABLE_HW_TIMEOUT))
			DBG("Too large timeout 0x%x requested for CMD%d!\n",
			    count, cmd->opcode);
		count = 0xE;