Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752700AbcCKWW1 (ORCPT ); Fri, 11 Mar 2016 17:22:27 -0500 Received: from mail-bn1on0056.outbound.protection.outlook.com ([157.56.110.56]:24928 "EHLO na01-bn1-obe.outbound.protection.outlook.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1752437AbcCKWWY (ORCPT ); Fri, 11 Mar 2016 17:22:24 -0500 Authentication-Results: kernel.org; dkim=none (message not signed) header.d=none;kernel.org; dmarc=none action=none header.from=caviumnetworks.com; Message-ID: <56E34518.5020800@caviumnetworks.com> Date: Fri, 11 Mar 2016 14:22:16 -0800 From: David Daney User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:17.0) Gecko/20130625 Thunderbird/17.0.7 MIME-Version: 1.0 To: Bjorn Helgaas CC: David Daney , , , Bjorn Helgaas , Rob Herring , Pawel Moll , Mark Rutland , Ian Campbell , Kumar Gala , Will Deacon , , , Dann Frazier , David Daney Subject: Re: [PATCH v7 0/3] Add host controller drivers for Cavium ThunderX PCI References: <1457130708-3231-1-git-send-email-ddaney.cavm@gmail.com> <20160311221848.GG4725@localhost> In-Reply-To: <20160311221848.GG4725@localhost> Content-Type: text/plain; charset="ISO-8859-1"; format=flowed Content-Transfer-Encoding: 7bit X-Originating-IP: [64.2.3.194] X-ClientProxiedBy: SN1PR0701CA0077.namprd07.prod.outlook.com (25.163.126.45) To BN4PR07MB2131.namprd07.prod.outlook.com (25.164.63.13) X-MS-Office365-Filtering-Correlation-Id: c1d8ab6f-2e54-433d-52b5-08d349fb9d63 X-Microsoft-Exchange-Diagnostics: 1;BN4PR07MB2131;2:MQdLt3McQwoYPLxRNOUoTgYct/2oN6bMk5z/kLiQ1MtJ12HiaIFRX8vlnPBizfiwYFnEyT8f2m23jgYtz8aVVY9L8GB1EDzg7JJQr4JQG2rrAGouw0RxRm0efT/GJGSPU8MS3uEhBCS3YNAaP98D/0dwUB1xus2XXJSsHpDRufJZ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mZBcvCOzO8DfgJcbOtg1cURc+VQ+8jUrJ8q+eKUt0r3tQiz3/67PBUj7vxAFSTGiKGGEQ8Dm6EGKBTx8NSALSXQ0pThMccMU+N/ih0oigpcwyph7eUS34+AhrCFMj+c5TYMvR1s4EXNL6xUJBvJhPVOGf4z05o= X-Microsoft-Antispam-PRVS: X-Exchange-Antispam-Report-Test: UriScan:; X-Exchange-Antispam-Report-CFA-Test: BCL:0;PCL:0;RULEID:(601004)(2401047)(8121501046)(5005006)(10201501046)(3002001);SRVR:BN4PR07MB2131;BCL:0;PCL:0;RULEID:;SRVR:BN4PR07MB2131; X-Microsoft-Exchange-Diagnostics: 1;BN4PR07MB2131;4:aKnic+3ELYsXI7VHmhb5To/IBouSGVsC3yCw32BxPQAlmlGQZCcYxRzzKCDW+YDm3+YIVVH3lOEsA5vIBFXdDt6pTkLKNpFu2ir2fZY9mt5MOvxlMIrPVzViRIjDfNonAUx/J7l7zTcoVUiZm9vh6Y415sjdaSCzefNvR/LKW/QtF6JMD2uA5qV+F9MohNpXggi9h+MQpaezs9nQ1Ts3LQX6IFl7fK/8+IWcxSzqgWqFlp/Qg999TPjIxI01Cf3qsdIou0VGsFGOMS7cMgw90StO8dnn6ZebETXaOQssUnc5lcZ932f93v5uh8G3YYratvjL1Upvm3Hnq+UYAXUFJwar+m5SVDXxcB7dB9sE8LMGEIoKZuTv5ZbcwC5Owbcg X-Forefront-PRVS: 087894CD3C X-Forefront-Antispam-Report: SFV:NSPM;SFS:(10009020)(4630300001)(6009001)(24454002)(479174004)(377454003)(586003)(65956001)(50466002)(65806001)(2950100001)(81166005)(4326007)(345774005)(19580395003)(66066001)(92566002)(1096002)(2906002)(53416004)(36756003)(42186005)(6116002)(5008740100001)(76176999)(54356999)(3846002)(33656002)(230700001)(50986999)(64126003)(47776003)(23756003)(5004730100002)(65816999)(59896002)(189998001)(110136002)(4001350100001)(19580405001)(80316001)(77096005);DIR:OUT;SFP:1101;SCL:1;SRVR:BN4PR07MB2131;H:dl.caveonetworks.com;FPR:;SPF:None;MLV:sfv;LANG:en; X-Microsoft-Exchange-Diagnostics: =?iso-8859-1?Q?1;BN4PR07MB2131;23:WKDDMWpUX7YoNP1mgibUSrgMTB1Ml/6V28jpM8X?= =?iso-8859-1?Q?8VUuCoPGmXs4Pnxux/PBHJt1uhrYaPD5H34racW5IZ66faGi4fiRmWKqyp?= =?iso-8859-1?Q?NlVZ0dQUYxTvAL1LriA1yyT3BxZ6YYeajI0G17VszMLoHX6B1XIsEnpoEc?= =?iso-8859-1?Q?NexaD22WxSFlsmCq00b5epYpHEJrrlLN7oHqLfQ5AJlVqxfP/W7fBhll4x?= =?iso-8859-1?Q?CBchqiuSfyoNN3KLjjWpl952IgqONkzM/qiB1+AuHmMTQuN81iEeQtfvy4?= =?iso-8859-1?Q?526B4AfAneg8Gs/QGwKfYN7w0IuFbqvWsQDVEp61ctfqyB4oZluJkFGDeZ?= =?iso-8859-1?Q?Tqil6AB4sn8YIp7b+W+cKRwnVBcmUzI8DAcsv6Mq5xJf8ezpENbpqOswE+?= =?iso-8859-1?Q?vDFDv0BdSd5veLEKfBsGhVu+Xmhtm70DMg7eT/Zh4IOx5bkpe3awZ090UR?= =?iso-8859-1?Q?2mFlcNIZnMx33SSKIzYCPQ0Qu9u6zL7oXFEERlChLm0TNWvEB1/5izP0El?= =?iso-8859-1?Q?qy1WONSSCJTS61VJJa1nuWBQ6jZxUTGFroTpSzMGgSKq9HFH5G0vM37HP4?= =?iso-8859-1?Q?lpOo89rtt3wUSJmPm6I4sMRL7BxKmhc5sDwZttmtAil5YQj3e/woOcYxA/?= =?iso-8859-1?Q?wcO+HNPV+NRabVqmC5+HkqoWmKKWFj98j+5XgueXIormluWnJ2uu3dBbpm?= =?iso-8859-1?Q?FgIyckBU+aZzcLevW3SDDo59bW8kGY3/t5VOS2QMZD3wsDDprFT5xuZNGn?= =?iso-8859-1?Q?AKhYZjv04Gzb30FVqi+fOGEdYUC3OOAFJeDgYHGFJaFIBbB5WGpTx5J5Wj?= =?iso-8859-1?Q?Mv4K9UEXhi5S8cSSmLJGlr9uxXggUrKQfq7cMzgmy+eCZW8Z5KrCJGYP4S?= =?iso-8859-1?Q?pxNrDFhX5mb7WUdehxKU25KN64y6c1gVRg2y0p4s42CwAU5CFpZZwCpFK1?= =?iso-8859-1?Q?0OJr/nHE6duUWxBn/QZMw0seE3aDMSiZHm0VC/QjvPB6SH51VdwmySMYVC?= =?iso-8859-1?Q?mL7R/aXbERrh3XF3alwZitUeDo3x4+vdozNQUpB+V7Ry2fWY5hNX4PYSt6?= =?iso-8859-1?Q?xikiE0i27QnGWAxcem+9P8YrKB5vUMACQ1hEfcQlp9jFAoP20pb7av4F5N?= =?iso-8859-1?Q?CGRlRiqnl3ZcPzgXPeHd5pCfPWw=3D=3D?= X-Microsoft-Exchange-Diagnostics: 1;BN4PR07MB2131;5:Fxd+sonuSMH3dGeNkmAOpGKsDCTwFxS3fdZD208TyqRBxGWXybJg7IAtSsMmhTS8Is/a32pVQ3FC0CZGdnKSqMcyFBkZqjVnXRCi9iGiZgOrHaPg7yLSYJ5qJyMt5+kSB32x7Xun4yoZsG4H7q3LSQ==;24:JKmYyAUsPGLsU0iGRJm4E28Y2iqQQnmUpFMPznWzaJn4SYnQdRoRTIF2MjadlVsc7HYMcZzyd/590QpTxaGBHCyRPvCEIfNTjcTmR9DncFQ= SpamDiagnosticOutput: 1:23 SpamDiagnosticMetadata: NSPM X-OriginatorOrg: caviumnetworks.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 11 Mar 2016 22:22:19.8960 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-Transport-CrossTenantHeadersStamped: BN4PR07MB2131 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 3740 Lines: 84 On 03/11/2016 02:18 PM, Bjorn Helgaas wrote: > On Fri, Mar 04, 2016 at 02:31:45PM -0800, David Daney wrote: >> From: David Daney >> >> Some Cavium ThunderX processors require quirky access methods for the >> config space of the PCIe bridge. >> >> There are now three patches: >> >> 1) Refactor code in pci-host-generic so that it can more easily be >> used by other drivers. This splits the driver for CAM and ECAM >> access methods to a separate file from the common host driver code. >> >> 2) Add the ThunderX PCIe driver to external PCIe buses, which >> leverages the code in pci-host-generic >> >> 3) Add ThunderX PCI driver for internel SoC buses used on early >> ThunderX chip revisions. >> >> Changes from v6: Updated 3/3 to support Thunder pass-2.x silicon. >> >> Changes from v5: Added Acked-by Rob Herring for the device tree >> binding in 3/3. Fixed typo and split large functions as suggested by >> Bjorn Helgaas. >> >> Changes from v4: Added patch 3/3. Stylistic changes to 2/3 suggested >> by Bjorn Helgaas. When expanding config write width to 32-bits, mask >> out unintened writes to W1C bits, also suggested by Bjorn Helgaas. >> >> Changes from v3: Add some Acked-by, rebased to v4.5.0-rc1 >> >> Changes from v2: Improve device tree binding example as noted by Rob >> Herring. Rename pcie-thunder-pem.* to pci-thunder-pem.* for better >> consistency. Update MAINTAINERS to reflect the changes. >> >> Changes from v1: Split CAM and ECAM code from common driver code as >> suggested by Arnd Bergmann. Fix spelling errors in >> pcie-thunder-pem.txt >> >> >> David Daney (3): >> PCI: generic: Refactor code to enable reuse by other drivers. >> pci, pci-thunder-pem: Add PCIe host driver for ThunderX processors. >> pci, pci-thunder-ecam: Add driver for ThunderX-pass{1,2} on-chip >> devices >> >> .../devicetree/bindings/pci/pci-thunder-ecam.txt | 30 ++ >> .../devicetree/bindings/pci/pci-thunder-pem.txt | 43 +++ >> MAINTAINERS | 9 + >> drivers/pci/host/Kconfig | 18 + >> drivers/pci/host/Makefile | 3 + >> drivers/pci/host/pci-host-common.c | 194 ++++++++++ >> drivers/pci/host/pci-host-common.h | 47 +++ >> drivers/pci/host/pci-host-generic.c | 181 +-------- >> drivers/pci/host/pci-thunder-ecam.c | 407 +++++++++++++++++++++ >> drivers/pci/host/pci-thunder-pem.c | 347 ++++++++++++++++++ >> 10 files changed, 1102 insertions(+), 177 deletions(-) >> create mode 100644 Documentation/devicetree/bindings/pci/pci-thunder-ecam.txt >> create mode 100644 Documentation/devicetree/bindings/pci/pci-thunder-pem.txt >> create mode 100644 drivers/pci/host/pci-host-common.c >> create mode 100644 drivers/pci/host/pci-host-common.h >> create mode 100644 drivers/pci/host/pci-thunder-ecam.c >> create mode 100644 drivers/pci/host/pci-thunder-pem.c > > These all look great! > > I applied them to pci/host-thunder for v4.6. > > I did split up the first patch into three: > > PCI: generic: Move structure definitions to separate header file > PCI: generic: Add pci_host_common_probe(), based on gen_pci_probe() > PCI: generic: Expose pci_host_common_probe() for use by other drivers > > simply to make them smaller and easier to review, bisect, and revert. I > verified that the result was identical to your original patch, but > hopefully I didn't break anything in the intermediate states. The zero-day > build robot should catch obvious goofs. > Thank you for having the patience to work through all these patch revisions with me. David Daney