diff options
author | Pierre Ossman <drzeus@drzeus.cx> | 2006-06-30 05:22:31 -0400 |
---|---|---|
committer | Russell King <rmk+kernel@arm.linux.org.uk> | 2006-07-02 11:54:59 -0400 |
commit | df673b227ce08a7706b30fd2bf6512393d9c3c29 (patch) | |
tree | 026fb02f088a922b1a7b5c2b984e779df266625f /drivers/mmc | |
parent | 6743527441430586aa82a0dee1b2700a2a974ebc (diff) |
[MMC] sdhci: support controller specific quirks
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>
Diffstat (limited to 'drivers/mmc')
-rw-r--r-- | drivers/mmc/sdhci.c | 7 | ||||
-rw-r--r-- | drivers/mmc/sdhci.h | 2 |
2 files changed, 9 insertions, 0 deletions
diff --git a/drivers/mmc/sdhci.c b/drivers/mmc/sdhci.c index 315ab49e4b2c..27f81e614198 100644 --- a/drivers/mmc/sdhci.c +++ b/drivers/mmc/sdhci.c | |||
@@ -30,6 +30,7 @@ | |||
30 | 30 | ||
31 | static unsigned int debug_nodma = 0; | 31 | static unsigned int debug_nodma = 0; |
32 | static unsigned int debug_forcedma = 0; | 32 | static unsigned int debug_forcedma = 0; |
33 | static unsigned int debug_quirks = 0; | ||
33 | 34 | ||
34 | static const struct pci_device_id pci_ids[] __devinitdata = { | 35 | static const struct pci_device_id pci_ids[] __devinitdata = { |
35 | /* handle any SD host controller */ | 36 | /* handle any SD host controller */ |
@@ -1373,6 +1374,10 @@ static int __devinit sdhci_probe(struct pci_dev *pdev, | |||
1373 | } | 1374 | } |
1374 | 1375 | ||
1375 | chip->pdev = pdev; | 1376 | chip->pdev = pdev; |
1377 | chip->quirks = ent->driver_data; | ||
1378 | |||
1379 | if (debug_quirks) | ||
1380 | chip->quirks = debug_quirks; | ||
1376 | 1381 | ||
1377 | chip->num_slots = slots; | 1382 | chip->num_slots = slots; |
1378 | pci_set_drvdata(pdev, chip); | 1383 | pci_set_drvdata(pdev, chip); |
@@ -1453,6 +1458,7 @@ module_exit(sdhci_drv_exit); | |||
1453 | 1458 | ||
1454 | module_param(debug_nodma, uint, 0444); | 1459 | module_param(debug_nodma, uint, 0444); |
1455 | module_param(debug_forcedma, uint, 0444); | 1460 | module_param(debug_forcedma, uint, 0444); |
1461 | module_param(debug_quirks, uint, 0444); | ||
1456 | 1462 | ||
1457 | MODULE_AUTHOR("Pierre Ossman <drzeus@drzeus.cx>"); | 1463 | MODULE_AUTHOR("Pierre Ossman <drzeus@drzeus.cx>"); |
1458 | MODULE_DESCRIPTION("Secure Digital Host Controller Interface driver"); | 1464 | MODULE_DESCRIPTION("Secure Digital Host Controller Interface driver"); |
@@ -1461,3 +1467,4 @@ MODULE_LICENSE("GPL"); | |||
1461 | 1467 | ||
1462 | MODULE_PARM_DESC(debug_nodma, "Forcefully disable DMA transfers. (default 0)"); | 1468 | MODULE_PARM_DESC(debug_nodma, "Forcefully disable DMA transfers. (default 0)"); |
1463 | MODULE_PARM_DESC(debug_forcedma, "Forcefully enable DMA transfers. (default 0)"); | 1469 | MODULE_PARM_DESC(debug_forcedma, "Forcefully enable DMA transfers. (default 0)"); |
1470 | MODULE_PARM_DESC(debug_quirks, "Force certain quirks."); | ||
diff --git a/drivers/mmc/sdhci.h b/drivers/mmc/sdhci.h index 8111fa38c05b..f2453343f783 100644 --- a/drivers/mmc/sdhci.h +++ b/drivers/mmc/sdhci.h | |||
@@ -204,6 +204,8 @@ struct sdhci_host { | |||
204 | struct sdhci_chip { | 204 | struct sdhci_chip { |
205 | struct pci_dev *pdev; | 205 | struct pci_dev *pdev; |
206 | 206 | ||
207 | unsigned long quirks; | ||
208 | |||
207 | int num_slots; /* Slots on controller */ | 209 | int num_slots; /* Slots on controller */ |
208 | struct sdhci_host *hosts[0]; /* Pointers to hosts */ | 210 | struct sdhci_host *hosts[0]; /* Pointers to hosts */ |
209 | }; | 211 | }; |