]> code.ossystems Code Review - meta-freescale.git/commitdiff
linux-imx_3.14.28: fix initial MMC device detection
authorAndreas Müller <schnitzeltony@googlemail.com>
Mon, 8 Jun 2015 12:48:05 +0000 (14:48 +0200)
committerOtavio Salvador <otavio@ossystems.com.br>
Tue, 9 Jun 2015 18:46:17 +0000 (15:46 -0300)
On Variscite Varsom we have three devices connected to MMC

* MMC1: eMMC
* MMC2: SDCard
* MMC3: Wifi

Without this patch only the first device was detected properly.
I found two workarounds which can be removed by this patch:

1. Variscite: booting from SDCard made possible by renumbering MMC devices [1].
2. BoundaryDevices: Add workqueues for each mmc_host [2]. This had been tested
   here too but causes crashing sdcard for huge storage traffic.

[1] https://github.com/varigit/linux-2.6-imx/blob/imx_3.10.53_1.1.0_ga_var01/arch/arm/boot/dts/imx6qdl.dtsi / Line 879
[2] https://github.com/boundarydevices/linux-imx6/commit/1d40159a995a298f16901bfb14ae3e0294c65691

Signed-off-by: Andreas Müller <schnitzeltony@googlemail.com>
Signed-off-by: Otavio Salvador <otavio@ossystems.com.br>
meta-fsl-arm/recipes-kernel/linux/linux-imx-3.14.28/0004-mmc-sdhci-esdhc-imx-Fixup-runtime-PM-conditions-duri.patch [new file with mode: 0644]
meta-fsl-arm/recipes-kernel/linux/linux-imx_3.14.28.bb

diff --git a/meta-fsl-arm/recipes-kernel/linux/linux-imx-3.14.28/0004-mmc-sdhci-esdhc-imx-Fixup-runtime-PM-conditions-duri.patch b/meta-fsl-arm/recipes-kernel/linux/linux-imx-3.14.28/0004-mmc-sdhci-esdhc-imx-Fixup-runtime-PM-conditions-duri.patch
new file mode 100644 (file)
index 0000000..0d3caa4
--- /dev/null
@@ -0,0 +1,36 @@
+From 77903c01d8c6c5d2544085ba074aceadc1191d21 Mon Sep 17 00:00:00 2001
+From: Ulf Hansson <ulf.hansson@linaro.org>
+Date: Thu, 11 Dec 2014 15:12:25 +0100
+Subject: [PATCH 2/2] mmc: sdhci-esdhc-imx: Fixup runtime PM conditions during
+ ->probe()
+
+By configure runtime PM prior we enable the use of it, we close the gap
+for strange and unhandled conditions. Moreover it makes us rely on the
+driver core, after finalized ->probe(), to request an inactive device
+to become runtime PM idle/suspended, which earlier potentially could
+happen already at pm_runtime_set_autosuspend_delay().
+
+Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org>
+---
+ drivers/mmc/host/sdhci-esdhc-imx.c | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/drivers/mmc/host/sdhci-esdhc-imx.c b/drivers/mmc/host/sdhci-esdhc-imx.c
+index 043866c..10ef824 100644
+--- a/drivers/mmc/host/sdhci-esdhc-imx.c
++++ b/drivers/mmc/host/sdhci-esdhc-imx.c
+@@ -1080,10 +1080,10 @@ static int sdhci_esdhc_imx_probe(struct platform_device *pdev)
+               goto disable_clk;
+       pm_runtime_set_active(&pdev->dev);
+-      pm_runtime_enable(&pdev->dev);
+       pm_runtime_set_autosuspend_delay(&pdev->dev, 50);
+       pm_runtime_use_autosuspend(&pdev->dev);
+       pm_suspend_ignore_children(&pdev->dev, 1);
++      pm_runtime_enable(&pdev->dev);
+       return 0;
+-- 
+1.9.3
+
index e3078f7f04df3d4d9007ceec65bb9678f6d837f5..5d1be545079111404cf908dfc05e3182b6d53981 100644 (file)
@@ -18,6 +18,7 @@ SRC_URI += " \
     file://0001-ARM-imx6q-drop-unnecessary-semicolon.patch \
     file://0002-ARM-clk-imx6q-fix-video-divider-for-rev-T0-1.0.patch \
     file://0003-ARM-imx6sl-Disable-imx6sl-specific-code-when-imx6sl-.patch \
+    file://0004-mmc-sdhci-esdhc-imx-Fixup-runtime-PM-conditions-duri.patch \
 "
 
 COMPATIBLE_MACHINE = "(mx6)"