aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/mmc/host
diff options
context:
space:
mode:
authorRussell King <rmk+kernel@arm.linux.org.uk>2009-09-24 16:22:33 -0400
committerRussell King <rmk+kernel@arm.linux.org.uk>2009-09-24 16:22:33 -0400
commitbaea7b946f00a291b166ccae7fcfed6c01530cc6 (patch)
tree4aa275fbdbec9c7b9b4629e8bee2bbecd3c6a6af /drivers/mmc/host
parentae19ffbadc1b2100285a5b5b3d0a4e0a11390904 (diff)
parent94e0fb086fc5663c38bbc0fe86d698be8314f82f (diff)
Merge branch 'origin' into for-linus
Conflicts: MAINTAINERS
Diffstat (limited to 'drivers/mmc/host')
-rw-r--r--drivers/mmc/host/Kconfig29
-rw-r--r--drivers/mmc/host/Makefile1
-rw-r--r--drivers/mmc/host/atmel-mci.c42
-rw-r--r--drivers/mmc/host/mmc_spi.c1
-rw-r--r--drivers/mmc/host/msm_sdcc.c1287
-rw-r--r--drivers/mmc/host/msm_sdcc.h238
-rw-r--r--drivers/mmc/host/mxcmmc.c2
-rw-r--r--drivers/mmc/host/omap_hsmmc.c1083
-rw-r--r--drivers/mmc/host/sdhci-of.c49
-rw-r--r--drivers/mmc/host/sdhci-pci.c5
-rw-r--r--drivers/mmc/host/sdhci.c54
-rw-r--r--drivers/mmc/host/sdhci.h6
12 files changed, 2541 insertions, 256 deletions
diff --git a/drivers/mmc/host/Kconfig b/drivers/mmc/host/Kconfig
index 891ef18bd77b..7cb057f3f883 100644
--- a/drivers/mmc/host/Kconfig
+++ b/drivers/mmc/host/Kconfig
@@ -132,11 +132,11 @@ config MMC_OMAP
132 132
133config MMC_OMAP_HS 133config MMC_OMAP_HS
134 tristate "TI OMAP High Speed Multimedia Card Interface support" 134 tristate "TI OMAP High Speed Multimedia Card Interface support"
135 depends on ARCH_OMAP2430 || ARCH_OMAP3 135 depends on ARCH_OMAP2430 || ARCH_OMAP3 || ARCH_OMAP4
136 help 136 help
137 This selects the TI OMAP High Speed Multimedia card Interface. 137 This selects the TI OMAP High Speed Multimedia card Interface.
138 If you have an OMAP2430 or OMAP3 board with a Multimedia Card slot, 138 If you have an OMAP2430 or OMAP3 board or OMAP4 board with a
139 say Y or M here. 139 Multimedia Card slot, say Y or M here.
140 140
141 If unsure, say N. 141 If unsure, say N.
142 142
@@ -160,6 +160,12 @@ config MMC_AU1X
160 160
161 If unsure, say N. 161 If unsure, say N.
162 162
163choice
164 prompt "Atmel SD/MMC Driver"
165 default MMC_ATMELMCI if AVR32
166 help
167 Choose which driver to use for the Atmel MCI Silicon
168
163config MMC_AT91 169config MMC_AT91
164 tristate "AT91 SD/MMC Card Interface support" 170 tristate "AT91 SD/MMC Card Interface support"
165 depends on ARCH_AT91 171 depends on ARCH_AT91
@@ -170,17 +176,19 @@ config MMC_AT91
170 176
171config MMC_ATMELMCI 177config MMC_ATMELMCI
172 tristate "Atmel Multimedia Card Interface support" 178 tristate "Atmel Multimedia Card Interface support"
173 depends on AVR32 179 depends on AVR32 || ARCH_AT91
174 help 180 help
175 This selects the Atmel Multimedia Card Interface driver. If 181 This selects the Atmel Multimedia Card Interface driver. If
176 you have an AT32 (AVR32) platform with a Multimedia Card 182 you have an AT32 (AVR32) or AT91 platform with a Multimedia
177 slot, say Y or M here. 183 Card slot, say Y or M here.
178 184
179 If unsure, say N. 185 If unsure, say N.
180 186
187endchoice
188
181config MMC_ATMELMCI_DMA 189config MMC_ATMELMCI_DMA
182 bool "Atmel MCI DMA support (EXPERIMENTAL)" 190 bool "Atmel MCI DMA support (EXPERIMENTAL)"
183 depends on MMC_ATMELMCI && DMA_ENGINE && EXPERIMENTAL 191 depends on MMC_ATMELMCI && AVR32 && DMA_ENGINE && EXPERIMENTAL
184 help 192 help
185 Say Y here to have the Atmel MCI driver use a DMA engine to 193 Say Y here to have the Atmel MCI driver use a DMA engine to
186 do data transfers and thus increase the throughput and 194 do data transfers and thus increase the throughput and
@@ -199,6 +207,13 @@ config MMC_IMX
199 207
200 If unsure, say N. 208 If unsure, say N.
201 209
210config MMC_MSM7X00A
211 tristate "Qualcomm MSM 7X00A SDCC Controller Support"
212 depends on MMC && ARCH_MSM
213 help
214 This provides support for the SD/MMC cell found in the
215 MSM 7X00A controllers from Qualcomm.
216
202config MMC_MXC 217config MMC_MXC
203 tristate "Freescale i.MX2/3 Multimedia Card Interface support" 218 tristate "Freescale i.MX2/3 Multimedia Card Interface support"
204 depends on ARCH_MXC 219 depends on ARCH_MXC
diff --git a/drivers/mmc/host/Makefile b/drivers/mmc/host/Makefile
index cf153f628457..abcb0400e06d 100644
--- a/drivers/mmc/host/Makefile
+++ b/drivers/mmc/host/Makefile
@@ -23,6 +23,7 @@ obj-$(CONFIG_MMC_OMAP_HS) += omap_hsmmc.o
23obj-$(CONFIG_MMC_AT91) += at91_mci.o 23obj-$(CONFIG_MMC_AT91) += at91_mci.o
24obj-$(CONFIG_MMC_ATMELMCI) += atmel-mci.o 24obj-$(CONFIG_MMC_ATMELMCI) += atmel-mci.o
25obj-$(CONFIG_MMC_TIFM_SD) += tifm_sd.o 25obj-$(CONFIG_MMC_TIFM_SD) += tifm_sd.o
26obj-$(CONFIG_MMC_MSM7X00A) += msm_sdcc.o
26obj-$(CONFIG_MMC_MVSDIO) += mvsdio.o 27obj-$(CONFIG_MMC_MVSDIO) += mvsdio.o
27obj-$(CONFIG_MMC_SPI) += mmc_spi.o 28obj-$(CONFIG_MMC_SPI) += mmc_spi.o
28ifeq ($(CONFIG_OF),y) 29ifeq ($(CONFIG_OF),y)
diff --git a/drivers/mmc/host/atmel-mci.c b/drivers/mmc/host/atmel-mci.c
index 7b603e4b41db..fc25586b7ee1 100644
--- a/drivers/mmc/host/atmel-mci.c
+++ b/drivers/mmc/host/atmel-mci.c
@@ -30,6 +30,7 @@
30#include <asm/io.h> 30#include <asm/io.h>
31#include <asm/unaligned.h> 31#include <asm/unaligned.h>
32 32
33#include <mach/cpu.h>
33#include <mach/board.h> 34#include <mach/board.h>
34 35
35#include "atmel-mci-regs.h" 36#include "atmel-mci-regs.h"
@@ -210,6 +211,18 @@ struct atmel_mci_slot {
210 set_bit(event, &host->pending_events) 211 set_bit(event, &host->pending_events)
211 212
212/* 213/*
214 * Enable or disable features/registers based on
215 * whether the processor supports them
216 */
217static bool mci_has_rwproof(void)
218{
219 if (cpu_is_at91sam9261() || cpu_is_at91rm9200())
220 return false;
221 else
222 return true;
223}
224
225/*
213 * The debugfs stuff below is mostly optimized away when 226 * The debugfs stuff below is mostly optimized away when
214 * CONFIG_DEBUG_FS is not set. 227 * CONFIG_DEBUG_FS is not set.
215 */ 228 */
@@ -276,8 +289,13 @@ static void atmci_show_status_reg(struct seq_file *s,
276 [3] = "BLKE", 289 [3] = "BLKE",
277 [4] = "DTIP", 290 [4] = "DTIP",
278 [5] = "NOTBUSY", 291 [5] = "NOTBUSY",
292 [6] = "ENDRX",
293 [7] = "ENDTX",
279 [8] = "SDIOIRQA", 294 [8] = "SDIOIRQA",
280 [9] = "SDIOIRQB", 295 [9] = "SDIOIRQB",
296 [12] = "SDIOWAIT",
297 [14] = "RXBUFF",
298 [15] = "TXBUFE",
281 [16] = "RINDE", 299 [16] = "RINDE",
282 [17] = "RDIRE", 300 [17] = "RDIRE",
283 [18] = "RCRCE", 301 [18] = "RCRCE",
@@ -285,6 +303,11 @@ static void atmci_show_status_reg(struct seq_file *s,
285 [20] = "RTOE", 303 [20] = "RTOE",
286 [21] = "DCRCE", 304 [21] = "DCRCE",
287 [22] = "DTOE", 305 [22] = "DTOE",
306 [23] = "CSTOE",
307 [24] = "BLKOVRE",
308 [25] = "DMADONE",
309 [26] = "FIFOEMPTY",
310 [27] = "XFRDONE",
288 [30] = "OVRE", 311 [30] = "OVRE",
289 [31] = "UNRE", 312 [31] = "UNRE",
290 }; 313 };
@@ -576,6 +599,7 @@ atmci_submit_data_dma(struct atmel_mci *host, struct mmc_data *data)
576 struct scatterlist *sg; 599 struct scatterlist *sg;
577 unsigned int i; 600 unsigned int i;
578 enum dma_data_direction direction; 601 enum dma_data_direction direction;
602 unsigned int sglen;
579 603
580 /* 604 /*
581 * We don't do DMA on "complex" transfers, i.e. with 605 * We don't do DMA on "complex" transfers, i.e. with
@@ -605,11 +629,14 @@ atmci_submit_data_dma(struct atmel_mci *host, struct mmc_data *data)
605 else 629 else
606 direction = DMA_TO_DEVICE; 630 direction = DMA_TO_DEVICE;
607 631
632 sglen = dma_map_sg(&host->pdev->dev, data->sg, data->sg_len, direction);
633 if (sglen != data->sg_len)
634 goto unmap_exit;
608 desc = chan->device->device_prep_slave_sg(chan, 635 desc = chan->device->device_prep_slave_sg(chan,
609 data->sg, data->sg_len, direction, 636 data->sg, data->sg_len, direction,
610 DMA_PREP_INTERRUPT | DMA_CTRL_ACK); 637 DMA_PREP_INTERRUPT | DMA_CTRL_ACK);
611 if (!desc) 638 if (!desc)
612 return -ENOMEM; 639 goto unmap_exit;
613