From: Vignesh Raghavendra <vigneshr@ti.com>
To: u-boot@lists.denx.de
Subject: [U-Boot] [PATCH 4/4] net: macb: Drop local cache flush
Date: Fri, 15 Nov 2019 17:25:05 +0530 [thread overview]
Message-ID: <20191115115505.893-5-vigneshr@ti.com> (raw)
In-Reply-To: <20191115115505.893-1-vigneshr@ti.com>
Now that arch specific dma mapping APIs take care of cache
flush/invalidate, drop local cache flush operation.
Signed-off-by: Vignesh Raghavendra <vigneshr@ti.com>
---
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
prev parent reply other threads:[~2019-11-15 11:55 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-11-15 11:55 [U-Boot] [PATCH 0/4] dma-mapping: Add cache flush/invalidation to dma_{un}map_single Vignesh Raghavendra
2019-11-15 11:55 ` [U-Boot] [PATCH 1/4] asm: dma-mapping.h: Fix dma mapping functions Vignesh Raghavendra
2019-11-15 12:19 ` Masahiro Yamada
[not found] ` <752D002CFF5D0F4FA35C0100F1D73F3FA469DB69@ATCPCS16.andestech.com>
2019-11-19 0:51 ` Rick Chen
2020-01-15 20:47 ` Tom Rini
2020-01-16 8:56 ` Vignesh Raghavendra
2019-11-15 11:55 ` [U-Boot] [PATCH 2/4] mmc: tmio-common: Drop custom " Vignesh Raghavendra
2019-11-15 12:18 ` Masahiro Yamada
2019-11-15 11:55 ` [U-Boot] [PATCH 3/4] mtd: denali: " Vignesh Raghavendra
2019-11-15 12:18 ` Masahiro Yamada
2019-11-15 11:55 ` Vignesh Raghavendra [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20191115115505.893-5-vigneshr@ti.com \
--to=vigneshr@ti.com \
--cc=u-boot@lists.denx.de \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox