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

Commit a06fbc96 authored by Asutosh Das's avatar Asutosh Das Committed by Stephen Boyd
Browse files

mmc: sdhci-msm: ignore data-end-bit error in 1 bit mode



Some SDHC controllers are unable to handle data end-bit
errors in one bit mode.
This patch adds a quirk to ignore data-end-bit error in
1-bit mode in Qualcomm SDHC controllers.

Change-Id: Ica0f10573d654021449c32197b126e12bb1a3c10
Signed-off-by: default avatarAsutosh Das <asutoshd@codeaurora.org>
parent 0ddfedec
Loading
Loading
Loading
Loading
+2 −0
Original line number Diff line number Diff line
@@ -2477,6 +2477,8 @@ static int sdhci_msm_probe(struct platform_device *pdev)
		host->quirks2 |= SDHCI_QUIRK2_RDWR_TX_ACTIVE_EOT;
	}

	host->quirks2 |= SDHCI_QUIRK2_IGN_DATA_END_BIT_ERROR;

	/* Setup PWRCTL irq */
	msm_host->pwr_irq = platform_get_irq_byname(pdev, "pwr_irq");
	if (msm_host->pwr_irq < 0) {
+2 −0
Original line number Diff line number Diff line
@@ -3749,6 +3749,8 @@ int sdhci_add_host(struct sdhci_host *host)
		host->async_int_supp = true;
	mmc_add_host(mmc);

	if (host->quirks2 & SDHCI_QUIRK2_IGN_DATA_END_BIT_ERROR)
		sdhci_clear_set_irqs(host, SDHCI_INT_DATA_END_BIT, 0);
	pr_info("%s: SDHCI controller on %s [%s] using %s\n",
		mmc_hostname(mmc), host->hw_name, dev_name(mmc_dev(mmc)),
		(host->flags & SDHCI_USE_ADMA) ? "ADMA" :
+5 −0
Original line number Diff line number Diff line
@@ -164,6 +164,11 @@ struct sdhci_host {
 */
#define SDHCI_QUIRK2_DIVIDE_TOUT_BY_4 (1 << 12)

/*
 * Some SDHC controllers are unable to handle data-end bit error in
 * 1-bit mode of SDIO.
 */
#define SDHCI_QUIRK2_IGN_DATA_END_BIT_ERROR             (1<<9)
	int irq;		/* Device IRQ */
	void __iomem *ioaddr;	/* Mapped address */