summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorVenkat Gopalakrishnan <venkatg@codeaurora.org>2015-05-29 17:56:59 -0700
committerSubhash Jadavani <subhashj@codeaurora.org>2016-05-31 15:26:31 -0700
commit6761d88e7ca29809794434fdf08fe7101ac3e617 (patch)
tree01961a4a9e63acae6d4769b2b1ca5895ccf4da86
parent11bb322287709984f829ca51e65a929cd8fb7f9c (diff)
mmc: sdhci-msm: do not disable test-bus
There is a hardware ring-buffer that logs the commands sent and doorbells rung. This is helpful for debugging in case of errors. This requires that the testbus be enabled. Hence don't disable testbus. Change-Id: I9c2fa984740aa9a0f8135d2196be6b3639ec22d1 Signed-off-by: Asutosh Das <asutoshd@codeaurora.org> Signed-off-by: Venkat Gopalakrishnan <venkatg@codeaurora.org>
-rw-r--r--drivers/mmc/host/sdhci-msm.c20
1 files changed, 17 insertions, 3 deletions
diff --git a/drivers/mmc/host/sdhci-msm.c b/drivers/mmc/host/sdhci-msm.c
index c5c2881556a7..dbcada1583bb 100644
--- a/drivers/mmc/host/sdhci-msm.c
+++ b/drivers/mmc/host/sdhci-msm.c
@@ -2732,9 +2732,6 @@ void sdhci_msm_dump_vendor_regs(struct sdhci_host *host)
pr_info(" Test bus[%d to %d]: 0x%08x 0x%08x 0x%08x 0x%08x\n",
i, i + 3, debug_reg[i], debug_reg[i+1],
debug_reg[i+2], debug_reg[i+3]);
- /* Disable test bus */
- writel_relaxed(~CORE_TESTBUS_ENA, msm_host->core_mem +
- CORE_TESTBUS_CONFIG);
if (host->is_crypto_en) {
sdhci_msm_ice_get_status(host, &sts);
pr_info("%s: ICE status %x\n", mmc_hostname(host->mmc), sts);
@@ -2753,6 +2750,22 @@ void sdhci_msm_reset(struct sdhci_host *host, u8 mask)
sdhci_reset(host, mask);
}
+static void sdhci_msm_clear_set_dumpregs(struct sdhci_host *host, bool set)
+{
+ struct sdhci_pltfm_host *pltfm_host = sdhci_priv(host);
+ struct sdhci_msm_host *msm_host = pltfm_host->priv;
+
+ if (set) {
+ writel_relaxed(CORE_TESTBUS_ENA,
+ msm_host->core_mem + CORE_TESTBUS_CONFIG);
+ } else {
+ u32 value;
+ value = readl_relaxed(msm_host->core_mem + CORE_TESTBUS_CONFIG);
+ value &= ~CORE_TESTBUS_ENA;
+ writel_relaxed(value, msm_host->core_mem + CORE_TESTBUS_CONFIG);
+ }
+}
+
static struct sdhci_ops sdhci_msm_ops = {
.crypto_engine_cfg = sdhci_msm_ice_cfg,
.crypto_engine_reset = sdhci_msm_ice_reset,
@@ -2769,6 +2782,7 @@ static struct sdhci_ops sdhci_msm_ops = {
.enable_controller_clock = sdhci_msm_enable_controller_clock,
.set_bus_width = sdhci_set_bus_width,
.reset = sdhci_msm_reset,
+ .clear_set_dumpregs = sdhci_msm_clear_set_dumpregs,
};
static void sdhci_set_default_hw_caps(struct sdhci_msm_host *msm_host,