diff options
author | Russell King <rmk@dyn-67.arm.linux.org.uk> | 2008-08-07 04:55:03 -0400 |
---|---|---|
committer | Russell King <rmk+kernel@arm.linux.org.uk> | 2008-08-07 04:55:03 -0400 |
commit | 4fb8af10d0fd09372d52966b76922b9e82bbc950 (patch) | |
tree | d240e4d40357583e3f3eb228dccf20122a5b31ed /drivers/mmc/host | |
parent | f44f82e8a20b98558486eb14497b2f71c78fa325 (diff) | |
parent | 64a99d2a8c3ed5c4e39f3ae1cc682aa8fd3977fc (diff) |
Merge git://git.kernel.org/pub/scm/linux/kernel/git/sam/kbuild-fixes
Diffstat (limited to 'drivers/mmc/host')
-rw-r--r-- | drivers/mmc/host/au1xmmc.c | 8 | ||||
-rw-r--r-- | drivers/mmc/host/sdhci-pci.c | 3 | ||||
-rw-r--r-- | drivers/mmc/host/sdhci.c | 15 | ||||
-rw-r--r-- | drivers/mmc/host/sdhci.h | 2 |
4 files changed, 23 insertions, 5 deletions
diff --git a/drivers/mmc/host/au1xmmc.c b/drivers/mmc/host/au1xmmc.c index 99b20917cc0f..d3f55615c099 100644 --- a/drivers/mmc/host/au1xmmc.c +++ b/drivers/mmc/host/au1xmmc.c | |||
@@ -61,7 +61,13 @@ | |||
61 | 61 | ||
62 | /* Hardware definitions */ | 62 | /* Hardware definitions */ |
63 | #define AU1XMMC_DESCRIPTOR_COUNT 1 | 63 | #define AU1XMMC_DESCRIPTOR_COUNT 1 |
64 | #define AU1XMMC_DESCRIPTOR_SIZE 2048 | 64 | |
65 | /* max DMA seg size: 64KB on Au1100, 4MB on Au1200 */ | ||
66 | #ifdef CONFIG_SOC_AU1100 | ||
67 | #define AU1XMMC_DESCRIPTOR_SIZE 0x0000ffff | ||
68 | #else /* Au1200 */ | ||
69 | #define AU1XMMC_DESCRIPTOR_SIZE 0x003fffff | ||
70 | #endif | ||
65 | 71 | ||
66 | #define AU1XMMC_OCR (MMC_VDD_27_28 | MMC_VDD_28_29 | MMC_VDD_29_30 | \ | 72 | #define AU1XMMC_OCR (MMC_VDD_27_28 | MMC_VDD_28_29 | MMC_VDD_29_30 | \ |
67 | MMC_VDD_30_31 | MMC_VDD_31_32 | MMC_VDD_32_33 | \ | 73 | MMC_VDD_30_31 | MMC_VDD_31_32 | MMC_VDD_32_33 | \ |
diff --git a/drivers/mmc/host/sdhci-pci.c b/drivers/mmc/host/sdhci-pci.c index deb607c52c0d..fcb14c2346cc 100644 --- a/drivers/mmc/host/sdhci-pci.c +++ b/drivers/mmc/host/sdhci-pci.c | |||
@@ -143,7 +143,8 @@ static int jmicron_probe(struct sdhci_pci_chip *chip) | |||
143 | chip->quirks |= SDHCI_QUIRK_32BIT_DMA_ADDR | | 143 | chip->quirks |= SDHCI_QUIRK_32BIT_DMA_ADDR | |
144 | SDHCI_QUIRK_32BIT_DMA_SIZE | | 144 | SDHCI_QUIRK_32BIT_DMA_SIZE | |
145 | SDHCI_QUIRK_32BIT_ADMA_SIZE | | 145 | SDHCI_QUIRK_32BIT_ADMA_SIZE | |
146 | SDHCI_QUIRK_RESET_AFTER_REQUEST; | 146 | SDHCI_QUIRK_RESET_AFTER_REQUEST | |
147 | SDHCI_QUIRK_BROKEN_SMALL_PIO; | ||
147 | } | 148 | } |
148 | 149 | ||
149 | /* | 150 | /* |
diff --git a/drivers/mmc/host/sdhci.c b/drivers/mmc/host/sdhci.c index 5f95e10229b5..e3a8133560a2 100644 --- a/drivers/mmc/host/sdhci.c +++ b/drivers/mmc/host/sdhci.c | |||
@@ -278,6 +278,15 @@ static void sdhci_transfer_pio(struct sdhci_host *host) | |||
278 | else | 278 | else |
279 | mask = SDHCI_SPACE_AVAILABLE; | 279 | mask = SDHCI_SPACE_AVAILABLE; |
280 | 280 | ||
281 | /* | ||
282 | * Some controllers (JMicron JMB38x) mess up the buffer bits | ||
283 | * for transfers < 4 bytes. As long as it is just one block, | ||
284 | * we can ignore the bits. | ||
285 | */ | ||
286 | if ((host->quirks & SDHCI_QUIRK_BROKEN_SMALL_PIO) && | ||
287 | (host->data->blocks == 1)) | ||
288 | mask = ~0; | ||
289 | |||
281 | while (readl(host->ioaddr + SDHCI_PRESENT_STATE) & mask) { | 290 | while (readl(host->ioaddr + SDHCI_PRESENT_STATE) & mask) { |
282 | if (host->data->flags & MMC_DATA_READ) | 291 | if (host->data->flags & MMC_DATA_READ) |
283 | sdhci_read_block_pio(host); | 292 | sdhci_read_block_pio(host); |
@@ -439,7 +448,7 @@ static int sdhci_adma_table_pre(struct sdhci_host *host, | |||
439 | 448 | ||
440 | host->adma_addr = dma_map_single(mmc_dev(host->mmc), | 449 | host->adma_addr = dma_map_single(mmc_dev(host->mmc), |
441 | host->adma_desc, (128 * 2 + 1) * 4, DMA_TO_DEVICE); | 450 | host->adma_desc, (128 * 2 + 1) * 4, DMA_TO_DEVICE); |
442 | if (dma_mapping_error(mmc_dev(host->mmc), host->align_addr)) | 451 | if (dma_mapping_error(mmc_dev(host->mmc), host->adma_addr)) |
443 | goto unmap_entries; | 452 | goto unmap_entries; |
444 | BUG_ON(host->adma_addr & 0x3); | 453 | BUG_ON(host->adma_addr & 0x3); |
445 | 454 | ||
@@ -645,7 +654,7 @@ static void sdhci_prepare_data(struct sdhci_host *host, struct mmc_data *data) | |||
645 | * us an invalid request. | 654 | * us an invalid request. |
646 | */ | 655 | */ |
647 | WARN_ON(1); | 656 | WARN_ON(1); |
648 | host->flags &= ~SDHCI_USE_DMA; | 657 | host->flags &= ~SDHCI_REQ_USE_DMA; |
649 | } else { | 658 | } else { |
650 | writel(host->adma_addr, | 659 | writel(host->adma_addr, |
651 | host->ioaddr + SDHCI_ADMA_ADDRESS); | 660 | host->ioaddr + SDHCI_ADMA_ADDRESS); |
@@ -664,7 +673,7 @@ static void sdhci_prepare_data(struct sdhci_host *host, struct mmc_data *data) | |||
664 | * us an invalid request. | 673 | * us an invalid request. |
665 | */ | 674 | */ |
666 | WARN_ON(1); | 675 | WARN_ON(1); |
667 | host->flags &= ~SDHCI_USE_DMA; | 676 | host->flags &= ~SDHCI_REQ_USE_DMA; |
668 | } else { | 677 | } else { |
669 | WARN_ON(sg_cnt != 1); | 678 | WARN_ON(sg_cnt != 1); |
670 | writel(sg_dma_address(data->sg), | 679 | writel(sg_dma_address(data->sg), |
diff --git a/drivers/mmc/host/sdhci.h b/drivers/mmc/host/sdhci.h index e354faee5df0..197d4a05f4ae 100644 --- a/drivers/mmc/host/sdhci.h +++ b/drivers/mmc/host/sdhci.h | |||
@@ -206,6 +206,8 @@ struct sdhci_host { | |||
206 | #define SDHCI_QUIRK_NO_SIMULT_VDD_AND_POWER (1<<11) | 206 | #define SDHCI_QUIRK_NO_SIMULT_VDD_AND_POWER (1<<11) |
207 | /* Controller provides an incorrect timeout value for transfers */ | 207 | /* Controller provides an incorrect timeout value for transfers */ |
208 | #define SDHCI_QUIRK_BROKEN_TIMEOUT_VAL (1<<12) | 208 | #define SDHCI_QUIRK_BROKEN_TIMEOUT_VAL (1<<12) |
209 | /* Controller has an issue with buffer bits for small transfers */ | ||
210 | #define SDHCI_QUIRK_BROKEN_SMALL_PIO (1<<13) | ||
209 | 211 | ||
210 | int irq; /* Device IRQ */ | 212 | int irq; /* Device IRQ */ |
211 | void __iomem * ioaddr; /* Mapped address */ | 213 | void __iomem * ioaddr; /* Mapped address */ |