summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorVignesh Raghavendra <vigneshr@ti.com>2020-01-16 14:23:48 +0530
committerTom Rini <trini@konsulko.com>2020-01-25 12:04:36 -0500
commit5cde44e12adc180575d5ee35ef251e0470a10598 (patch)
tree41151cc5087f8c4efb0ae1fde39080c921355b8d
parent6fff562bafb93cef2b9a03a3e243cf1f29b7c582 (diff)
downloadu-boot-5cde44e12adc180575d5ee35ef251e0470a10598.tar.gz
net: macb: Drop local cache flush
Now that arch specific dma mapping APIs take care of cache flush/invalidate, drop local cache flush operation. While at that fix dma_unmap_single() call to match new prototype Signed-off-by: Vignesh Raghavendra <vigneshr@ti.com>
-rw-r--r--drivers/net/macb.c4
1 files changed, 1 insertions, 3 deletions
diff --git a/drivers/net/macb.c b/drivers/net/macb.c
index 8359425378..0d4929bec1 100644
--- a/drivers/net/macb.c
+++ b/drivers/net/macb.c
@@ -327,8 +327,6 @@ static int _macb_send(struct macb_device *macb, const char *name, void *packet,
macb->tx_ring[tx_head].addr = paddr;
barrier();
macb_flush_ring_desc(macb, TX);
- /* Do we need check paddr and length is dcache line aligned? */
- flush_dcache_range(paddr, paddr + ALIGN(length, ARCH_DMA_MINALIGN));
macb_writel(macb, NCR, MACB_BIT(TE) | MACB_BIT(RE) | MACB_BIT(TSTART));
/*
@@ -344,7 +342,7 @@ static int _macb_send(struct macb_device *macb, const char *name, void *packet,
udelay(1);
}
- dma_unmap_single(packet, length, paddr);
+ dma_unmap_single(packet, length, DMA_TO_DEVICE);
if (i <= MACB_TX_TIMEOUT) {
if (ctrl & MACB_BIT(TX_UNDERRUN))