diff options
author | Paulius Zaleckas <paulius.zaleckas@teltonika.lt> | 2009-03-25 05:18:50 -0400 |
---|---|---|
committer | Pierre Ossman <drzeus@drzeus.cx> | 2009-04-08 14:11:59 -0400 |
commit | 34b28950168abd7ad55fe3493ea21f1340c7294a (patch) | |
tree | 0db7097f68ffdbecfe7dcda4cbf31c25636ee9f2 /drivers | |
parent | b513b6cc0fcbb0ef733eec487618da7ea2d7cc61 (diff) |
imxmmc: move RSSR BLR
DMA request source (RSSR) needs to be set only once (in probe).
DMA burst length (BLR) need to be set only in set_ios()
This cleans up imxmci_setup_data() and should make it a little
bit faster :)
Signed-off-by: Paulius Zaleckas <paulius.zaleckas@teltonika.lt>
Signed-off-by: Pierre Ossman <drzeus@drzeus.cx>
Diffstat (limited to 'drivers')
-rw-r--r-- | drivers/mmc/host/imxmmc.c | 10 |
1 files changed, 3 insertions, 7 deletions
diff --git a/drivers/mmc/host/imxmmc.c b/drivers/mmc/host/imxmmc.c index 0fa7af38919b..e0be21a4a696 100644 --- a/drivers/mmc/host/imxmmc.c +++ b/drivers/mmc/host/imxmmc.c | |||
@@ -307,13 +307,6 @@ static void imxmci_setup_data(struct imxmci_host *host, struct mmc_data *data) | |||
307 | 307 | ||
308 | wmb(); | 308 | wmb(); |
309 | 309 | ||
310 | if (host->actual_bus_width == MMC_BUS_WIDTH_4) | ||
311 | BLR(host->dma) = 0; /* burst 64 byte read / 64 bytes write */ | ||
312 | else | ||
313 | BLR(host->dma) = 16; /* burst 16 byte read / 16 bytes write */ | ||
314 | |||
315 | RSSR(host->dma) = DMA_REQ_SDHC; | ||
316 | |||
317 | set_bit(IMXMCI_PEND_DMA_DATA_b, &host->pending_events); | 310 | set_bit(IMXMCI_PEND_DMA_DATA_b, &host->pending_events); |
318 | clear_bit(IMXMCI_PEND_CPU_DATA_b, &host->pending_events); | 311 | clear_bit(IMXMCI_PEND_CPU_DATA_b, &host->pending_events); |
319 | 312 | ||
@@ -818,9 +811,11 @@ static void imxmci_set_ios(struct mmc_host *mmc, struct mmc_ios *ios) | |||
818 | if (ios->bus_width == MMC_BUS_WIDTH_4) { | 811 | if (ios->bus_width == MMC_BUS_WIDTH_4) { |
819 | host->actual_bus_width = MMC_BUS_WIDTH_4; | 812 | host->actual_bus_width = MMC_BUS_WIDTH_4; |
820 | imx_gpio_mode(PB11_PF_SD_DAT3); | 813 | imx_gpio_mode(PB11_PF_SD_DAT3); |
814 | BLR(host->dma) = 0; /* burst 64 byte read/write */ | ||
821 | } else { | 815 | } else { |
822 | host->actual_bus_width = MMC_BUS_WIDTH_1; | 816 | host->actual_bus_width = MMC_BUS_WIDTH_1; |
823 | imx_gpio_mode(GPIO_PORTB | GPIO_IN | GPIO_PUEN | 11); | 817 | imx_gpio_mode(GPIO_PORTB | GPIO_IN | GPIO_PUEN | 11); |
818 | BLR(host->dma) = 16; /* burst 16 byte read/write */ | ||
824 | } | 819 | } |
825 | 820 | ||
826 | if (host->power_mode != ios->power_mode) { | 821 | if (host->power_mode != ios->power_mode) { |
@@ -1034,6 +1029,7 @@ static int __init imxmci_probe(struct platform_device *pdev) | |||
1034 | } | 1029 | } |
1035 | host->dma_allocated = 1; | 1030 | host->dma_allocated = 1; |
1036 | imx_dma_setup_handlers(host->dma, imxmci_dma_irq, NULL, host); | 1031 | imx_dma_setup_handlers(host->dma, imxmci_dma_irq, NULL, host); |
1032 | RSSR(host->dma) = DMA_REQ_SDHC; | ||
1037 | 1033 | ||
1038 | tasklet_init(&host->tasklet, imxmci_tasklet_fnc, (unsigned long)host); | 1034 | tasklet_init(&host->tasklet, imxmci_tasklet_fnc, (unsigned long)host); |
1039 | host->status_reg=0; | 1035 | host->status_reg=0; |