[PATCH] MMC: FSL SDHC: Add support for non-removable card. Kernel version 3.4.48

2013-06-10 Thread Oded Gabbay
This patch adds support of recognizing non-removable cards
to Freescale's SDHC host driver. This is done by detecting the
attribute "non-removable" in the probe function

This patch depends on patch[2/3] from 6-jun-2013:
https://patchwork.kernel.org/patch/2649381/

This patch is instead of patch[3/3] from 6-jun-2013:
https://patchwork.kernel.org/patch/2649231/

Signed-off-by: Oded Gabbay 
---
 drivers/mmc/host/sdhci-of-esdhc.c | 4 
 1 file changed, 4 insertions(+)

diff --git a/drivers/mmc/host/sdhci-of-esdhc.c 
b/drivers/mmc/host/sdhci-of-esdhc.c
index e70f22f..a6e068c 100644
--- a/drivers/mmc/host/sdhci-of-esdhc.c
+++ b/drivers/mmc/host/sdhci-of-esdhc.c
@@ -222,6 +222,10 @@ static int __devinit sdhci_esdhc_probe(struct 
platform_device *pdev)
host->quirks2 |= SDHCI_QUIRK2_BROKEN_HOST_CONTROL;
}
 
+   /* Check if card is non-removable */
+   if (of_find_property(np, "non-removable", NULL))
+   host->caps |= MMC_CAP_NONREMOVABLE;
+
ret = sdhci_add_host(host);
if (ret)
sdhci_pltfm_free(pdev);
-- 
1.8.3

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


[PATCH] MMC: FSL SDHC: Add support for non-removable card. Kernel version 3.4.48

2013-06-10 Thread Oded Gabbay
This patch adds support of recognizing non-removable cards
to Freescale's SDHC host driver. This is done by detecting the
attribute non-removable in the probe function

This patch depends on patch[2/3] from 6-jun-2013:
https://patchwork.kernel.org/patch/2649381/

This patch is instead of patch[3/3] from 6-jun-2013:
https://patchwork.kernel.org/patch/2649231/

Signed-off-by: Oded Gabbay ogab...@advaoptical.com
---
 drivers/mmc/host/sdhci-of-esdhc.c | 4 
 1 file changed, 4 insertions(+)

diff --git a/drivers/mmc/host/sdhci-of-esdhc.c 
b/drivers/mmc/host/sdhci-of-esdhc.c
index e70f22f..a6e068c 100644
--- a/drivers/mmc/host/sdhci-of-esdhc.c
+++ b/drivers/mmc/host/sdhci-of-esdhc.c
@@ -222,6 +222,10 @@ static int __devinit sdhci_esdhc_probe(struct 
platform_device *pdev)
host-quirks2 |= SDHCI_QUIRK2_BROKEN_HOST_CONTROL;
}
 
+   /* Check if card is non-removable */
+   if (of_find_property(np, non-removable, NULL))
+   host-caps |= MMC_CAP_NONREMOVABLE;
+
ret = sdhci_add_host(host);
if (ret)
sdhci_pltfm_free(pdev);
-- 
1.8.3

--
To unsubscribe from this list: send the line unsubscribe linux-kernel in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/