mmc: esdhc: set the timeout to the max value
authorJerry Huang <Chang-Ming.Huang@freescale.com>
Mon, 16 Jan 2012 06:13:04 +0000 (14:13 +0800)
committerChris Ball <cjb@laptop.org>
Tue, 14 Feb 2012 01:38:59 +0000 (20:38 -0500)
When accessing the card on some FSL platform boards (e.g p2020, p1010,
mpc8536), the following error is reported with the timeout value calculated:

mmc0: Got data interrupt 0x00000020 even though no data operation was
in progress.
mmc0: Got data interrupt 0x00000020 even though no data operation was
in progress.

So we skip the calculation of timeout and use the max value to fix it.

Signed-off-by: Jerry Huang <Chang-Ming.Huang@freescale.com>
Signed-off-by: Gao Guanhua <B22826@freescale.com>
Signed-off-by: Xie Xiaobo <X.Xie@freescale.com>
Acked-by: Anton Vorontsov <cbouatmailru@gmail.com>
Signed-off-by: Chris Ball <cjb@laptop.org>
drivers/mmc/host/sdhci-pltfm.c

index 67b9ab075deebe9a8f4d00f3fa0866b1570512ea..c5c2a48bdd943166bff4e15ddf59718f3fbffa9a 100644 (file)
@@ -74,6 +74,11 @@ void sdhci_get_of_property(struct platform_device *pdev)
                if (of_device_is_compatible(np, "fsl,p2020-rev1-esdhc"))
                        host->quirks |= SDHCI_QUIRK_BROKEN_DMA;
 
+               if (of_device_is_compatible(np, "fsl,p2020-esdhc") ||
+                   of_device_is_compatible(np, "fsl,p1010-esdhc") ||
+                   of_device_is_compatible(np, "fsl,mpc8536-esdhc"))
+                       host->quirks |= SDHCI_QUIRK_BROKEN_TIMEOUT_VAL;
+
                clk = of_get_property(np, "clock-frequency", &size);
                if (clk && size == sizeof(*clk) && *clk)
                        pltfm_host->clock = be32_to_cpup(clk);