Received: by 10.223.164.202 with SMTP id h10csp616786wrb; Thu, 9 Nov 2017 11:30:27 -0800 (PST) X-Google-Smtp-Source: ABhQp+Q5sEmCZSPLxY8ztWYXOiUHrg9nNyKnwohiXMkd1nZEe5ya+zauE7bj0POHuUvwvCshOzcZ X-Received: by 10.99.123.14 with SMTP id w14mr1411543pgc.387.1510255826976; Thu, 09 Nov 2017 11:30:26 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1510255826; cv=none; d=google.com; s=arc-20160816; b=jHSJDMUKqKziJGaboUEe7y6AZsRrRGvGv27yAAt/pO9Vc0AS2gXe2D4kf8OwNfz+U1 SryxCjcvLebB+l6Rvs1MSKtE3TYPCCAbLheSutNy/1KFbXiX9g+SzYHmz16WS49kGWIS aqqvk2wHiJWDAWDXhFTJnT3W1zdCKDyC/4LVcJV2bUac0a8laWgA8eWP6bZexY+wkbvd dc1wy7mQQWXcBTmWwJRNGNHl70RFEgQvPLEXjC9cbrCNiQWMxKeh7k4HpMi7LykeSTY0 MGvECRk/4jNjWaN1y+0F0RLF4vlU2Xsybfc82wY3vq6MjQQrYk5rCT+Wo69KzHarQW47 iYOw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:spamdiagnosticmetadata :spamdiagnosticoutput:mime-version:message-id:date:subject:cc:to :from:dkim-signature:arc-authentication-results; bh=Qw20GSjqevANVTbjDkXC3X1v2JNWCfHkPGhFq0Q4n2U=; b=BloBUF74feXUWEUvYTM3oULfJHpTKxGKf6AJskiUgefsM/Vi0yVZKfykwyGxCvCwMr h2A21tNd4zAvIrtZROpUpbtefIofA7vwHhowkKFnUOlFMj2oOdwgH4aJZvmEGbLOxI4b gH+BISdObLmKKZc1qiDr9iBlH+yCeduQKenBV/hAQq8HSo6jATOmy+HHX79Bz+d/AHv8 3bmUR/En/jAYExreWMBLapmxfS8aDNfxLjnxkpnY0Ps2x/wHv375Fr9KseZv95zVjaPW 5jM6/3Y9+3Zdlx03KIf/Qvzkqtl+BFDCS6ALADbpRr8JP9CEMAOyW8ZqckkrDtTLdwpW 8WDQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@CAVIUMNETWORKS.onmicrosoft.com header.s=selector1-cavium-com header.b=L2IwdCuk; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id s5si7205864pgq.333.2017.11.09.11.30.14; Thu, 09 Nov 2017 11:30:26 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@CAVIUMNETWORKS.onmicrosoft.com header.s=selector1-cavium-com header.b=L2IwdCuk; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754144AbdKIT3a (ORCPT + 82 others); Thu, 9 Nov 2017 14:29:30 -0500 Received: from mail-sn1nam01on0089.outbound.protection.outlook.com ([104.47.32.89]:8512 "EHLO NAM01-SN1-obe.outbound.protection.outlook.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1752622AbdKIT31 (ORCPT ); Thu, 9 Nov 2017 14:29:27 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=CAVIUMNETWORKS.onmicrosoft.com; s=selector1-cavium-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version; bh=Qw20GSjqevANVTbjDkXC3X1v2JNWCfHkPGhFq0Q4n2U=; b=L2IwdCukFz5Q5kMf3m30qfArtYEC2M64is+i+PXVaNYR+LlxZztkWy1ZXDmIuVpJkfs1GdSKY+gckHePu0oqGrRM6OjHU9k4qVEMlicOsqL68PNsWUq9eMhSist9sAMye9I2loB7UI/cW4VZ1Vm2HwXUqKqiDUrvAjP8S7axz8U= Authentication-Results: spf=none (sender IP is ) smtp.mailfrom=David.Daney@cavium.com; Received: from ddl.caveonetworks.com (50.233.148.156) by CY4PR07MB3496.namprd07.prod.outlook.com (10.171.252.153) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384_P256) id 15.20.218.12; Thu, 9 Nov 2017 19:29:24 +0000 From: David Daney To: linux-mips@linux-mips.org, ralf@linux-mips.org, James Hogan , netdev@vger.kernel.org, "David S. Miller" , Rob Herring , Mark Rutland , devel@driverdev.osuosl.org, Greg Kroah-Hartman Cc: linux-kernel@vger.kernel.org, "Steven J. Hill" , devicetree@vger.kernel.org, Andrew Lunn , Florian Fainelli , David Daney Subject: [PATCH v3 0/8] Cavium OCTEON-III network driver. Date: Thu, 9 Nov 2017 11:29:07 -0800 Message-Id: <20171109192915.11912-1-david.daney@cavium.com> X-Mailer: git-send-email 2.13.6 MIME-Version: 1.0 Content-Type: text/plain X-Originating-IP: [50.233.148.156] X-ClientProxiedBy: CO2PR07CA0057.namprd07.prod.outlook.com (10.174.192.25) To CY4PR07MB3496.namprd07.prod.outlook.com (10.171.252.153) X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: 743ef187-6ea3-4f46-87bf-08d527a82fca X-Microsoft-Antispam: UriScan:;BCL:0;PCL:0;RULEID:(22001)(4534020)(4602075)(4627115)(201703031133081)(201702281549075)(2017052603199);SRVR:CY4PR07MB3496; X-Microsoft-Exchange-Diagnostics: 1;CY4PR07MB3496;3:X++t4+RtSI8Xz54ab8gYWJkqSiQ62Ar0G0CEPYYZuMWZDZxTof/LczJypg+gd6ppbUCsYdycajdwaRHVpbP7uTK+RzH6uX/gM3E3dYdpqVp0eD8QrMKClmthzGuJEfizU+FRBtSbOLVF/myZ8jccpQDsQIrqcXq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2Xa76GsafUDWPc24C1c72MsAVgiX7+I73NI3y4dbwCHDAGCWaCknpNBvkKtMs4ONY1Q9DarPPIy4vkNMkpvwKZ9DZp/lYfr2i8xEMRgtN/Em9qBTCSgHj7c8MhqexC7YSWLxk+L3/3jWUMdMpPMJixjYUeAxJOF1cgIiBq/xL7G1OGQ7s;4:nEQYVRC/gkyZD9sPJSP7AwO9YijkgMtHQrZcasUfj/vLHYwI4c26FlSQqQkYwKclW4JsU+Nwm/zHV4MPBBTp3D6IS5Q3tVWn6/HYzwKoyzPtSl+jDeSXwe+sK3AJo18Y6IjNJLi9pDr920bd19Ck7Ja06svoL/rmBDqVh0SQfiN00KepeJhC6bLNF6xYE+QlPAX27Y3OhVGNQcI2GzotPKM5LCez6MXkIvq4uuc7nXAS/GtApD5I9oIKGZ4U3G0GC/sOjVkZFiVNEvphIQGTIw== X-Exchange-Antispam-Report-Test: UriScan:; X-Microsoft-Antispam-PRVS: X-Exchange-Antispam-Report-CFA-Test: BCL:0;PCL:0;RULEID:(100000700101)(100105000095)(100000701101)(100105300095)(100000702101)(100105100095)(6040450)(2401047)(5005006)(8121501046)(93006095)(93001095)(10201501046)(3002001)(100000703101)(100105400095)(3231021)(6041248)(20161123564025)(201703131423075)(201702281528075)(201703061421075)(201703061406153)(20161123555025)(20161123560025)(20161123558100)(20161123562025)(6072148)(201708071742011)(100000704101)(100105200095)(100000705101)(100105500095);SRVR:CY4PR07MB3496;BCL:0;PCL:0;RULEID:(100000800101)(100110000095)(100000801101)(100110300095)(100000802101)(100110100095)(100000803101)(100110400095)(100000804101)(100110200095)(100000805101)(100110500095);SRVR:CY4PR07MB3496; X-Forefront-PRVS: 0486A0CB86 X-Forefront-Antispam-Report: SFV:NSPM;SFS:(10009020)(6009001)(346002)(376002)(189002)(199003)(6116002)(47776003)(6512007)(8676002)(478600001)(81166006)(81156014)(1076002)(36756003)(101416001)(6666003)(69596002)(110136005)(189998001)(86362001)(97736004)(2906002)(54906003)(3846002)(50986999)(16586007)(316002)(68736007)(8936002)(50226002)(106356001)(48376002)(50466002)(53416004)(105586002)(305945005)(7736002)(72206003)(25786009)(66066001)(53936002)(107886003)(6486002)(16526018)(39060400002)(33646002)(5660300001)(4326008)(7416002)(5003940100001)(6506006);DIR:OUT;SFP:1101;SCL:1;SRVR:CY4PR07MB3496;H:ddl.caveonetworks.com;FPR:;SPF:None;PTR:InfoNoRecords;MX:1;A:1;LANG:en; Received-SPF: None (protection.outlook.com: cavium.com does not designate permitted sender hosts) X-Microsoft-Exchange-Diagnostics: =?us-ascii?Q?1;CY4PR07MB3496;23:0wSj79Yv+B9+VLDVsqMhTTlR25ugjiIK0GFVz5RJm?= =?us-ascii?Q?RQOsWWcBIiMTOpwS0+nHgf+E00dl748i+CEJt+wc1iAKaJQBalv+WK/bfbKT?= =?us-ascii?Q?1BuTpCXBPA6DT/Vqq56LZqFkoyHuctwVLE8qfz9kErPJSd/CwSjgQWgGgXPY?= =?us-ascii?Q?QDLI4YKjldLK7Iw4hsil6EGwh1QqOEtBBiRRZ/YMFAyvQly68/z7Zv+dpg+/?= =?us-ascii?Q?JKACCWz3FrtpOiSUaVDwTCuXqEkU3G9xbkjGjJo/52iJfhVNEwk/XMR0Gcma?= =?us-ascii?Q?4TdQG/KA811KJA+LfJfS0uWSPhzrjhWDpxibg4uWDXqg7N/IEfCpKLJoySfz?= =?us-ascii?Q?IbZDPGPflHMGtPggghnssOcw4nOsIUZOJtQasfGTss6C57v8JtgEDRJdz+W0?= =?us-ascii?Q?LXf+O6LZHVTQurT+7bLVQ0kP5Wr4HhQFmAK5qkzRiAzhKnjfR3wCB3rf+/Yg?= =?us-ascii?Q?pcBEqcuP+7a3fzzVvgzQideZ7qhP8g8nTyDsAF/4nSleBnd++rO92oLyWj2L?= =?us-ascii?Q?F8U5uVoXo71EqI5bb6skA++V0TAjKUqLtElR4Nfwsh4r2Z8W4Togb0ELWOjU?= =?us-ascii?Q?k6+Fza7Fjc+hPZnu/r7JzxUiRSShC0bodXsGxyg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rSen8en3+kbtRspfzFR4j8dgnGYOKjJ8G+yX7ZHJD8TpSsl1Ud5V1flQibpmY=;5:OXMgTQEo+t79mdr/d5aJka7GcO06mbLw/18a+oi+Z/mSpYKr29Mb3hceiob6Xe+GOYt8mSCxSE0GXe5WZaxi4Pw3nqNMoHcs7g/9mq2c3HuT04VKh07MCj6KvfxYpWSAvNiwryVLXJjuVysE4+BHB5p5kVZgy2FIF7y5p+EVfiY=;24:r0t1yQKyNq7ksTCxgUjimCM5Z/NNKY4/8wfFqdSU/v5pxi1rNK4QYnHO58d1A/zczToIYbNACK3/KOvbl/OqoWznbrKcJ+tTGHXgsxMUgdY=;7:Td/YAtz56tn2DGs4rQWQMFgxZVBNCzBjr+MgPK3vNwGLVmboz89NIKZPjrigqKvayTeBeNSL5Izj01lee6W/mJkpkR0BkoMRqBFn8INqhnWZPT6GSvGas5ctxXl4VY+e8WuynBq/ewxeWG7tJ5vTbPG5hTfLt57Ixkm5dTVXJj+VxVCiHeUUWlRKf79U/D3Bx+sHWqmBXp0sCETMgGN4fiVUZF1/74QdKvcjKwtjl1bXFAXusfrwDdWIDVE5yz8x SpamDiagnosticOutput: 1:99 SpamDiagnosticMetadata: NSPM X-OriginatorOrg: cavium.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 09 Nov 2017 19:29:24.4503 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 743ef187-6ea3-4f46-87bf-08d527a82fca X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 711e4ccf-2e9b-4bcf-a551-4094005b6194 X-MS-Exchange-Transport-CrossTenantHeadersStamped: CY4PR07MB3496 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org We are adding the Cavium OCTEON-III network driver. But since interacting with the input and output queues is done via special CPU local memory, we also need to add support to the MIPS/Octeon architecture code. Aren't SoCs nice in this way? The first six patches add the SoC support needed by the driver, the last two add the driver and an entry in MAINTAINERS. Since these touch several subsystems (mips, staging, netdev), I would propose merging via netdev, but defer to the maintainers if they think something else would work better. A separate pull request was recently done by Steven Hill for the firmware required by the driver. Changes from v2: o Fix PKI (RX path) initialization to work with little endian kernel. Changes from v1: o Cleanup and use of standard bindings in the device tree bindings document. o Added (hopefully) clarifying comments about several OCTEON architectural peculiarities. o Removed unused testing code from the driver. o Removed some module parameters that already default to the proper values. o KConfig cleanup, including testing on x86_64, arm64 and mips. o Fixed breakage to the driver for previous generation of OCTEON SoCs (in the staging directory still). o Verified bisectability of the patch set. Carlos Munoz (5): dt-bindings: Add Cavium Octeon Common Ethernet Interface. MIPS: Octeon: Enable LMTDMA/LMTST operations. MIPS: Octeon: Add a global resource manager. MIPS: Octeon: Add Free Pointer Unit (FPA) support. netdev: octeon-ethernet: Add Cavium Octeon III support. David Daney (3): MIPS: Octeon: Automatically provision CVMSEG space. staging: octeon: Remove USE_ASYNC_IOBDMA macro. MAINTAINERS: Add entry for drivers/net/ethernet/cavium/octeon/octeon3-* .../devicetree/bindings/net/cavium-bgx.txt | 61 + MAINTAINERS | 6 + arch/mips/cavium-octeon/Kconfig | 35 +- arch/mips/cavium-octeon/Makefile | 4 +- arch/mips/cavium-octeon/octeon-fpa3.c | 364 ++++ arch/mips/cavium-octeon/resource-mgr.c | 371 ++++ arch/mips/cavium-octeon/setup.c | 22 +- .../asm/mach-cavium-octeon/kernel-entry-init.h | 20 +- arch/mips/include/asm/mipsregs.h | 2 + arch/mips/include/asm/octeon/octeon.h | 47 +- arch/mips/include/asm/processor.h | 2 +- arch/mips/kernel/octeon_switch.S | 2 - arch/mips/mm/tlbex.c | 29 +- drivers/net/ethernet/cavium/Kconfig | 55 +- drivers/net/ethernet/cavium/octeon/Makefile | 6 + .../net/ethernet/cavium/octeon/octeon3-bgx-nexus.c | 698 +++++++ .../net/ethernet/cavium/octeon/octeon3-bgx-port.c | 2028 +++++++++++++++++++ drivers/net/ethernet/cavium/octeon/octeon3-core.c | 2068 ++++++++++++++++++++ drivers/net/ethernet/cavium/octeon/octeon3-pki.c | 832 ++++++++ drivers/net/ethernet/cavium/octeon/octeon3-pko.c | 1719 ++++++++++++++++ drivers/net/ethernet/cavium/octeon/octeon3-sso.c | 309 +++ drivers/net/ethernet/cavium/octeon/octeon3.h | 411 ++++ drivers/staging/octeon/ethernet-defines.h | 6 - drivers/staging/octeon/ethernet-rx.c | 25 +- drivers/staging/octeon/ethernet-tx.c | 85 +- 25 files changed, 9064 insertions(+), 143 deletions(-) create mode 100644 Documentation/devicetree/bindings/net/cavium-bgx.txt create mode 100644 arch/mips/cavium-octeon/octeon-fpa3.c create mode 100644 arch/mips/cavium-octeon/resource-mgr.c create mode 100644 drivers/net/ethernet/cavium/octeon/octeon3-bgx-nexus.c create mode 100644 drivers/net/ethernet/cavium/octeon/octeon3-bgx-port.c create mode 100644 drivers/net/ethernet/cavium/octeon/octeon3-core.c create mode 100644 drivers/net/ethernet/cavium/octeon/octeon3-pki.c create mode 100644 drivers/net/ethernet/cavium/octeon/octeon3-pko.c create mode 100644 drivers/net/ethernet/cavium/octeon/octeon3-sso.c create mode 100644 drivers/net/ethernet/cavium/octeon/octeon3.h -- 2.13.6 From 1583546524185074161@xxx Thu Nov 09 00:34:08 +0000 2017 X-GM-THRID: 1583546524185074161 X-Gmail-Labels: Inbox,Category Forums,HistoricalUnread