From patchwork Fri Nov 15 11:55:05 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Vignesh Raghavendra X-Patchwork-Id: 1195565 X-Patchwork-Delegate: trini@ti.com Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=none (no SPF record) smtp.mailfrom=lists.denx.de (client-ip=81.169.180.215; helo=lists.denx.de; envelope-from=u-boot-bounces@lists.denx.de; receiver=) Authentication-Results: ozlabs.org; dmarc=fail (p=quarantine dis=none) header.from=ti.com Authentication-Results: ozlabs.org; dkim=fail reason="signature verification failed" (1024-bit key; unprotected) header.d=ti.com header.i=@ti.com header.b="Jyh7X+24"; dkim-atps=neutral Received: from lists.denx.de (dione.denx.de [81.169.180.215]) by ozlabs.org (Postfix) with ESMTP id 47Dxdr2jT6z9sPF for ; Fri, 15 Nov 2019 22:56:32 +1100 (AEDT) Received: by lists.denx.de (Postfix, from userid 105) id 0DA84C21E75; Fri, 15 Nov 2019 11:55:36 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on lists.denx.de X-Spam-Level: X-Spam-Status: No, score=0.0 required=5.0 tests=T_DKIM_INVALID autolearn=unavailable autolearn_force=no version=3.4.0 Received: from lists.denx.de (localhost [IPv6:::1]) by lists.denx.de (Postfix) with ESMTP id 37318C21E90; Fri, 15 Nov 2019 11:55:24 +0000 (UTC) Received: by lists.denx.de (Postfix, from userid 105) id 4E454C21DF9; Fri, 15 Nov 2019 11:55:07 +0000 (UTC) Received: from lelv0143.ext.ti.com (lelv0143.ext.ti.com [198.47.23.248]) by lists.denx.de (Postfix) with ESMTPS id 8FCCEC21ECF for ; Fri, 15 Nov 2019 11:55:03 +0000 (UTC) Received: from fllv0035.itg.ti.com ([10.64.41.0]) by lelv0143.ext.ti.com (8.15.2/8.15.2) with ESMTP id xAFBsttX103469; Fri, 15 Nov 2019 05:54:55 -0600 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ti.com; s=ti-com-17Q1; t=1573818895; bh=edbIomgAMWhiI8n9ltcJ2X4hQBpyxWSxwJ9pf7y7BKA=; h=From:To:CC:Subject:Date:In-Reply-To:References; b=Jyh7X+24b/OcL8f/3wnb4NcUhNQNQmIKzMndFH1PqfCDO+GUDLvBzRHZD/c0PIzKB dAez1sbd0/ijyhAT/P+kHk5ZT8ki00pjHPW5Je92RBDA9yjAYhcJd23faRPhmdxDUP AUBi8eFx4vc1eFwSRwzKHq3SsxrCtGLE6qcYqyAQ= Received: from DFLE100.ent.ti.com (dfle100.ent.ti.com [10.64.6.21]) by fllv0035.itg.ti.com (8.15.2/8.15.2) with ESMTP id xAFBstAg112902; Fri, 15 Nov 2019 05:54:55 -0600 Received: from DFLE106.ent.ti.com (10.64.6.27) by DFLE100.ent.ti.com (10.64.6.21) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256_P256) id 15.1.1847.3; Fri, 15 Nov 2019 05:54:55 -0600 Received: from lelv0326.itg.ti.com (10.180.67.84) by DFLE106.ent.ti.com (10.64.6.27) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256_P256) id 15.1.1847.3 via Frontend Transport; Fri, 15 Nov 2019 05:54:55 -0600 Received: from a0132425.dhcp.ti.com (ileax41-snat.itg.ti.com [10.172.224.153]) by lelv0326.itg.ti.com (8.15.2/8.15.2) with ESMTP id xAFBsY8E043133; Fri, 15 Nov 2019 05:54:51 -0600 From: Vignesh Raghavendra To: Rick Chen , Simon Glass , Bin Meng , Peng Fan , Joe Hershberger Date: Fri, 15 Nov 2019 17:25:05 +0530 Message-ID: <20191115115505.893-5-vigneshr@ti.com> X-Mailer: git-send-email 2.24.0 In-Reply-To: <20191115115505.893-1-vigneshr@ti.com> References: <20191115115505.893-1-vigneshr@ti.com> MIME-Version: 1.0 X-EXCLAIMER-MD-CONFIG: e1e8a2fd-e40a-4ac6-ac9b-f7e9cc9ee180 Cc: Tom Rini , u-boot@lists.denx.de, Alexander Graf Subject: [U-Boot] [PATCH 4/4] net: macb: Drop local cache flush X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.18 Precedence: list List-Id: U-Boot discussion List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: u-boot-bounces@lists.denx.de Sender: "U-Boot" 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))