From patchwork Sat Feb 7 05:07:16 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Chen Baozi X-Patchwork-Id: 5795691 Return-Path: X-Original-To: patchwork-linux-arm@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork2.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.136]) by patchwork2.web.kernel.org (Postfix) with ESMTP id DCF2FBF440 for ; Sat, 7 Feb 2015 05:27:25 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 1651F2015A for ; Sat, 7 Feb 2015 05:27:25 +0000 (UTC) Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.9]) (using TLSv1.2 with cipher DHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 5A23720160 for ; Sat, 7 Feb 2015 05:27:24 +0000 (UTC) Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.80.1 #2 (Red Hat Linux)) id 1YJxtp-0000pZ-41; Sat, 07 Feb 2015 05:25:45 +0000 Received: from [192.241.220.20] (helo=baozis.org) by bombadil.infradead.org with esmtps (Exim 4.80.1 #2 (Red Hat Linux)) id 1YJxti-0000gQ-0D for linux-arm-kernel@lists.infradead.org; Sat, 07 Feb 2015 05:25:42 +0000 Received: from [222.244.156.155] (helo=localhos) by baozis.org with esmtpsa (TLS1.2:RSA_AES_128_CBC_SHA1:128) (Exim 4.82) (envelope-from ) id 1YJxcm-0006Jy-2C; Sat, 07 Feb 2015 05:08:08 +0000 Received: from cbz by localhos with local (Exim 4.84) (envelope-from ) id 1YJxcR-0002Fx-Gu; Sat, 07 Feb 2015 13:07:47 +0800 From: Chen Baozi To: linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org Subject: [PATCH 3/3] stmmac: Add AXI burst length support to platform device. Date: Sat, 7 Feb 2015 13:07:16 +0800 Message-Id: <1423285636-8623-4-git-send-email-cbz@baozis.org> X-Mailer: git-send-email 2.1.4 In-Reply-To: <1423285636-8623-1-git-send-email-cbz@baozis.org> References: <1423285636-8623-1-git-send-email-cbz@baozis.org> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20150206_212538_064217_DFC0FBB7 X-CRM114-Status: UNSURE ( 8.97 ) X-CRM114-Notice: Please train this message. X-Spam-Score: 1.3 (+) Cc: netdev@vger.kernel.org, Chen Baozi X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org X-Spam-Status: No, score=-4.2 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_MED, T_RP_MATCHES_RCVD,UNPARSEABLE_RELAY autolearn=ham version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP The AXI Bus Mode Register controls the AXI master behavior. It is mainly used to control the burst splitting and the number of outstanding requests. This register is present and valid only in GMAC-AXI configuration. The old driver only supports this feature on PCI devices. This patch adds an 'snps,apl' properties in DT to enable it on platform devices. Signed-off-by: Chen Baozi --- Documentation/devicetree/bindings/net/stmmac.txt | 1 + drivers/net/ethernet/stmicro/stmmac/stmmac_platform.c | 1 + 2 files changed, 2 insertions(+) diff --git a/Documentation/devicetree/bindings/net/stmmac.txt b/Documentation/devicetree/bindings/net/stmmac.txt index c41afd9..8f3c834 100644 --- a/Documentation/devicetree/bindings/net/stmmac.txt +++ b/Documentation/devicetree/bindings/net/stmmac.txt @@ -43,6 +43,7 @@ Optional properties: available this clock is used for programming the Timestamp Addend Register. If not passed then the system clock will be used and this is fine on some platforms. +- snps,abl: AXI Burst Length Examples: diff --git a/drivers/net/ethernet/stmicro/stmmac/stmmac_platform.c b/drivers/net/ethernet/stmicro/stmmac/stmmac_platform.c index 3039de2..abbc897 100644 --- a/drivers/net/ethernet/stmicro/stmmac/stmmac_platform.c +++ b/drivers/net/ethernet/stmicro/stmmac/stmmac_platform.c @@ -230,6 +230,7 @@ static int stmmac_probe_config_dt(struct platform_device *pdev, return -ENOMEM; plat->dma_cfg = dma_cfg; of_property_read_u32(np, "snps,pbl", &dma_cfg->pbl); + of_property_read_u32(np, "snps,abl", &dma_cfg->burst_len); dma_cfg->fixed_burst = of_property_read_bool(np, "snps,fixed-burst"); dma_cfg->mixed_burst =