From mboxrd@z Thu Jan 1 00:00:00 1970 From: Vignesh Raghavendra Date: Fri, 15 Nov 2019 17:25:05 +0530 Subject: [U-Boot] [PATCH 4/4] net: macb: Drop local cache flush In-Reply-To: <20191115115505.893-1-vigneshr@ti.com> References: <20191115115505.893-1-vigneshr@ti.com> Message-ID: <20191115115505.893-5-vigneshr@ti.com> List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: u-boot@lists.denx.de Now that arch specific dma mapping APIs take care of cache flush/invalidate, drop local cache flush operation. Signed-off-by: Vignesh Raghavendra --- drivers/net/macb.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/drivers/net/macb.c b/drivers/net/macb.c index 1a532b0e5a4f..1ded76b6d7b6 100644 --- a/drivers/net/macb.c +++ b/drivers/net/macb.c @@ -331,8 +331,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)); /* @@ -348,7 +346,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)) -- 2.24.0