public inbox for u-boot@lists.denx.de
 help / color / mirror / Atom feed
From: Vignesh Raghavendra <vigneshr@ti.com>
To: u-boot@lists.denx.de
Subject: [PATCH v2 4/4] net: macb: Drop local cache flush
Date: Thu, 16 Jan 2020 14:23:48 +0530	[thread overview]
Message-ID: <20200116085348.24031-5-vigneshr@ti.com> (raw)
In-Reply-To: <20200116085348.24031-1-vigneshr@ti.com>

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>
---
 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 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))
-- 
2.25.0

  parent reply	other threads:[~2020-01-16  8:53 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-01-16  8:53 [PATCH v2 0/4] dma-mapping: Add cache flush/invalidation to dma_{un}map_single Vignesh Raghavendra
2020-01-16  8:53 ` [PATCH v2 1/4] asm: dma-mapping.h: Fix dma mapping functions Vignesh Raghavendra
2020-01-25 17:09   ` Tom Rini
2020-01-16  8:53 ` [PATCH v2 2/4] mmc: tmio-common: Drop custom " Vignesh Raghavendra
2020-01-25 17:09   ` Tom Rini
2020-01-16  8:53 ` [PATCH v2 3/4] mtd: denali: " Vignesh Raghavendra
2020-01-25 17:09   ` Tom Rini
2020-01-16  8:53 ` Vignesh Raghavendra [this message]
2020-01-25 17:09   ` [PATCH v2 4/4] net: macb: Drop local cache flush Tom Rini
2020-01-24  5:22 ` [PATCH v2 0/4] dma-mapping: Add cache flush/invalidation to dma_{un}map_single Vignesh Raghavendra

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=20200116085348.24031-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