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

Commit c18c3737 authored by Linux Build Service Account's avatar Linux Build Service Account Committed by Gerrit - the friendly Code Review server
Browse files

Merge "mmc: sdhci-msm: Cache mmc data structures for debugging"

parents e76a227b 62edbae8
Loading
Loading
Loading
Loading
+16 −0
Original line number Diff line number Diff line
@@ -3304,6 +3304,21 @@ static void sdhci_msm_cmdq_dump_debug_ram(struct sdhci_host *host)
	pr_err("-------------------------\n");
}

static void sdhci_msm_cache_debug_data(struct sdhci_host *host)
{
	struct sdhci_pltfm_host *pltfm_host = sdhci_priv(host);
	struct sdhci_msm_host *msm_host = pltfm_host->priv;
	struct sdhci_msm_debug_data *cached_data = &msm_host->cached_data;

	memcpy(&cached_data->copy_mmc, msm_host->mmc,
		sizeof(struct mmc_host));
	if (msm_host->mmc->card)
		memcpy(&cached_data->copy_card, msm_host->mmc->card,
			sizeof(struct mmc_card));
	memcpy(&cached_data->copy_host, host,
		sizeof(struct sdhci_host));
}

void sdhci_msm_dump_vendor_regs(struct sdhci_host *host)
{
	struct sdhci_pltfm_host *pltfm_host = sdhci_priv(host);
@@ -3316,6 +3331,7 @@ void sdhci_msm_dump_vendor_regs(struct sdhci_host *host)
	u32 debug_reg[MAX_TEST_BUS] = {0};
	u32 sts = 0;

	sdhci_msm_cache_debug_data(host);
	pr_info("----------- VENDOR REGISTER DUMP -----------\n");
	if (host->cq_host)
		sdhci_msm_cmdq_dump_debug_ram(host);
+7 −0
Original line number Diff line number Diff line
@@ -171,6 +171,12 @@ struct sdhci_msm_ice_data {
	int state;
};

struct sdhci_msm_debug_data {
	struct mmc_host copy_mmc;
	struct mmc_card copy_card;
	struct sdhci_host copy_host;
};

struct sdhci_msm_host {
	struct platform_device	*pdev;
	void __iomem *core_mem;    /* MSM SDCC mapped address */
@@ -186,6 +192,7 @@ struct sdhci_msm_host {
	atomic_t clks_on; /* Set if clocks are enabled */
	struct sdhci_msm_pltfm_data *pdata;
	struct mmc_host  *mmc;
	struct sdhci_msm_debug_data cached_data;
	struct sdhci_pltfm_data sdhci_msm_pdata;
	u32 curr_pwr_state;
	u32 curr_io_level;