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

Commit 17a3f7c3 authored by Subhash Jadavani's avatar Subhash Jadavani Committed by Veerabhadrarao Badiganti
Browse files

mmc: sdhci-msm: add SDR104 CRC workaround enablement control



On Certain chipsets, SDR104 mode might be unstable causing CRC error on
the interface. So we need a workaround which would skip printing register
dumps on CRC errors and also downgrade bus speed mode to SDR50/DDR50 in
case of continuous CRC errors. This patch adds "qcom,sdr104-wa" property
to enable this workaround if required.

Change-Id: I626d8ef45a97e8e6558e7f20be496de1f5a2a438
Signed-off-by: default avatarSubhash Jadavani <subhashj@codeaurora.org>
Signed-off-by: default avatarVeerabhadrarao Badiganti <vbadigan@codeaurora.org>
parent 29eba0a6
Loading
Loading
Loading
Loading
+5 −0
Original line number Diff line number Diff line
@@ -72,6 +72,11 @@ Optional Properties:
						during clock scaling. If this property is not
						defined, then it falls back to the default HS
						bus speed mode to maintain backward compatibility.
	- qcom,sdr104-wa: On Certain chipsets, SDR104 mode might be unstable causing CRC errors
			  on the interface. So there is a workaround implemented to skip printing
			  register dumps on CRC errors and also downgrade bus speed mode to
			  SDR50/DDR50 in case of continuous CRC errors. Set this flag to enable
			  this workaround.

In the following, <supply> can be vdd (flash core voltage) or vdd-io (I/O voltage).
	- qcom,<supply>-always-on - specifies whether supply should be kept "on" always.
+3 −0
Original line number Diff line number Diff line
@@ -1799,6 +1799,8 @@ struct sdhci_msm_pltfm_data *sdhci_msm_populate_pdata(struct device *dev,
	if (of_get_property(np, "qcom,core_3_0v_support", NULL))
		msm_host->core_3_0v_support = true;

	pdata->sdr104_wa = of_property_read_bool(np, "qcom,sdr104-wa");

	return pdata;
out:
	return NULL;
@@ -4285,6 +4287,7 @@ static int sdhci_msm_probe(struct platform_device *pdev)
	if (msm_host->pdata->nonhotplug)
		msm_host->mmc->caps2 |= MMC_CAP2_NONHOTPLUG;

	msm_host->mmc->sdr104_wa = msm_host->pdata->sdr104_wa;

	/* Initialize ICE if present */
	if (msm_host->ice.pdev) {
+1 −0
Original line number Diff line number Diff line
@@ -152,6 +152,7 @@ struct sdhci_msm_pltfm_data {
	u32 ice_clk_max;
	u32 ice_clk_min;
	struct sdhci_msm_pm_qos_data pm_qos_data;
	bool sdr104_wa;
};

struct sdhci_msm_bus_vote {
+1 −0
Original line number Diff line number Diff line
@@ -625,6 +625,7 @@ struct mmc_host {
	 */
	void *cmdq_private;
	struct mmc_request	*err_mrq;
	bool sdr104_wa;
	unsigned long		private[0] ____cacheline_aligned;
};