aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorShawn Guo <shawn.guo@linaro.org>2013-10-17 03:19:44 -0400
committerChris Ball <chris@printf.net>2013-10-21 15:57:43 -0400
commit31fbb3013506e58320fcea2ce07543b2a22c5ee0 (patch)
tree8e8e9721d9273545a01d45948e8f9fb4707dd638
parente69e4dff1c0228294572e27df7b2fc4c0b518632 (diff)
mmc: sdhci-esdhc-imx: add flag ESDHC_FLAG_ENGCM07207
Just like the use of the flag ESDHC_FLAG_MULTIBLK_NO_INT, let's add another flag ESDHC_FLAG_ENGCM07207 to enable the workaround for errata ENGcm07207 and set the flag for i.MX25 and i.MX35 ESDHC. While at it, let's use BIT() macro for ESDHC_FLAG_MULTIBLK_NO_INT as well. Signed-off-by: Shawn Guo <shawn.guo@linaro.org> Acked-by: Dong Aisheng <b29396@freescale.com> Signed-off-by: Chris Ball <cjb@laptop.org>
-rw-r--r--drivers/mmc/host/sdhci-esdhc-imx.c12
1 files changed, 10 insertions, 2 deletions
diff --git a/drivers/mmc/host/sdhci-esdhc-imx.c b/drivers/mmc/host/sdhci-esdhc-imx.c
index b9899e9c684a..d844be862cfa 100644
--- a/drivers/mmc/host/sdhci-esdhc-imx.c
+++ b/drivers/mmc/host/sdhci-esdhc-imx.c
@@ -83,7 +83,12 @@
83 * As a result, the TC flag is not asserted and SW received timeout 83 * As a result, the TC flag is not asserted and SW received timeout
84 * exeception. Bit1 of Vendor Spec registor is used to fix it. 84 * exeception. Bit1 of Vendor Spec registor is used to fix it.
85 */ 85 */
86#define ESDHC_FLAG_MULTIBLK_NO_INT (1 << 1) 86#define ESDHC_FLAG_MULTIBLK_NO_INT BIT(1)
87/*
88 * The flag enables the workaround for ESDHC errata ENGcm07207 which
89 * affects i.MX25 and i.MX35.
90 */
91#define ESDHC_FLAG_ENGCM07207 BIT(2)
87 92
88enum imx_esdhc_type { 93enum imx_esdhc_type {
89 IMX25_ESDHC, 94 IMX25_ESDHC,
@@ -857,6 +862,9 @@ static int sdhci_esdhc_imx_probe(struct platform_device *pdev)
857 imx_data->devtype = pdev->id_entry->driver_data; 862 imx_data->devtype = pdev->id_entry->driver_data;
858 pltfm_host->priv = imx_data; 863 pltfm_host->priv = imx_data;
859 864
865 if (is_imx25_esdhc(imx_data) || is_imx35_esdhc(imx_data))
866 imx_data->flags |= ESDHC_FLAG_ENGCM07207;
867
860 imx_data->clk_ipg = devm_clk_get(&pdev->dev, "ipg"); 868 imx_data->clk_ipg = devm_clk_get(&pdev->dev, "ipg");
861 if (IS_ERR(imx_data->clk_ipg)) { 869 if (IS_ERR(imx_data->clk_ipg)) {
862 err = PTR_ERR(imx_data->clk_ipg); 870 err = PTR_ERR(imx_data->clk_ipg);
@@ -897,7 +905,7 @@ static int sdhci_esdhc_imx_probe(struct platform_device *pdev)
897 905
898 host->quirks |= SDHCI_QUIRK_BROKEN_TIMEOUT_VAL; 906 host->quirks |= SDHCI_QUIRK_BROKEN_TIMEOUT_VAL;
899 907
900 if (is_imx25_esdhc(imx_data) || is_imx35_esdhc(imx_data)) 908 if (imx_data->flags & ESDHC_FLAG_ENGCM07207)
901 /* Fix errata ENGcm07207 present on i.MX25 and i.MX35 */ 909 /* Fix errata ENGcm07207 present on i.MX25 and i.MX35 */
902 host->quirks |= SDHCI_QUIRK_NO_MULTIBLOCK 910 host->quirks |= SDHCI_QUIRK_NO_MULTIBLOCK
903 | SDHCI_QUIRK_BROKEN_ADMA; 911 | SDHCI_QUIRK_BROKEN_ADMA;