From patchwork Sun Nov 22 07:53:57 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Marcin Wojtas X-Patchwork-Id: 547281 X-Patchwork-Delegate: davem@davemloft.net Return-Path: X-Original-To: patchwork-incoming@ozlabs.org Delivered-To: patchwork-incoming@ozlabs.org Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by ozlabs.org (Postfix) with ESMTP id CD61F14029E for ; Sun, 22 Nov 2015 18:56:46 +1100 (AEDT) Authentication-Results: ozlabs.org; dkim=fail reason="signature verification failed" (2048-bit key; unprotected) header.d=semihalf-com.20150623.gappssmtp.com header.i=@semihalf-com.20150623.gappssmtp.com header.b=BDSEeWZW; dkim-atps=neutral Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752322AbbKVHzI (ORCPT ); Sun, 22 Nov 2015 02:55:08 -0500 Received: from mail-lf0-f43.google.com ([209.85.215.43]:35601 "EHLO mail-lf0-f43.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751732AbbKVHyH (ORCPT ); Sun, 22 Nov 2015 02:54:07 -0500 Received: by lfdl133 with SMTP id l133so10118865lfd.2 for ; Sat, 21 Nov 2015 23:54:05 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=semihalf-com.20150623.gappssmtp.com; s=20150623; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=Moizjkp1hCxECboF9lC5gICdZKS9kQc+ixWjd9mR9RM=; b=BDSEeWZWOuYu5EZnXP9tb2o14Xegp2EXjsMmy3w6ivBUxrPRC5MTLtwShyezruLrrc kqyjqx4xJV3n+n7rm4gcpE6KjYacR55WOifjM8asUjQoRpbOd4O0tOHB8hfD/CYTh0Fj rmKOGTxd3LuASuhrviZDnLMjMfE8y7UrF8Np4ZEBJEa5PnfBcaHp4KpSkUDv0UpbtNUa LfIE7QMmbIl0gwmB4+/DgmpCZBgupxn5X19dRonn0Ip/9dk2gPZN4fyoTEjsMSVJUOeR m8xLohfSYzOVv2+4C+Lms2OFQTyNP8+B3Qc+SLDijFSKegBFZEFMqMj0WkTj5s9pEedh POSQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=Moizjkp1hCxECboF9lC5gICdZKS9kQc+ixWjd9mR9RM=; b=Mz/3hZ1AKguunl4IcJZWxpd6U7j7WwklzkpAIdH+KahnUEGLgaRHKTxpInFhKW64zh KMI/ZF2lLXNrxlUJibl0JMfYFxs9UvfDkToLeHF3Ohi0PoeZCwIfNeFYRYBWWGf2+5fN 1gYgpWJ9taIXBgE6qrBzr4mwFQArcmGzXR5pMaDrOfLM0+LzmDSLx7Dtv5xj9xvzJwyl YE66gbJgyjJ4vzc18o32FqJxZZ9OlGSf1FF6FgIsXTZtOVfRm+74xDQe1QcHqDTFYqYO +/5klSqBfKc25VdRSyhFfBrTZGkysRbcn4NrPzNYfNyNQuuDgQXOfHGnJAyfoOHPkLhU W7jQ== X-Gm-Message-State: ALoCoQmgYU9760DZFeKxi+ZSIWwZRsnHHXqMQ0ND0ZtGrXKXL1RICdydllWKKH7Wmhi8OtqluDk1 X-Received: by 10.25.44.213 with SMTP id s204mr8644175lfs.37.1448178845317; Sat, 21 Nov 2015 23:54:05 -0800 (PST) Received: from enkidu.semihalf.local (cardhu.semihalf.com. [213.17.239.108]) by smtp.gmail.com with ESMTPSA id y79sm1010840lfd.45.2015.11.21.23.54.03 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Sat, 21 Nov 2015 23:54:04 -0800 (PST) From: Marcin Wojtas To: linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org, netdev@vger.kernel.org Cc: davem@davemloft.net, linux@arm.linux.org.uk, sebastian.hesselbarth@gmail.com, andrew@lunn.ch, jason@lakedaemon.net, thomas.petazzoni@free-electrons.com, gregory.clement@free-electrons.com, simon.guinot@sequanux.org, nadavh@marvell.com, alior@marvell.com, xswang@marvell.com, myair@marvell.com, nitroshift@yahoo.com, mw@semihalf.com, jaz@semihalf.com, tn@semihalf.com Subject: [PATCH 11/13] ARM: mvebu: enable buffer manager support on Armada 38x boards Date: Sun, 22 Nov 2015 08:53:57 +0100 Message-Id: <1448178839-3541-12-git-send-email-mw@semihalf.com> X-Mailer: git-send-email 1.8.3.1 In-Reply-To: <1448178839-3541-1-git-send-email-mw@semihalf.com> References: <1448178839-3541-1-git-send-email-mw@semihalf.com> Sender: netdev-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: netdev@vger.kernel.org Since mvneta driver supports using hardware buffer management (BM), in order to use it, board files have to be adjusted accordingly. This commit enables BM on: * A385-DB-AP - each port has its own pool for long and common pool for short packets, * A388-DB - to each port unique 'short' and 'long' pools are mapped, * A388-GP - same as above. Moreover appropriate entry is added to 'soc' node ranges, as well as "okay" status for 'bm' and 'bm-bppi' (internal SRAM) nodes. Signed-off-by: Marcin Wojtas --- arch/arm/boot/dts/armada-385-db-ap.dts | 20 +++++++++++++++++++- arch/arm/boot/dts/armada-388-db.dts | 17 ++++++++++++++++- arch/arm/boot/dts/armada-388-gp.dts | 17 ++++++++++++++++- 3 files changed, 51 insertions(+), 3 deletions(-) diff --git a/arch/arm/boot/dts/armada-385-db-ap.dts b/arch/arm/boot/dts/armada-385-db-ap.dts index acd5b15..5f9451b 100644 --- a/arch/arm/boot/dts/armada-385-db-ap.dts +++ b/arch/arm/boot/dts/armada-385-db-ap.dts @@ -61,7 +61,8 @@ ranges = ; + MBUS_ID(0x09, 0x15) 0 0xf1110000 0x10000 + MBUS_ID(0x0c, 0x04) 0 0xf1200000 0x100000>; internal-regs { spi1: spi@10680 { @@ -138,12 +139,18 @@ status = "okay"; phy = <&phy2>; phy-mode = "sgmii"; + buffer-manager = <&bm>; + bm,pool-long = <1>; + bm,pool-short = <3>; }; ethernet@34000 { status = "okay"; phy = <&phy1>; phy-mode = "sgmii"; + buffer-manager = <&bm>; + bm,pool-long = <2>; + bm,pool-short = <3>; }; ethernet@70000 { @@ -157,6 +164,13 @@ status = "okay"; phy = <&phy0>; phy-mode = "rgmii-id"; + buffer-manager = <&bm>; + bm,pool-long = <0>; + bm,pool-short = <3>; + }; + + bm@c8000 { + status = "okay"; }; nfc: flash@d0000 { @@ -178,6 +192,10 @@ }; }; + bm-bppi { + status = "okay"; + }; + pcie-controller { status = "okay"; diff --git a/arch/arm/boot/dts/armada-388-db.dts b/arch/arm/boot/dts/armada-388-db.dts index ff47af5..ea93ed7 100644 --- a/arch/arm/boot/dts/armada-388-db.dts +++ b/arch/arm/boot/dts/armada-388-db.dts @@ -66,7 +66,8 @@ ranges = ; + MBUS_ID(0x09, 0x15) 0 0xf1110000 0x10000 + MBUS_ID(0x0c, 0x04) 0 0xf1200000 0x100000>; internal-regs { spi@10600 { @@ -99,6 +100,9 @@ status = "okay"; phy = <&phy1>; phy-mode = "rgmii-id"; + buffer-manager = <&bm>; + bm,pool-long = <2>; + bm,pool-short = <3>; }; usb@58000 { @@ -109,6 +113,9 @@ status = "okay"; phy = <&phy0>; phy-mode = "rgmii-id"; + buffer-manager = <&bm>; + bm,pool-long = <0>; + bm,pool-short = <1>; }; mdio@72004 { @@ -129,6 +136,10 @@ status = "okay"; }; + bm@c8000 { + status = "okay"; + }; + flash@d0000 { status = "okay"; num-cs = <1>; @@ -169,6 +180,10 @@ }; }; + bm-bppi { + status = "okay"; + }; + pcie-controller { status = "okay"; /* diff --git a/arch/arm/boot/dts/armada-388-gp.dts b/arch/arm/boot/dts/armada-388-gp.dts index a633be3..0a3bd7f 100644 --- a/arch/arm/boot/dts/armada-388-gp.dts +++ b/arch/arm/boot/dts/armada-388-gp.dts @@ -60,7 +60,8 @@ ranges = ; + MBUS_ID(0x09, 0x15) 0 0xf1110000 0x10000 + MBUS_ID(0x0c, 0x04) 0 0xf1200000 0x100000>; internal-regs { spi@10600 { @@ -133,6 +134,9 @@ status = "okay"; phy = <&phy1>; phy-mode = "rgmii-id"; + buffer-manager = <&bm>; + bm,pool-long = <2>; + bm,pool-short = <3>; }; /* CON4 */ @@ -152,6 +156,9 @@ status = "okay"; phy = <&phy0>; phy-mode = "rgmii-id"; + buffer-manager = <&bm>; + bm,pool-long = <0>; + bm,pool-short = <1>; }; @@ -186,6 +193,10 @@ }; }; + bm@c8000 { + status = "okay"; + }; + sata@e0000 { pinctrl-names = "default"; pinctrl-0 = <&sata2_pins>, <&sata3_pins>; @@ -240,6 +251,10 @@ }; }; + bm-bppi { + status = "okay"; + }; + pcie-controller { status = "okay"; /*