aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/mmc
diff options
context:
space:
mode:
authorTony Lindgren <tony@atomide.com>2008-12-10 20:37:16 -0500
committerTony Lindgren <tony@atomide.com>2008-12-10 20:37:16 -0500
commitd88746652b4d133284d1fdd05b5e999e8f44c998 (patch)
tree2a6cfd6fe175a18eb4b4f600e0a79444259c9a5d /drivers/mmc
parent652bcd8f72cc0cdf4499ce7d73990514e5e3e4b9 (diff)
omap mmc: Add better MMC low-level init
This will simplify the MMC low-level init, and make it more flexible to add support for a newer MMC controller in the following patches. The patch rearranges platform data and gets rid of slot vs controller confusion in the old data structures. Also fix device id numbering in the clock code. Some code snippets are based on an earlier patch by Russell King <linux@arm.linux.org.uk>. Cc: Pierre Ossman <drzeus-mmc@drzeus.cx> Signed-off-by: Tony Lindgren <tony@atomide.com>
Diffstat (limited to 'drivers/mmc')
-rw-r--r--drivers/mmc/host/omap.c7
1 files changed, 4 insertions, 3 deletions
diff --git a/drivers/mmc/host/omap.c b/drivers/mmc/host/omap.c
index 1b9fc3c6b875..c6544d2d072a 100644
--- a/drivers/mmc/host/omap.c
+++ b/drivers/mmc/host/omap.c
@@ -1015,7 +1015,7 @@ static int mmc_omap_get_dma_channel(struct mmc_omap_host *host, struct mmc_data
1015 } 1015 }
1016 1016
1017 if (is_read) { 1017 if (is_read) {
1018 if (host->id == 1) { 1018 if (host->id == 0) {
1019 sync_dev = OMAP_DMA_MMC_RX; 1019 sync_dev = OMAP_DMA_MMC_RX;
1020 dma_dev_name = "MMC1 read"; 1020 dma_dev_name = "MMC1 read";
1021 } else { 1021 } else {
@@ -1023,7 +1023,7 @@ static int mmc_omap_get_dma_channel(struct mmc_omap_host *host, struct mmc_data
1023 dma_dev_name = "MMC2 read"; 1023 dma_dev_name = "MMC2 read";
1024 } 1024 }
1025 } else { 1025 } else {
1026 if (host->id == 1) { 1026 if (host->id == 0) {
1027 sync_dev = OMAP_DMA_MMC_TX; 1027 sync_dev = OMAP_DMA_MMC_TX;
1028 dma_dev_name = "MMC1 write"; 1028 dma_dev_name = "MMC1 write";
1029 } else { 1029 } else {
@@ -1317,7 +1317,7 @@ static int __init mmc_omap_new_slot(struct mmc_omap_host *host, int id)
1317 host->slots[id] = slot; 1317 host->slots[id] = slot;
1318 1318
1319 mmc->caps = 0; 1319 mmc->caps = 0;
1320 if (host->pdata->conf.wire4) 1320 if (host->pdata->slots[id].wire4)
1321 mmc->caps |= MMC_CAP_4_BIT_DATA; 1321 mmc->caps |= MMC_CAP_4_BIT_DATA;
1322 1322
1323 mmc->ops = &mmc_omap_ops; 1323 mmc->ops = &mmc_omap_ops;
@@ -1451,6 +1451,7 @@ static int __init mmc_omap_probe(struct platform_device *pdev)
1451 host->irq = irq; 1451 host->irq = irq;
1452 1452
1453 host->use_dma = 1; 1453 host->use_dma = 1;
1454 host->dev->dma_mask = &pdata->dma_mask;
1454 host->dma_ch = -1; 1455 host->dma_ch = -1;
1455 1456
1456 host->irq = irq; 1457 host->irq = irq;