diff options
Diffstat (limited to 'drivers/mmc/host/imxmmc.c')
-rw-r--r-- | drivers/mmc/host/imxmmc.c | 19 |
1 files changed, 7 insertions, 12 deletions
diff --git a/drivers/mmc/host/imxmmc.c b/drivers/mmc/host/imxmmc.c index eb29b1d933ac..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) { |
@@ -938,7 +933,7 @@ static void imxmci_check_status(unsigned long data) | |||
938 | mod_timer(&host->timer, jiffies + (HZ>>1)); | 933 | mod_timer(&host->timer, jiffies + (HZ>>1)); |
939 | } | 934 | } |
940 | 935 | ||
941 | static int imxmci_probe(struct platform_device *pdev) | 936 | static int __init imxmci_probe(struct platform_device *pdev) |
942 | { | 937 | { |
943 | struct mmc_host *mmc; | 938 | struct mmc_host *mmc; |
944 | struct imxmci_host *host = NULL; | 939 | struct imxmci_host *host = NULL; |
@@ -1034,6 +1029,7 @@ static int 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; |
@@ -1079,7 +1075,7 @@ out: | |||
1079 | return ret; | 1075 | return ret; |
1080 | } | 1076 | } |
1081 | 1077 | ||
1082 | static int imxmci_remove(struct platform_device *pdev) | 1078 | static int __exit imxmci_remove(struct platform_device *pdev) |
1083 | { | 1079 | { |
1084 | struct mmc_host *mmc = platform_get_drvdata(pdev); | 1080 | struct mmc_host *mmc = platform_get_drvdata(pdev); |
1085 | 1081 | ||
@@ -1145,8 +1141,7 @@ static int imxmci_resume(struct platform_device *dev) | |||
1145 | #endif /* CONFIG_PM */ | 1141 | #endif /* CONFIG_PM */ |
1146 | 1142 | ||
1147 | static struct platform_driver imxmci_driver = { | 1143 | static struct platform_driver imxmci_driver = { |
1148 | .probe = imxmci_probe, | 1144 | .remove = __exit_p(imxmci_remove), |
1149 | .remove = imxmci_remove, | ||
1150 | .suspend = imxmci_suspend, | 1145 | .suspend = imxmci_suspend, |
1151 | .resume = imxmci_resume, | 1146 | .resume = imxmci_resume, |
1152 | .driver = { | 1147 | .driver = { |
@@ -1157,7 +1152,7 @@ static struct platform_driver imxmci_driver = { | |||
1157 | 1152 | ||
1158 | static int __init imxmci_init(void) | 1153 | static int __init imxmci_init(void) |
1159 | { | 1154 | { |
1160 | return platform_driver_register(&imxmci_driver); | 1155 | return platform_driver_probe(&imxmci_driver, imxmci_probe); |
1161 | } | 1156 | } |
1162 | 1157 | ||
1163 | static void __exit imxmci_exit(void) | 1158 | static void __exit imxmci_exit(void) |