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

Commit 46578dc2 authored by Gustavo Solaira's avatar Gustavo Solaira Committed by Vijay Viswanath
Browse files

mmc: sdhci: Force probe of shdc1 based on boolean property



Force probing the sdhc1 bus even if it is not the boot device
by reading the device tree property qcom,force-sdhc1-probe.
Enables using the primary port for other use cases even when
the board is not using eMMC for boot.

Change-Id: I2a2b9d6a51037641720bdfd3107b2fadf385d7b5
Signed-off-by: default avatarGustavo Solaira <gustavos@codeaurora.org>
parent 138d7bb7
Loading
Loading
Loading
Loading
+1 −0
Original line number Diff line number Diff line
@@ -85,6 +85,7 @@ Optional Properties:
	  On certain chipsets, coming out of the CX Power Collapse event, the SDCC registers
	  contents will not be retained. It is software responsibility to restore the
	  SDCC registers before resuming to normal operation.
	- qcom,force-sdhc1-probe: Force probing sdhc1 even if it is not the boot device.

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.
+7 −1
Original line number Diff line number Diff line
@@ -4289,6 +4289,7 @@ static int sdhci_msm_probe(struct platform_device *pdev)
	struct resource *tlmm_memres = NULL;
	void __iomem *tlmm_mem;
	unsigned long flags;
	bool force_probe;

	pr_debug("%s: Enter %s\n", dev_name(&pdev->dev), __func__);
	msm_host = devm_kzalloc(&pdev->dev, sizeof(struct sdhci_msm_host),
@@ -4352,8 +4353,13 @@ static int sdhci_msm_probe(struct platform_device *pdev)
			goto pltfm_free;
		}

		/* Read property to determine if the probe is forced */
		force_probe = of_find_property(pdev->dev.of_node,
			"qcom,force-sdhc1-probe", NULL);

		/* skip the probe if eMMC isn't a boot device */
		if ((ret == 1) && !sdhci_msm_is_bootdevice(&pdev->dev)) {
		if ((ret == 1) && !sdhci_msm_is_bootdevice(&pdev->dev)
		    && !force_probe) {
			ret = -ENODEV;
			goto pltfm_free;
		}