diff options
-rw-r--r-- | drivers/mmc/host/tmio_mmc.h | 2 | ||||
-rw-r--r-- | drivers/mmc/host/tmio_mmc_dma.c | 8 |
2 files changed, 8 insertions, 2 deletions
diff --git a/drivers/mmc/host/tmio_mmc.h b/drivers/mmc/host/tmio_mmc.h index 0699edb437c4..fc3805ed69d1 100644 --- a/drivers/mmc/host/tmio_mmc.h +++ b/drivers/mmc/host/tmio_mmc.h | |||
@@ -16,6 +16,7 @@ | |||
16 | #ifndef TMIO_MMC_H | 16 | #ifndef TMIO_MMC_H |
17 | #define TMIO_MMC_H | 17 | #define TMIO_MMC_H |
18 | 18 | ||
19 | #include <linux/dmaengine.h> | ||
19 | #include <linux/highmem.h> | 20 | #include <linux/highmem.h> |
20 | #include <linux/mmc/tmio.h> | 21 | #include <linux/mmc/tmio.h> |
21 | #include <linux/mutex.h> | 22 | #include <linux/mutex.h> |
@@ -46,6 +47,7 @@ struct tmio_mmc_dma { | |||
46 | void *chan_priv_rx; | 47 | void *chan_priv_rx; |
47 | int slave_id_tx; | 48 | int slave_id_tx; |
48 | int slave_id_rx; | 49 | int slave_id_rx; |
50 | enum dma_slave_buswidth dma_buswidth; | ||
49 | bool (*filter)(struct dma_chan *chan, void *arg); | 51 | bool (*filter)(struct dma_chan *chan, void *arg); |
50 | void (*enable)(struct tmio_mmc_host *host, bool enable); | 52 | void (*enable)(struct tmio_mmc_host *host, bool enable); |
51 | }; | 53 | }; |
diff --git a/drivers/mmc/host/tmio_mmc_dma.c b/drivers/mmc/host/tmio_mmc_dma.c index eb6b45cdb7ef..aa5f4b6e790d 100644 --- a/drivers/mmc/host/tmio_mmc_dma.c +++ b/drivers/mmc/host/tmio_mmc_dma.c | |||
@@ -293,7 +293,9 @@ void tmio_mmc_request_dma(struct tmio_mmc_host *host, struct tmio_mmc_data *pdat | |||
293 | cfg.slave_id = host->dma->slave_id_tx; | 293 | cfg.slave_id = host->dma->slave_id_tx; |
294 | cfg.direction = DMA_MEM_TO_DEV; | 294 | cfg.direction = DMA_MEM_TO_DEV; |
295 | cfg.dst_addr = res->start + (CTL_SD_DATA_PORT << host->bus_shift); | 295 | cfg.dst_addr = res->start + (CTL_SD_DATA_PORT << host->bus_shift); |
296 | cfg.dst_addr_width = DMA_SLAVE_BUSWIDTH_2_BYTES; | 296 | cfg.dst_addr_width = host->dma->dma_buswidth; |
297 | if (!cfg.dst_addr_width) | ||
298 | cfg.dst_addr_width = DMA_SLAVE_BUSWIDTH_2_BYTES; | ||
297 | cfg.src_addr = 0; | 299 | cfg.src_addr = 0; |
298 | ret = dmaengine_slave_config(host->chan_tx, &cfg); | 300 | ret = dmaengine_slave_config(host->chan_tx, &cfg); |
299 | if (ret < 0) | 301 | if (ret < 0) |
@@ -312,7 +314,9 @@ void tmio_mmc_request_dma(struct tmio_mmc_host *host, struct tmio_mmc_data *pdat | |||
312 | cfg.slave_id = host->dma->slave_id_rx; | 314 | cfg.slave_id = host->dma->slave_id_rx; |
313 | cfg.direction = DMA_DEV_TO_MEM; | 315 | cfg.direction = DMA_DEV_TO_MEM; |
314 | cfg.src_addr = cfg.dst_addr + host->pdata->dma_rx_offset; | 316 | cfg.src_addr = cfg.dst_addr + host->pdata->dma_rx_offset; |
315 | cfg.src_addr_width = DMA_SLAVE_BUSWIDTH_2_BYTES; | 317 | cfg.src_addr_width = host->dma->dma_buswidth; |
318 | if (!cfg.src_addr_width) | ||
319 | cfg.src_addr_width = DMA_SLAVE_BUSWIDTH_2_BYTES; | ||
316 | cfg.dst_addr = 0; | 320 | cfg.dst_addr = 0; |
317 | ret = dmaengine_slave_config(host->chan_rx, &cfg); | 321 | ret = dmaengine_slave_config(host->chan_rx, &cfg); |
318 | if (ret < 0) | 322 | if (ret < 0) |