From patchwork Thu Jan 29 06:38:50 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Sonic Zhang X-Patchwork-Id: 434368 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 1BB9D1402D7 for ; Thu, 29 Jan 2015 17:56:43 +1100 (AEDT) Received: from localhost (localhost [127.0.0.1]) by theia.denx.de (Postfix) with ESMTP id 993634B61A; Thu, 29 Jan 2015 07:56:39 +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 LU3_aVX6Jx_7; Thu, 29 Jan 2015 07:56:39 +0100 (CET) Received: from theia.denx.de (localhost [127.0.0.1]) by theia.denx.de (Postfix) with ESMTP id F18394B5D3; Thu, 29 Jan 2015 07:56:38 +0100 (CET) Received: from localhost (localhost [127.0.0.1]) by theia.denx.de (Postfix) with ESMTP id EA0D24B5D3 for ; Thu, 29 Jan 2015 07:56:34 +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 2KhdVG61aTER for ; Thu, 29 Jan 2015 07:56:34 +0100 (CET) X-Greylist: delayed 5571 seconds by postgrey-1.34 at theia; Thu, 29 Jan 2015 07:56:31 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-bl2-obe.outbound.protection.outlook.com (mail-bl2on0068.outbound.protection.outlook.com [65.55.169.68]) by theia.denx.de (Postfix) with ESMTPS id 660EF4B5D0 for ; Thu, 29 Jan 2015 07:56:31 +0100 (CET) Received: from BN1PR0301MB0738.namprd03.prod.outlook.com (25.160.78.145) by BN1PR0301MB0740.namprd03.prod.outlook.com (25.160.78.147) with Microsoft SMTP Server (TLS) id 15.1.65.19; Thu, 29 Jan 2015 06:41:01 +0000 Received: from BN3PR0301CA0071.namprd03.prod.outlook.com (25.160.152.167) by BN1PR0301MB0738.namprd03.prod.outlook.com (25.160.78.145) with Microsoft SMTP Server (TLS) id 15.1.65.19; Thu, 29 Jan 2015 06:40:59 +0000 Received: from BN1AFFO11FD007.protection.gbl (2a01:111:f400:7c10::178) by BN3PR0301CA0071.outlook.office365.com (2a01:111:e400:401e::39) with Microsoft SMTP Server (TLS) id 15.1.75.20 via Frontend Transport; Thu, 29 Jan 2015 06:40:59 +0000 Received: from nwd2mta2.analog.com (137.71.25.57) by BN1AFFO11FD007.mail.protection.outlook.com (10.58.52.67) with Microsoft SMTP Server (TLS) id 15.1.75.11 via Frontend Transport; Thu, 29 Jan 2015 06:40:58 +0000 Received: from NWD2HUBCAS8.ad.analog.com (nwd2hubcas8.ad.analog.com [10.64.72.141]) by nwd2mta2.analog.com (8.13.8/8.13.8) with ESMTP id t0T9mD76018347 (version=TLSv1/SSLv3 cipher=AES128-SHA bits=128 verify=FAIL); Thu, 29 Jan 2015 04:48:15 -0500 Received: from zeus.spd.analog.com (10.64.82.11) by NWD2HUBCAS8.ad.analog.com (10.64.72.141) with Microsoft SMTP Server id 14.3.210.2; Thu, 29 Jan 2015 01:40:22 -0500 Received: from linux.site ([10.99.22.20]) by zeus.spd.analog.com (8.14.6/8.14.6) with ESMTP id t0T6eKZm018624; Thu, 29 Jan 2015 01:40:21 -0500 Received: from nine.ad.analog.com (unknown [10.99.24.95]) by linux.site (Postfix) with ESMTP id 64E523AF098F; Wed, 28 Jan 2015 15:43:45 -0700 (MST) From: Sonic Zhang To: Date: Thu, 29 Jan 2015 14:38:50 +0800 Message-ID: <1422513530-17861-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: 130669872590094607; (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)(6806004)(76482003)(62966003)(77156002)(106466001)(2351001)(110136001)(77096005)(105596002)(73972006)(81442002)(19580395003)(19580405001)(87936001)(73392002)(87572001)(92566002)(86362001)(229853001)(83322999)(46102003)(61266001)(33646002)(48376002)(50466002)(55446002)(50986999)(50226001)(36756003)(82202001)(47776003); DIR:OUT; SFP:1101; SCL:1; SRVR:BN1PR0301MB0738; H:nwd2mta2.analog.com; FPR:; SPF:None; MLV:sfv; 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:(401004)(400005); SRVR:BN1PR0301MB0738; X-MS-Exchange-CrossTenant-OriginalArrivalTime: 29 Jan 2015 06:40:58.9158 (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: BN1PR0301MB0738 X-Microsoft-Antispam: BCL:0;PCL:0;RULEID:;SRVR:BN1PR0301MB0740; Cc: Sonic Zhang , adi-buildroot-devel@lists.sourceforge.net Subject: [U-Boot] [PATCH] net: Support DMA threshold mode in DWMAC driver 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 - DMA threshold mode can be selected in board config head file. Signed-off-by: Sonic Zhang --- drivers/net/designware.c | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/drivers/net/designware.c b/drivers/net/designware.c index 51eff85..bc3c88f 100644 --- a/drivers/net/designware.c +++ b/drivers/net/designware.c @@ -251,8 +251,13 @@ static int dw_eth_init(struct eth_device *dev, bd_t *bis) writel(FIXEDBURST | PRIORXTX_41 | DMA_PBL, &dma_p->busmode); +#ifndef CONFIG_DW_MAC_FORCE_THRESHOLD_MODE writel(readl(&dma_p->opmode) | FLUSHTXFIFO | STOREFORWARD, &dma_p->opmode); +#else + writel(readl(&dma_p->opmode) | FLUSHTXFIFO, + &dma_p->opmode); +#endif writel(readl(&dma_p->opmode) | RXSTART | TXSTART, &dma_p->opmode);