X-Git-Url: http://pilppa.org/gitweb/gitweb.cgi?a=blobdiff_plain;f=drivers%2Fmmc%2Fhost%2Fsdhci.c;h=17b4e391db3590a02feb53b931cfc3f30abed30d;hb=dc93441b3f5879a096dd117a81df541b0855ebbb;hp=b397121b947d5acf78b764c06c486a30a8fe1797;hpb=038a5008b2f395c85e6e71d6ddf3c684e7c405b0;p=linux-2.6-omap-h63xx.git diff --git a/drivers/mmc/host/sdhci.c b/drivers/mmc/host/sdhci.c index b397121b947..17b4e391db3 100644 --- a/drivers/mmc/host/sdhci.c +++ b/drivers/mmc/host/sdhci.c @@ -13,11 +13,10 @@ #include #include #include +#include #include -#include - #include "sdhci.h" #define DRIVER_NAME "sdhci" @@ -27,12 +26,22 @@ static unsigned int debug_quirks = 0; +/* + * Different quirks to handle when the hardware deviates from a strict + * interpretation of the SDHCI specification. + */ + +/* Controller doesn't honor resets unless we touch the clock register */ #define SDHCI_QUIRK_CLOCK_BEFORE_RESET (1<<0) +/* Controller has bad caps bits, but really supports DMA */ #define SDHCI_QUIRK_FORCE_DMA (1<<1) /* Controller doesn't like some resets when there is no card inserted. */ #define SDHCI_QUIRK_NO_CARD_NO_RESET (1<<2) +/* Controller doesn't like clearing the power reg before a change */ #define SDHCI_QUIRK_SINGLE_POWER_WRITE (1<<3) +/* Controller has flaky internal state so reset it on each ios change */ #define SDHCI_QUIRK_RESET_CMD_DATA_ON_IOS (1<<4) +/* Controller has an unusable DMA engine */ #define SDHCI_QUIRK_BROKEN_DMA (1<<5) static const struct pci_device_id pci_ids[] __devinitdata = { @@ -231,7 +240,7 @@ static void sdhci_deactivate_led(struct sdhci_host *host) static inline char* sdhci_sg_to_buffer(struct sdhci_host* host) { - return page_address(host->cur_sg->page) + host->cur_sg->offset; + return sg_virt(host->cur_sg); } static inline int sdhci_next_sg(struct sdhci_host* host) @@ -1302,7 +1311,7 @@ static int __devinit sdhci_probe_slot(struct pci_dev *pdev, int slot) if ((chip->quirks & SDHCI_QUIRK_BROKEN_DMA) && (host->flags & SDHCI_USE_DMA)) { - DBG("Disabling DMA as it is marked broken"); + DBG("Disabling DMA as it is marked broken\n"); host->flags &= ~SDHCI_USE_DMA; }