From patchwork Tue Jan 27 02:54: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: 433171 X-Patchwork-Delegate: joe.hershberger@gmail.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 3270E14007F for ; Tue, 27 Jan 2015 13:57:23 +1100 (AEDT) Received: from localhost (localhost [127.0.0.1]) by theia.denx.de (Postfix) with ESMTP id 0F8804B612; Tue, 27 Jan 2015 03:57:19 +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 QfxGAnhXZmJU; Tue, 27 Jan 2015 03:57:18 +0100 (CET) Received: from theia.denx.de (localhost [127.0.0.1]) by theia.denx.de (Postfix) with ESMTP id 2CD1F4B5F5; Tue, 27 Jan 2015 03:57:18 +0100 (CET) Received: from localhost (localhost [127.0.0.1]) by theia.denx.de (Postfix) with ESMTP id 1242B4B5F5 for ; Tue, 27 Jan 2015 03:57:14 +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 4DkBudNb3o4f for ; Tue, 27 Jan 2015 03:57:13 +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-bn1on0096.outbound.protection.outlook.com [157.56.110.96]) by theia.denx.de (Postfix) with ESMTPS id 7A61B4B5D3 for ; Tue, 27 Jan 2015 03:57:11 +0100 (CET) Received: from BN3PR0301CA0014.namprd03.prod.outlook.com (25.160.180.152) by CY1PR0301MB0745.namprd03.prod.outlook.com (25.160.159.151) with Microsoft SMTP Server (TLS) id 15.1.65.19; Tue, 27 Jan 2015 02:57:08 +0000 Received: from BN1AFFO11FD014.protection.gbl (2a01:111:f400:7c10::168) by BN3PR0301CA0014.outlook.office365.com (2a01:111:e400:4000::24) with Microsoft SMTP Server (TLS) id 15.1.65.19 via Frontend Transport; Tue, 27 Jan 2015 02:57:08 +0000 Received: from nwd2mta2.analog.com (137.71.25.57) by BN1AFFO11FD014.mail.protection.outlook.com (10.58.52.74) with Microsoft SMTP Server (TLS) id 15.1.75.11 via Frontend Transport; Tue, 27 Jan 2015 02:57:07 +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 t0R64AKl014398 (version=TLSv1/SSLv3 cipher=AES128-SHA bits=128 verify=FAIL); Tue, 27 Jan 2015 01:04:10 -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; Mon, 26 Jan 2015 21:56:24 -0500 Received: from linux.site ([10.99.22.20]) by zeus.spd.analog.com (8.14.6/8.14.6) with ESMTP id t0R2uNNt000848; Mon, 26 Jan 2015 21:56:23 -0500 Received: from nine.ad.analog.com (unknown [10.99.24.95]) by linux.site (Postfix) with ESMTP id B51D73AF0AFA; Mon, 26 Jan 2015 11:59:44 -0700 (MST) From: To: Date: Tue, 27 Jan 2015 10:54:52 +0800 Message-ID: <1422327292-6039-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: 130668010272104895; (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.denx.de; dkim=none (message not signed) header.d=none;lists.denx.de; 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)(73392002)(46102003)(92566002)(55446002)(50226001)(62966003)(77156002)(77096005)(83322999)(33646002)(86362001)(19580405001)(6806004)(48376002)(86152002)(36756003)(47776003)(61266001)(87936001)(105596002)(87572001)(82202001)(76482003)(2351001)(110136001)(106466001)(81442002)(50986999)(73972006)(50466002)(229853001)(19580395003)(217873001); DIR:OUT; SFP:1101; SCL:1; SRVR:CY1PR0301MB0745; H:nwd2mta2.analog.com; FPR:; SPF:None; MLV:sfv; LANG:en; X-DmarcAction-Test: None X-DmarcStatus-Test: Failed X-Microsoft-Antispam: UriScan:; X-Microsoft-Antispam: BCL:0; PCL:0; RULEID:(3005004)(3004004); SRVR:CY1PR0301MB0745; X-Exchange-Antispam-Report-Test: UriScan:; X-Exchange-Antispam-Report-CFA-Test: BCL:0; PCL:0; RULEID:(601004); SRVR:CY1PR0301MB0745; X-Forefront-PRVS: 046985391D X-Exchange-Antispam-Report-CFA-Test: BCL:0; PCL:0; RULEID:(401004)(400005); SRVR:CY1PR0301MB0745; X-MS-Exchange-CrossTenant-OriginalArrivalTime: 27 Jan 2015 02:57:07.1012 (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: CY1PR0301MB0745 Cc: Sonic Zhang Subject: [U-Boot] [PATCH] net: configure DWMAC DMA by default AXI burst length X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.13 Precedence: list List-Id: U-Boot discussion List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: u-boot-bounces@lists.denx.de Errors-To: u-boot-bounces@lists.denx.de From: Sonic Zhang Board can define its own AXI burst length to improve DWMAC DMA performance. Signed-off-by: Sonic Zhang --- drivers/net/designware.c | 2 ++ drivers/net/designware.h | 5 +++++ 2 files changed, 7 insertions(+) diff --git a/drivers/net/designware.c b/drivers/net/designware.c index 9ded895..d8d6792 100644 --- a/drivers/net/designware.c +++ b/drivers/net/designware.c @@ -256,6 +256,8 @@ static int dw_eth_init(struct eth_device *dev, bd_t *bis) writel(readl(&dma_p->opmode) | RXSTART | TXSTART, &dma_p->opmode); + writel((CONFIG_DW_AXI_BURST_LEN & 0x1FF >> 1), &dma_p->axibus); + /* Start up the PHY */ if (phy_startup(priv->phydev)) { printf("Could not initialize PHY %s\n", diff --git a/drivers/net/designware.h b/drivers/net/designware.h index ce51102..d8bd84d 100644 --- a/drivers/net/designware.h +++ b/drivers/net/designware.h @@ -102,6 +102,11 @@ struct eth_dma_regs { #define TXSECONDFRAME (1 << 2) #define RXSTART (1 << 1) +/* Default AXI BUS Burst length */ +#ifndef CONFIG_DW_AXI_BURST_LEN +#define CONFIG_DW_AXI_BURST_LEN 0 +#endif + /* Descriptior related definitions */ #define MAC_MAX_FRAME_SZ (1600)