diff options
Diffstat (limited to 'drivers/mmc/host/tmio_mmc_dma.c')
-rw-r--r-- | drivers/mmc/host/tmio_mmc_dma.c | 10 |
1 files changed, 3 insertions, 7 deletions
diff --git a/drivers/mmc/host/tmio_mmc_dma.c b/drivers/mmc/host/tmio_mmc_dma.c index 331bb618e398..e4b05dbb9ca8 100644 --- a/drivers/mmc/host/tmio_mmc_dma.c +++ b/drivers/mmc/host/tmio_mmc_dma.c | |||
@@ -261,7 +261,7 @@ void tmio_mmc_request_dma(struct tmio_mmc_host *host, struct tmio_mmc_data *pdat | |||
261 | { | 261 | { |
262 | /* We can only either use DMA for both Tx and Rx or not use it at all */ | 262 | /* We can only either use DMA for both Tx and Rx or not use it at all */ |
263 | if (!host->dma || (!host->pdev->dev.of_node && | 263 | if (!host->dma || (!host->pdev->dev.of_node && |
264 | (!host->dma->chan_priv_tx || !host->dma->chan_priv_rx))) | 264 | (!pdata->chan_priv_tx || !pdata->chan_priv_rx))) |
265 | return; | 265 | return; |
266 | 266 | ||
267 | if (!host->chan_tx && !host->chan_rx) { | 267 | if (!host->chan_tx && !host->chan_rx) { |
@@ -278,7 +278,7 @@ void tmio_mmc_request_dma(struct tmio_mmc_host *host, struct tmio_mmc_data *pdat | |||
278 | dma_cap_set(DMA_SLAVE, mask); | 278 | dma_cap_set(DMA_SLAVE, mask); |
279 | 279 | ||
280 | host->chan_tx = dma_request_slave_channel_compat(mask, | 280 | host->chan_tx = dma_request_slave_channel_compat(mask, |
281 | host->dma->filter, host->dma->chan_priv_tx, | 281 | host->dma->filter, pdata->chan_priv_tx, |
282 | &host->pdev->dev, "tx"); | 282 | &host->pdev->dev, "tx"); |
283 | dev_dbg(&host->pdev->dev, "%s: TX: got channel %p\n", __func__, | 283 | dev_dbg(&host->pdev->dev, "%s: TX: got channel %p\n", __func__, |
284 | host->chan_tx); | 284 | host->chan_tx); |
@@ -286,8 +286,6 @@ void tmio_mmc_request_dma(struct tmio_mmc_host *host, struct tmio_mmc_data *pdat | |||
286 | if (!host->chan_tx) | 286 | if (!host->chan_tx) |
287 | return; | 287 | return; |
288 | 288 | ||
289 | if (host->dma->chan_priv_tx) | ||
290 | cfg.slave_id = host->dma->slave_id_tx; | ||
291 | cfg.direction = DMA_MEM_TO_DEV; | 289 | cfg.direction = DMA_MEM_TO_DEV; |
292 | cfg.dst_addr = res->start + (CTL_SD_DATA_PORT << host->bus_shift); | 290 | cfg.dst_addr = res->start + (CTL_SD_DATA_PORT << host->bus_shift); |
293 | cfg.dst_addr_width = host->dma->dma_buswidth; | 291 | cfg.dst_addr_width = host->dma->dma_buswidth; |
@@ -299,7 +297,7 @@ void tmio_mmc_request_dma(struct tmio_mmc_host *host, struct tmio_mmc_data *pdat | |||
299 | goto ecfgtx; | 297 | goto ecfgtx; |
300 | 298 | ||
301 | host->chan_rx = dma_request_slave_channel_compat(mask, | 299 | host->chan_rx = dma_request_slave_channel_compat(mask, |
302 | host->dma->filter, host->dma->chan_priv_rx, | 300 | host->dma->filter, pdata->chan_priv_rx, |
303 | &host->pdev->dev, "rx"); | 301 | &host->pdev->dev, "rx"); |
304 | dev_dbg(&host->pdev->dev, "%s: RX: got channel %p\n", __func__, | 302 | dev_dbg(&host->pdev->dev, "%s: RX: got channel %p\n", __func__, |
305 | host->chan_rx); | 303 | host->chan_rx); |
@@ -307,8 +305,6 @@ void tmio_mmc_request_dma(struct tmio_mmc_host *host, struct tmio_mmc_data *pdat | |||
307 | if (!host->chan_rx) | 305 | if (!host->chan_rx) |
308 | goto ereqrx; | 306 | goto ereqrx; |
309 | 307 | ||
310 | if (host->dma->chan_priv_rx) | ||
311 | cfg.slave_id = host->dma->slave_id_rx; | ||
312 | cfg.direction = DMA_DEV_TO_MEM; | 308 | cfg.direction = DMA_DEV_TO_MEM; |
313 | cfg.src_addr = cfg.dst_addr + host->pdata->dma_rx_offset; | 309 | cfg.src_addr = cfg.dst_addr + host->pdata->dma_rx_offset; |
314 | cfg.src_addr_width = host->dma->dma_buswidth; | 310 | cfg.src_addr_width = host->dma->dma_buswidth; |