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

Commit 976e8cb3 authored by Venkat Gopalakrishnan's avatar Venkat Gopalakrishnan Committed by Xiaonian Wang
Browse files

mmc: sdhci: Panic after dumping SDHC registers



eMMC CMDQ is pretty latest feature and we may continue to see issues
due to HW & SW immaturity. To debug these issues, we should have the
host controller register dumps along with current SW state from rampdumps.
This change adds the BUG_ON to crash the system in case of eMMC related
command timeouts.

Change-Id: Ib832aef6eb9ef3941fbe9e73852929c835e97847
Signed-off-by: default avatarVenkat Gopalakrishnan <venkatg@codeaurora.org>
[subhashj@codeaurora.org: fixed trivial merge conflicts]
Signed-off-by: default avatarSubhash Jadavani <subhashj@codeaurora.org>
parent b3994408
Loading
Loading
Loading
Loading
+3 −1
Original line number Diff line number Diff line
@@ -3789,8 +3789,10 @@ static int sdhci_msm_probe(struct platform_device *pdev)
			goto pltfm_free;
		}

		if (ret <= 2)
		if (ret <= 2) {
			sdhci_slot[ret-1] = msm_host;
			host->slot_no = ret;
		}

		msm_host->pdata = sdhci_msm_populate_pdata(&pdev->dev,
							   msm_host);
+2 −0
Original line number Diff line number Diff line
@@ -152,6 +152,8 @@ static void sdhci_dumpregs(struct sdhci_host *host)
		host->ops->dump_vendor_regs(host);
	sdhci_dump_state(host);
	pr_info(DRIVER_NAME ": ===========================================\n");
	if (host->slot_no == 1)
		BUG_ON(1);
}

/*****************************************************************************\
+2 −0
Original line number Diff line number Diff line
@@ -624,6 +624,8 @@ struct sdhci_host {
	ktime_t reset_wa_t; /* time when the reset workaround is applied */
	int reset_wa_cnt; /* total number of times workaround is used */

	int slot_no;

	unsigned long private[0] ____cacheline_aligned;
};