Permalink
Browse files

sdhci-bcm2708: add allow_highspeed parameter

Add a parameter to disable high-speed mode for the few cards that
still might have problems. High-speed mode is enabled by default.
  • Loading branch information...
1 parent 4577015 commit fdc3114aea4a8c869fb3478b1b2563bf595dcb6c @grigorig grigorig committed with popcornmix Jun 11, 2012
Showing with 8 additions and 1 deletion.
  1. +8 −1 drivers/mmc/host/sdhci-bcm2708.c
View
9 drivers/mmc/host/sdhci-bcm2708.c
@@ -129,6 +129,8 @@ static inline unsigned long int since_ns(hptime_t t)
return (unsigned long)((hptime() - t) * HPTIME_CLK_NS);
}
+static bool allow_highspeed = 1;
+
#if 0
static void hptime_test(void)
{
@@ -1254,7 +1256,8 @@ static int sdhci_bcm2708_probe(struct platform_device *pdev)
host_priv->dma_chan, host_priv->dma_chan_base,
host_priv->dma_irq);
- host->mmc->caps |= MMC_CAP_SD_HIGHSPEED | MMC_CAP_MMC_HIGHSPEED;
+ if (allow_highspeed)
+ host->mmc->caps |= MMC_CAP_SD_HIGHSPEED | MMC_CAP_MMC_HIGHSPEED;
#endif
ret = sdhci_add_host(host);
@@ -1357,8 +1360,12 @@ static void __exit sdhci_drv_exit(void)
module_init(sdhci_drv_init);
module_exit(sdhci_drv_exit);
+module_param(allow_highspeed, bool, 0444);
+
MODULE_DESCRIPTION("Secure Digital Host Controller Interface platform driver");
MODULE_AUTHOR("Broadcom <info@broadcom.com>");
MODULE_LICENSE("GPL v2");
MODULE_ALIAS("platform:"DRIVER_NAME);
+MODULE_PARM_DESC(allow_highspeed, "Allow high speed transfers modes");
+

0 comments on commit fdc3114

Please sign in to comment.