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

Commit fef20d9b authored by Ram Prakash Gupta's avatar Ram Prakash Gupta
Browse files

mmc: sdhci: Use max timeout and skip timeout calculation



Several data-timeout issues were seen, most of which were
due to the card taking a longer time to respond. This patch
increases the timeout of the controller to 0xF i.e. max
possible.

Change-Id: I54c095cdfff55b444c94e7188df8859727cb9675
Signed-off-by: default avatarAsutosh Das <asutoshd@codeaurora.org>
Signed-off-by: default avatarRam Prakash Gupta <rampraka@codeaurora.org>
parent 7c1061b2
Loading
Loading
Loading
Loading
+6 −0
Original line number Diff line number Diff line
@@ -894,6 +894,12 @@ 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);