aboutsummaryrefslogtreecommitdiff
path: root/drivers
diff options
context:
space:
mode:
authorMasahiro Yamada2020-02-14 16:40:18 +0900
committerPeng Fan2020-02-19 21:27:30 +0800
commit950c5968672a22a65790534234d1106bd1303652 (patch)
treedcdcf7cf9c5f247f17ce4fabd18ce85e238dacb9 /drivers
parentc22c0dbd7d3bb7ce47779b757d567d2e7746744b (diff)
dma-mapping: fix the prototype of dma_unmap_single()
dma_unmap_single() takes the dma address, not virtual address. Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>
Diffstat (limited to 'drivers')
-rw-r--r--drivers/mmc/tmio-common.c2
-rw-r--r--drivers/mtd/nand/raw/denali.c2
-rw-r--r--drivers/net/macb.c2
-rw-r--r--drivers/usb/dwc3/core.c6
-rw-r--r--drivers/usb/gadget/udc/udc-core.c2
5 files changed, 7 insertions, 7 deletions
diff --git a/drivers/mmc/tmio-common.c b/drivers/mmc/tmio-common.c
index 092b740f564..53213888473 100644
--- a/drivers/mmc/tmio-common.c
+++ b/drivers/mmc/tmio-common.c
@@ -353,7 +353,7 @@ static int tmio_sd_dma_xfer(struct udevice *dev, struct mmc_data *data)
if (poll_flag == TMIO_SD_DMA_INFO1_END_RD)
udelay(1);
- dma_unmap_single(buf, len, dir);
+ dma_unmap_single(dma_addr, len, dir);
return ret;
}
diff --git a/drivers/mtd/nand/raw/denali.c b/drivers/mtd/nand/raw/denali.c
index f51d3e25c76..3e0ac39777d 100644
--- a/drivers/mtd/nand/raw/denali.c
+++ b/drivers/mtd/nand/raw/denali.c
@@ -581,7 +581,7 @@ static int denali_dma_xfer(struct denali_nand_info *denali, void *buf,
iowrite32(0, denali->reg + DMA_ENABLE);
- dma_unmap_single(buf, size, dir);
+ dma_unmap_single(dma_addr, size, dir);
if (irq_status & INTR__ERASED_PAGE)
memset(buf, 0xff, size);
diff --git a/drivers/net/macb.c b/drivers/net/macb.c
index 0d4929bec13..7a2b1abeeb0 100644
--- a/drivers/net/macb.c
+++ b/drivers/net/macb.c
@@ -342,7 +342,7 @@ static int _macb_send(struct macb_device *macb, const char *name, void *packet,
udelay(1);
}
- dma_unmap_single(packet, length, DMA_TO_DEVICE);
+ dma_unmap_single(paddr, length, DMA_TO_DEVICE);
if (i <= MACB_TX_TIMEOUT) {
if (ctrl & MACB_BIT(TX_UNDERRUN))
diff --git a/drivers/usb/dwc3/core.c b/drivers/usb/dwc3/core.c
index c5066529b7d..6ad1000c9af 100644
--- a/drivers/usb/dwc3/core.c
+++ b/drivers/usb/dwc3/core.c
@@ -288,8 +288,8 @@ static int dwc3_setup_scratch_buffers(struct dwc3 *dwc)
return 0;
err1:
- dma_unmap_single((void *)(uintptr_t)dwc->scratch_addr, dwc->nr_scratch *
- DWC3_SCRATCHBUF_SIZE, DMA_BIDIRECTIONAL);
+ dma_unmap_single(scratch_addr, dwc->nr_scratch * DWC3_SCRATCHBUF_SIZE,
+ DMA_BIDIRECTIONAL);
err0:
return ret;
@@ -303,7 +303,7 @@ static void dwc3_free_scratch_buffers(struct dwc3 *dwc)
if (!dwc->nr_scratch)
return;
- dma_unmap_single((void *)(uintptr_t)dwc->scratch_addr, dwc->nr_scratch *
+ dma_unmap_single(dwc->scratch_addr, dwc->nr_scratch *
DWC3_SCRATCHBUF_SIZE, DMA_BIDIRECTIONAL);
kfree(dwc->scratchbuf);
}
diff --git a/drivers/usb/gadget/udc/udc-core.c b/drivers/usb/gadget/udc/udc-core.c
index a33ab5c95d4..528874507b4 100644
--- a/drivers/usb/gadget/udc/udc-core.c
+++ b/drivers/usb/gadget/udc/udc-core.c
@@ -67,7 +67,7 @@ void usb_gadget_unmap_request(struct usb_gadget *gadget,
if (req->length == 0)
return;
- dma_unmap_single((void *)(uintptr_t)req->dma, req->length,
+ dma_unmap_single(req->dma, req->length,
is_in ? DMA_TO_DEVICE : DMA_FROM_DEVICE);
}
EXPORT_SYMBOL_GPL(usb_gadget_unmap_request);