diff mbox series

[v2,4/4] net: macb: Drop local cache flush

Message ID 20200116085348.24031-5-vigneshr@ti.com
State Accepted
Commit 5cde44e12adc180575d5ee35ef251e0470a10598
Headers show
Series dma-mapping: Add cache flush/invalidation to dma_{un}map_single | expand

Commit Message

Vignesh Raghavendra Jan. 16, 2020, 8:53 a.m. UTC
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 at ti.com>
---
 drivers/net/macb.c | 4 +---
 1 file changed, 1 insertion(+), 3 deletions(-)

Comments

Tom Rini Jan. 25, 2020, 5:09 p.m. UTC | #1
On Thu, Jan 16, 2020 at 02:23:48PM +0530, Vignesh Raghavendra wrote:

> 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 at ti.com>

Applied to u-boot/master, thanks!
diff mbox series

Patch

diff --git a/drivers/net/macb.c b/drivers/net/macb.c
index 83594253787c..0d4929bec131 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))