From patchwork Thu Jan 29 05:37:31 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Sonic Zhang X-Patchwork-Id: 434359 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 DDF411401F6 for ; Thu, 29 Jan 2015 16:40:09 +1100 (AEDT) Received: from localhost (localhost [127.0.0.1]) by theia.denx.de (Postfix) with ESMTP id D286E4B6E2; Thu, 29 Jan 2015 06:40:07 +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 G9Ke4lhUOdl9; Thu, 29 Jan 2015 06:40:07 +0100 (CET) Received: from theia.denx.de (localhost [127.0.0.1]) by theia.denx.de (Postfix) with ESMTP id 6CE244B5F5; Thu, 29 Jan 2015 06:40:07 +0100 (CET) Received: from localhost (localhost [127.0.0.1]) by theia.denx.de (Postfix) with ESMTP id 36B924B5F5 for ; Thu, 29 Jan 2015 06:40:03 +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 MBT8z44UK9JS for ; Thu, 29 Jan 2015 06:40:03 +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-bn1on0077.outbound.protection.outlook.com [157.56.110.77]) by theia.denx.de (Postfix) with ESMTPS id AAC304A04C for ; Thu, 29 Jan 2015 06:40:00 +0100 (CET) Received: from BN1PR0301MB0738.namprd03.prod.outlook.com (25.160.78.145) by BN1PR0301MB0753.namprd03.prod.outlook.com (25.160.78.148) with Microsoft SMTP Server (TLS) id 15.1.65.19; Thu, 29 Jan 2015 05:39:58 +0000 Received: from BY2PR03CA002.namprd03.prod.outlook.com (10.255.93.19) by BN1PR0301MB0738.namprd03.prod.outlook.com (25.160.78.145) with Microsoft SMTP Server (TLS) id 15.1.65.19; Thu, 29 Jan 2015 05:39:56 +0000 Received: from BY2FFO11FD037.protection.gbl (10.255.93.4) by BY2PR03CA002.outlook.office365.com (10.255.93.19) with Microsoft SMTP Server (TLS) id 15.1.75.20 via Frontend Transport; Thu, 29 Jan 2015 05:39:55 +0000 Received: from nwd2mta1.analog.com (137.71.25.55) by BY2FFO11FD037.mail.protection.outlook.com (10.1.14.222) with Microsoft SMTP Server (TLS) id 15.1.75.11 via Frontend Transport; Thu, 29 Jan 2015 05:39:55 +0000 Received: from NWD2HUBCAS7.ad.analog.com (nwd2hubcas7.ad.analog.com [10.64.72.140]) by nwd2mta1.analog.com (8.13.8/8.13.8) with ESMTP id t0T5dDCW024883 (version=TLSv1/SSLv3 cipher=AES128-SHA bits=128 verify=FAIL); Wed, 28 Jan 2015 21:39:14 -0800 Received: from zeus.spd.analog.com (10.64.82.11) by NWD2HUBCAS7.ad.analog.com (10.64.72.140) with Microsoft SMTP Server id 14.3.210.2; Thu, 29 Jan 2015 00:39:04 -0500 Received: from linux.site ([10.99.22.20]) by zeus.spd.analog.com (8.14.6/8.14.6) with ESMTP id t0T5d2Sg013839; Thu, 29 Jan 2015 00:39:03 -0500 Received: from nine.ad.analog.com (unknown [10.99.24.95]) by linux.site (Postfix) with ESMTP id D24863AFF170; Wed, 28 Jan 2015 14:42:27 -0700 (MST) From: Sonic Zhang To: Date: Thu, 29 Jan 2015 13:37:31 +0800 Message-ID: <1422509851-11979-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: 130669835954995625; (52f37747-95c3-483a-bd05-08d153b03fac); () Received-SPF: SoftFail (protection.outlook.com: domain of transitioning gmail.com discourages use of 137.71.25.55 as permitted sender) Authentication-Results: spf=softfail (sender IP is 137.71.25.55) smtp.mailfrom=sonic.adi@gmail.com; X-Forefront-Antispam-Report: CIP:137.71.25.55; CTRY:US; IPV:NLI; EFV:NLI; SFV:NSPM; SFS:(10009020)(979002)(6009001)(6806004)(62966003)(77156002)(76482003)(106466001)(2351001)(110136001)(77096005)(105596002)(81442002)(73972006)(19580395003)(19580405001)(73392002)(87936001)(87572001)(92566002)(86362001)(229853001)(83322999)(46102003)(61266001)(33646002)(48376002)(50466002)(55446002)(50986999)(50226001)(47776003)(36756003)(82202001)(217873001)(969003)(989001)(999001)(1009001)(1019001); DIR:OUT; SFP:1101; SCL:1; SRVR:BN1PR0301MB0738; H:nwd2mta1.analog.com; FPR:; SPF:SoftFail; MLV:ovrnspm; PTR:nwd2mail10.analog.com; LANG:en; X-DmarcStatus-Test: Failed X-DmarcAction-Test: None X-Microsoft-Antispam: UriScan:;UriScan:; X-Microsoft-Antispam: BCL:0; PCL:0; RULEID:(3004004)(3005004); SRVR:BN1PR0301MB0738; X-Exchange-Antispam-Report-Test: UriScan:; X-Exchange-Antispam-Report-CFA-Test: BCL:0; PCL:0; RULEID:(601004); SRVR:BN1PR0301MB0738; X-Forefront-PRVS: 0471B73328 X-Exchange-Antispam-Report-CFA-Test: BCL:0; PCL:0; RULEID:(400005)(401004); SRVR:BN1PR0301MB0738; X-MS-Exchange-CrossTenant-OriginalArrivalTime: 29 Jan 2015 05:39:55.2031 (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.55] X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: BN1PR0301MB0738 X-Microsoft-Antispam: BCL:0;PCL:0;RULEID:;SRVR:BN1PR0301MB0753; Cc: Sonic Zhang , adi-buildroot-devel@lists.sourceforge.net Subject: [U-Boot] [PATCH v3] 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. v3-changes: - Add axi_bus register member to struct eth_dma_regs. Signed-off-by: Sonic Zhang Acked-by: Joe Hershberger --- drivers/net/designware.c | 4 ++++ drivers/net/designware.h | 4 +++- 2 files changed, 7 insertions(+), 1 deletion(-) 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", diff --git a/drivers/net/designware.h b/drivers/net/designware.h index ce51102..49d900c 100644 --- a/drivers/net/designware.h +++ b/drivers/net/designware.h @@ -68,7 +68,9 @@ struct eth_dma_regs { u32 status; /* 0x14 */ u32 opmode; /* 0x18 */ u32 intenable; /* 0x1c */ - u8 reserved[40]; + u32 reserved1[2]; + u32 axibus; /* 0x28 */ + u32 reserved2[7]; u32 currhosttxdesc; /* 0x48 */ u32 currhostrxdesc; /* 0x4c */ u32 currhosttxbuffaddr; /* 0x50 */