ixp4xx: remove linux 3.10 support
[openwrt/staging/chunkeey.git] / target / linux / brcm2708 / patches-3.10 / 0014-sdhci-bcm2708-add-allow_highspeed-parameter.patch
1 From 06d314090d1c837d5f2c42c9686c8e8fa7db7370 Mon Sep 17 00:00:00 2001
2 From: Grigori Goronzy <greg@blackbox>
3 Date: Mon, 11 Jun 2012 18:57:13 +0200
4 Subject: [PATCH 014/196] sdhci-bcm2708: add allow_highspeed parameter
5
6 Add a parameter to disable high-speed mode for the few cards that
7 still might have problems. High-speed mode is enabled by default.
8 ---
9 drivers/mmc/host/sdhci-bcm2708.c | 9 ++++++++-
10 1 file changed, 8 insertions(+), 1 deletion(-)
11
12 diff --git a/drivers/mmc/host/sdhci-bcm2708.c b/drivers/mmc/host/sdhci-bcm2708.c
13 index 3001836..c64de21 100644
14 --- a/drivers/mmc/host/sdhci-bcm2708.c
15 +++ b/drivers/mmc/host/sdhci-bcm2708.c
16 @@ -129,6 +129,8 @@ static inline unsigned long int since_ns(hptime_t t)
17 return (unsigned long)((hptime() - t) * HPTIME_CLK_NS);
18 }
19
20 +static bool allow_highspeed = 1;
21 +
22 #if 0
23 static void hptime_test(void)
24 {
25 @@ -1254,7 +1256,8 @@ static int sdhci_bcm2708_probe(struct platform_device *pdev)
26 host_priv->dma_chan, host_priv->dma_chan_base,
27 host_priv->dma_irq);
28
29 - host->mmc->caps |= MMC_CAP_SD_HIGHSPEED | MMC_CAP_MMC_HIGHSPEED;
30 + if (allow_highspeed)
31 + host->mmc->caps |= MMC_CAP_SD_HIGHSPEED | MMC_CAP_MMC_HIGHSPEED;
32 #endif
33
34 ret = sdhci_add_host(host);
35 @@ -1357,8 +1360,12 @@ static void __exit sdhci_drv_exit(void)
36 module_init(sdhci_drv_init);
37 module_exit(sdhci_drv_exit);
38
39 +module_param(allow_highspeed, bool, 0444);
40 +
41 MODULE_DESCRIPTION("Secure Digital Host Controller Interface platform driver");
42 MODULE_AUTHOR("Broadcom <info@broadcom.com>");
43 MODULE_LICENSE("GPL v2");
44 MODULE_ALIAS("platform:"DRIVER_NAME);
45
46 +MODULE_PARM_DESC(allow_highspeed, "Allow high speed transfers modes");
47 +
48 --
49 1.9.1
50