mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-30 03:27:44 -04:00
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 <[email protected]>. Cc: Pierre Ossman <[email protected]> Signed-off-by: Tony Lindgren <[email protected]>
This commit is contained in:
parent
652bcd8f72
commit
d88746652b
16 changed files with 529 additions and 283 deletions
|
|
@ -1015,7 +1015,7 @@ static int mmc_omap_get_dma_channel(struct mmc_omap_host *host, struct mmc_data
|
|||
}
|
||||
|
||||
if (is_read) {
|
||||
if (host->id == 1) {
|
||||
if (host->id == 0) {
|
||||
sync_dev = OMAP_DMA_MMC_RX;
|
||||
dma_dev_name = "MMC1 read";
|
||||
} else {
|
||||
|
|
@ -1023,7 +1023,7 @@ static int mmc_omap_get_dma_channel(struct mmc_omap_host *host, struct mmc_data
|
|||
dma_dev_name = "MMC2 read";
|
||||
}
|
||||
} else {
|
||||
if (host->id == 1) {
|
||||
if (host->id == 0) {
|
||||
sync_dev = OMAP_DMA_MMC_TX;
|
||||
dma_dev_name = "MMC1 write";
|
||||
} else {
|
||||
|
|
@ -1317,7 +1317,7 @@ static int __init mmc_omap_new_slot(struct mmc_omap_host *host, int id)
|
|||
host->slots[id] = slot;
|
||||
|
||||
mmc->caps = 0;
|
||||
if (host->pdata->conf.wire4)
|
||||
if (host->pdata->slots[id].wire4)
|
||||
mmc->caps |= MMC_CAP_4_BIT_DATA;
|
||||
|
||||
mmc->ops = &mmc_omap_ops;
|
||||
|
|
@ -1451,6 +1451,7 @@ static int __init mmc_omap_probe(struct platform_device *pdev)
|
|||
host->irq = irq;
|
||||
|
||||
host->use_dma = 1;
|
||||
host->dev->dma_mask = &pdata->dma_mask;
|
||||
host->dma_ch = -1;
|
||||
|
||||
host->irq = irq;
|
||||
|
|
|
|||
Loading…
Reference in a new issue