|
18 | 18 | * Copyright 2012 Marvell International Ltd.
|
19 | 19 | */
|
20 | 20 | #include <linux/dmaengine.h>
|
21 |
| -#include <linux/dma-direct.h> |
22 | 21 | #include <linux/dma-mapping.h>
|
23 | 22 | #include <linux/dmapool.h>
|
24 | 23 | #include <linux/err.h>
|
@@ -1024,12 +1023,14 @@ static struct dma_async_tx_descriptor *bcm2835_dma_prep_slave_sg(
|
1024 | 1023 | if (direction == DMA_DEV_TO_MEM) {
|
1025 | 1024 | if (c->cfg.src_addr_width != DMA_SLAVE_BUSWIDTH_4_BYTES)
|
1026 | 1025 | return NULL;
|
1027 |
| - src = phys_to_dma(chan->device->dev, c->cfg.src_addr); |
| 1026 | + src = dma_map_resource(chan->device->dev, DMA_SLAVE_BUSWIDTH_4_BYTES, |
| 1027 | + c->cfg.src_addr, DMA_FROM_DEVICE, 0); |
1028 | 1028 | info |= BCM2835_DMA_S_DREQ | BCM2835_DMA_D_INC;
|
1029 | 1029 | } else {
|
1030 | 1030 | if (c->cfg.dst_addr_width != DMA_SLAVE_BUSWIDTH_4_BYTES)
|
1031 | 1031 | return NULL;
|
1032 |
| - dst = phys_to_dma(chan->device->dev, c->cfg.dst_addr); |
| 1032 | + dst = dma_map_resource(chan->device->dev, DMA_SLAVE_BUSWIDTH_4_BYTES, |
| 1033 | + c->cfg.dst_addr, DMA_TO_DEVICE, 0); |
1033 | 1034 | info |= BCM2835_DMA_D_DREQ | BCM2835_DMA_S_INC;
|
1034 | 1035 | }
|
1035 | 1036 |
|
@@ -1099,13 +1100,15 @@ static struct dma_async_tx_descriptor *bcm2835_dma_prep_dma_cyclic(
|
1099 | 1100 | if (direction == DMA_DEV_TO_MEM) {
|
1100 | 1101 | if (c->cfg.src_addr_width != DMA_SLAVE_BUSWIDTH_4_BYTES)
|
1101 | 1102 | return NULL;
|
1102 |
| - src = phys_to_dma(chan->device->dev, c->cfg.src_addr); |
| 1103 | + src = dma_map_resource(chan->device->dev, DMA_SLAVE_BUSWIDTH_4_BYTES, |
| 1104 | + c->cfg.src_addr, DMA_FROM_DEVICE, 0); |
1103 | 1105 | dst = buf_addr;
|
1104 | 1106 | info |= BCM2835_DMA_S_DREQ | BCM2835_DMA_D_INC;
|
1105 | 1107 | } else {
|
1106 | 1108 | if (c->cfg.dst_addr_width != DMA_SLAVE_BUSWIDTH_4_BYTES)
|
1107 | 1109 | return NULL;
|
1108 |
| - dst = phys_to_dma(chan->device->dev, c->cfg.dst_addr); |
| 1110 | + dst = dma_map_resource(chan->device->dev, DMA_SLAVE_BUSWIDTH_4_BYTES, |
| 1111 | + c->cfg.dst_addr, DMA_TO_DEVICE, 0); |
1109 | 1112 | src = buf_addr;
|
1110 | 1113 | info |= BCM2835_DMA_D_DREQ | BCM2835_DMA_S_INC;
|
1111 | 1114 |
|
|
0 commit comments