]> www.pilppa.org Git - linux-2.6-omap-h63xx.git/commitdiff
[MMC] sdhci: support controller specific quirks
authorPierre Ossman <drzeus@drzeus.cx>
Fri, 30 Jun 2006 09:22:31 +0000 (02:22 -0700)
committerRussell King <rmk+kernel@arm.linux.org.uk>
Sun, 2 Jul 2006 15:54:59 +0000 (16:54 +0100)
As some specific controllers will have bugs, we need a way to map special
behaviour to certain hardware.

Signed-off-by: Pierre Ossman <drzeus@drzeus.cx>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
drivers/mmc/sdhci.c
drivers/mmc/sdhci.h

index 315ab49e4b2c4a389de53a030fdecbbcd3e5db9a..27f81e6141988f8756ffb4d408067cb12272649f 100644 (file)
@@ -30,6 +30,7 @@
 
 static unsigned int debug_nodma = 0;
 static unsigned int debug_forcedma = 0;
+static unsigned int debug_quirks = 0;
 
 static const struct pci_device_id pci_ids[] __devinitdata = {
        /* handle any SD host controller */
@@ -1373,6 +1374,10 @@ static int __devinit sdhci_probe(struct pci_dev *pdev,
        }
 
        chip->pdev = pdev;
+       chip->quirks = ent->driver_data;
+
+       if (debug_quirks)
+               chip->quirks = debug_quirks;
 
        chip->num_slots = slots;
        pci_set_drvdata(pdev, chip);
@@ -1453,6 +1458,7 @@ module_exit(sdhci_drv_exit);
 
 module_param(debug_nodma, uint, 0444);
 module_param(debug_forcedma, uint, 0444);
+module_param(debug_quirks, uint, 0444);
 
 MODULE_AUTHOR("Pierre Ossman <drzeus@drzeus.cx>");
 MODULE_DESCRIPTION("Secure Digital Host Controller Interface driver");
@@ -1461,3 +1467,4 @@ MODULE_LICENSE("GPL");
 
 MODULE_PARM_DESC(debug_nodma, "Forcefully disable DMA transfers. (default 0)");
 MODULE_PARM_DESC(debug_forcedma, "Forcefully enable DMA transfers. (default 0)");
+MODULE_PARM_DESC(debug_quirks, "Force certain quirks.");
index 8111fa38c05b57a879240faf30de584d9c0c543e..f2453343f783bd3b7dc75ce3e8946c7c277a9eec 100644 (file)
@@ -204,6 +204,8 @@ struct sdhci_host {
 struct sdhci_chip {
        struct pci_dev          *pdev;
 
+       unsigned long           quirks;
+
        int                     num_slots;      /* Slots on controller */
        struct sdhci_host       *hosts[0];      /* Pointers to hosts */
 };