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>
This commit is contained in:
Vignesh Raghavendra 2020-01-16 14:23:48 +05:30 committed by Tom Rini
parent 6fff562baf
commit 5cde44e12a

View file

@ -327,8 +327,6 @@ static int _macb_send(struct macb_device *macb, const char *name, void *packet,
macb->tx_ring[tx_head].addr = paddr; macb->tx_ring[tx_head].addr = paddr;
barrier(); barrier();
macb_flush_ring_desc(macb, TX); 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)); 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); udelay(1);
} }
dma_unmap_single(packet, length, paddr); dma_unmap_single(packet, length, DMA_TO_DEVICE);
if (i <= MACB_TX_TIMEOUT) { if (i <= MACB_TX_TIMEOUT) {
if (ctrl & MACB_BIT(TX_UNDERRUN)) if (ctrl & MACB_BIT(TX_UNDERRUN))