summaryrefslogtreecommitdiff
path: root/include/linux/mmc
diff options
context:
space:
mode:
authorHeiko Stuebner <heiko@sntech.de>2015-08-03 17:04:10 +0200
committerUlf Hansson <ulf.hansson@linaro.org>2015-08-17 12:44:43 +0200
commit575c319dfe872fc8bf1d57b244fb40f497ab3a47 (patch)
tree84879e8e97d54cc9237110d27f443eedfd5df64d /include/linux/mmc
parent0e3a22c044478b6114a767af4a765c0e33eddd53 (diff)
mmc: dw_mmc: fix pio mode when internal dmac is enabled
The dw_mci_init_dma() may decide to not use dma, but pio instead, caused by things like wrong dma settings in the system. Till now the code dw_mci_init_slot() always assumed that dma is available when CONFIG_MMC_DW_IDMAC was defined, ignoring the host->use_dma var set during dma init. So when now the dma init failed for whatever reason, the transfer sizes would still be set for dma transfers, especially including the maximum block-count calculated from host->ring_size and resulting in a [ 4.991109] ------------[ cut here ]------------ [ 4.991111] kernel BUG at drivers/mmc/core/core.c:256! [ 4.991113] Internal error: Oops - BUG: 0 [#1] SMP ARM because host->ring_size is 0 in this case and the slot init code uses the wrong code to calculate the values. Fix this by selecting the correct calculations using the host->use_dma variable instead of the CONFIG_MMC_DW_IDMAC config option. Signed-off-by: Heiko Stuebner <heiko@sntech.de> Signed-off-by: Jaehoon Chung <jh80.chung@samsung.com>
Diffstat (limited to 'include/linux/mmc')
-rw-r--r--include/linux/mmc/dw_mmc.h4
1 files changed, 0 insertions, 4 deletions
diff --git a/include/linux/mmc/dw_mmc.h b/include/linux/mmc/dw_mmc.h
index 5be97676f1fa..1d88bf72c65f 100644
--- a/include/linux/mmc/dw_mmc.h
+++ b/include/linux/mmc/dw_mmc.h
@@ -153,11 +153,7 @@ struct dw_mci {
dma_addr_t sg_dma;
void *sg_cpu;
const struct dw_mci_dma_ops *dma_ops;
-#ifdef CONFIG_MMC_DW_IDMAC
unsigned int ring_size;
-#else
- struct dw_mci_dma_data *dma_data;
-#endif
u32 cmd_status;
u32 data_status;
u32 stop_cmdr;