From patchwork Thu Jan 29 05:20:52 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Sonic Zhang X-Patchwork-Id: 434358 X-Patchwork-Delegate: trini@ti.com Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from theia.denx.de (theia.denx.de [85.214.87.163]) by ozlabs.org (Postfix) with ESMTP id 941401402AE for ; Thu, 29 Jan 2015 16:39:31 +1100 (AEDT) Received: from localhost (localhost [127.0.0.1]) by theia.denx.de (Postfix) with ESMTP id BB0C54B6DC; Thu, 29 Jan 2015 06:39:28 +0100 (CET) Received: from theia.denx.de ([127.0.0.1]) by localhost (theia.denx.de [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id X9kOdCLpf5tI; Thu, 29 Jan 2015 06:39:28 +0100 (CET) Received: from theia.denx.de (localhost [127.0.0.1]) by theia.denx.de (Postfix) with ESMTP id 0495C4A04C; Thu, 29 Jan 2015 06:39:28 +0100 (CET) Received: from localhost (localhost [127.0.0.1]) by theia.denx.de (Postfix) with ESMTP id 0FC4C4A04C for ; Thu, 29 Jan 2015 06:39:23 +0100 (CET) Received: from theia.denx.de ([127.0.0.1]) by localhost (theia.denx.de [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id JYlKxRTb1-N8 for ; Thu, 29 Jan 2015 06:39:22 +0100 (CET) X-policyd-weight: NOT_IN_SBL_XBL_SPAMHAUS=-1.5 NOT_IN_SPAMCOP=-1.5 NOT_IN_BL_NJABL=-1.5 (only DNSBL check requested) Received: from na01-bn1-obe.outbound.protection.outlook.com (mail-bn1on0076.outbound.protection.outlook.com [157.56.110.76]) by theia.denx.de (Postfix) with ESMTPS id 54F994A04A for ; Thu, 29 Jan 2015 06:39:20 +0100 (CET) Received: from BY2PR03CA004.namprd03.prod.outlook.com (10.255.93.21) by BY2PR0301MB0744.namprd03.prod.outlook.com (25.160.63.22) with Microsoft SMTP Server (TLS) id 15.1.65.19; Thu, 29 Jan 2015 05:23:38 +0000 Received: from BL2FFO11FD021.protection.gbl (10.255.93.4) by BY2PR03CA004.outlook.office365.com (10.255.93.21) with Microsoft SMTP Server (TLS) id 15.1.75.20 via Frontend Transport; Thu, 29 Jan 2015 05:23:38 +0000 Received: from nwd2mta2.analog.com (137.71.25.57) by BL2FFO11FD021.mail.protection.outlook.com (10.173.161.100) with Microsoft SMTP Server (TLS) id 15.1.75.11 via Frontend Transport; Thu, 29 Jan 2015 05:23:38 +0000 Received: from NWD2HUBCAS9.ad.analog.com (nwd2hubcas9.ad.analog.com [10.64.72.142]) by nwd2mta2.analog.com (8.13.8/8.13.8) with ESMTP id t0T8UoA8016450 (version=TLSv1/SSLv3 cipher=AES128-SHA bits=128 verify=FAIL); Thu, 29 Jan 2015 03:30:50 -0500 Received: from zeus.spd.analog.com (10.64.82.11) by NWD2HUBCAS9.ad.analog.com (10.64.72.142) with Microsoft SMTP Server id 14.3.210.2; Thu, 29 Jan 2015 00:22:25 -0500 Received: from linux.site ([10.99.22.20]) by zeus.spd.analog.com (8.14.6/8.14.6) with ESMTP id t0T5MNu6012713; Thu, 29 Jan 2015 00:22:23 -0500 Received: from nine.ad.analog.com (unknown [10.99.24.95]) by linux.site (Postfix) with ESMTP id 6A5953AF098F; Wed, 28 Jan 2015 14:25:48 -0700 (MST) From: Sonic Zhang To: Date: Thu, 29 Jan 2015 13:20:52 +0800 Message-ID: <1422508852-4451-1-git-send-email-sonic.adi@gmail.com> X-Mailer: git-send-email 1.7.9.5 MIME-Version: 1.0 X-EOPAttributedMessage: 0 X-Matching-Connectors: 130669826180990142; (52f37747-95c3-483a-bd05-08d153b03fac); () Received-SPF: SoftFail (protection.outlook.com: domain of transitioning gmail.com discourages use of 137.71.25.57 as permitted sender) Authentication-Results: spf=softfail (sender IP is 137.71.25.57) smtp.mailfrom=sonic.adi@gmail.com; lists.sourceforge.net; dkim=none (message not signed) header.d=none; lists.sourceforge.net; dmarc=fail action=none header.from=gmail.com; X-Forefront-Antispam-Report: CIP:137.71.25.57; CTRY:US; IPV:NLI; EFV:NLI; SFV:NSPM; SFS:(10009020)(6009001)(106466001)(55446002)(229853001)(92566002)(110136001)(2351001)(82202001)(36756003)(86362001)(105596002)(6806004)(47776003)(33646002)(87936001)(61266001)(73392002)(76482003)(19580395003)(50226001)(46102003)(19580405001)(77156002)(83322999)(62966003)(73972006)(50466002)(48376002)(77096005)(50986999)(87572001)(81442002)(217873001); DIR:OUT; SFP:1101; SCL:1; SRVR:BY2PR0301MB0744; H:nwd2mta2.analog.com; FPR:; SPF:None; MLV:sfv; LANG:en; X-DmarcStatus-Test: Failed X-DmarcAction-Test: None X-Microsoft-Antispam: UriScan:; X-Microsoft-Antispam: BCL:0; PCL:0; RULEID:(3004004)(3005004); SRVR:BY2PR0301MB0744; X-Exchange-Antispam-Report-Test: UriScan:; X-Exchange-Antispam-Report-CFA-Test: BCL:0; PCL:0; RULEID:(601004); SRVR:BY2PR0301MB0744; X-Forefront-PRVS: 0471B73328 X-Exchange-Antispam-Report-CFA-Test: BCL:0; PCL:0; RULEID:(400005)(401004); SRVR:BY2PR0301MB0744; X-MS-Exchange-CrossTenant-OriginalArrivalTime: 29 Jan 2015 05:23:38.0054 (UTC) X-MS-Exchange-CrossTenant-Id: 5afe0b00-7697-4969-b663-5eab37d5f47e X-MS-Exchange-CrossTenant-OriginalAttributedTenantConnectingIp: TenantId=5afe0b00-7697-4969-b663-5eab37d5f47e; Ip=[137.71.25.57] X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: BY2PR0301MB0744 Cc: Sonic Zhang , adi-buildroot-devel@lists.sourceforge.net Subject: [U-Boot] [PATCH v2] net: configure DWMAC DMA by default AXI burst length X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.15 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" From: Sonic Zhang Board can define its own AXI burst length to improve DWMAC DMA performance. v2-changes: - Avoid write burst len register when the Macro is not defined. Signed-off-by: Sonic Zhang --- drivers/net/designware.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/drivers/net/designware.c b/drivers/net/designware.c index 9ded895..51eff85 100644 --- a/drivers/net/designware.c +++ b/drivers/net/designware.c @@ -256,6 +256,10 @@ static int dw_eth_init(struct eth_device *dev, bd_t *bis) writel(readl(&dma_p->opmode) | RXSTART | TXSTART, &dma_p->opmode); +#ifdef CONFIG_DW_AXI_BURST_LEN + writel((CONFIG_DW_AXI_BURST_LEN & 0x1FF >> 1), &dma_p->axibus); +#endif + /* Start up the PHY */ if (phy_startup(priv->phydev)) { printf("Could not initialize PHY %s\n",