From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753327AbcADSes (ORCPT ); Mon, 4 Jan 2016 13:34:48 -0500 Received: from mail-by2on0092.outbound.protection.outlook.com ([207.46.100.92]:32621 "EHLO na01-by2-obe.outbound.protection.outlook.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1752811AbcADSei (ORCPT ); Mon, 4 Jan 2016 13:34:38 -0500 Authentication-Results: spf=none (sender IP is ) smtp.mailfrom=David.Daney@caviumnetworks.com; Message-ID: <568AB788.6050605@caviumnetworks.com> Date: Mon, 4 Jan 2016 10:18:48 -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: Rob Herring CC: David Daney , , Will Deacon , Pawel Moll , Mark Rutland , Ian Campbell , Kumar Gala , , , Marc Zyngier , Bjorn Helgaas , , Arnd Bergmann , David Daney Subject: Re: [PATCH v2 2/2] pci, pcie-thunder-pem: Add PCIe host driver for ThunderX processors. References: <1450827832-3294-1-git-send-email-ddaney.cavm@gmail.com> <1450827832-3294-3-git-send-email-ddaney.cavm@gmail.com> <20151229203717.GA21072@rob-hp-laptop> In-Reply-To: <20151229203717.GA21072@rob-hp-laptop> Content-Type: text/plain; charset="ISO-8859-1"; format=flowed Content-Transfer-Encoding: 7bit X-Originating-IP: [50.233.148.158] X-ClientProxiedBy: BLUPR07CA083.namprd07.prod.outlook.com (25.160.24.38) To BN4PR07MB2129.namprd07.prod.outlook.com (25.164.63.11) X-Microsoft-Exchange-Diagnostics: 1;BN4PR07MB2129;2:7JcfBEmacRf+hLTyBLMEpKpFw+0eRIixRyN3X0JRd/edbVXE2GjJFAT5PWpxnB+GKUyvjiQjxyJ6ioHc8EkcfzDioqZxJ9EuWKfeag+V2Nzek1xvPRwAmDmqohSakRMZbC/QCe29Tu4f4nd6N9KXxQ==;3:l6fdaSMt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meo57uZzNuNl4= X-Microsoft-Antispam-PRVS: X-Exchange-Antispam-Report-Test: UriScan:; X-Exchange-Antispam-Report-CFA-Test: BCL:0;PCL:0;RULEID:(601004)(2401047)(520078)(5005006)(8121501046)(10201501046)(3002001);SRVR:BN4PR07MB2129;BCL:0;PCL:0;RULEID:;SRVR:BN4PR07MB2129; X-Microsoft-Exchange-Diagnostics: 1;BN4PR07MB2129;4:dNUAP0RazhUwzCHwB+6EwBO2PYXwuQIn1rW88UKGnkA3+WPrJGau04hAcIC05E7+wgv0tTzr5NxUIOrNFPUBpy+djKWuWzKynv0/VQijJ1kfqtRWCYVqz/Bo60192SbOZFeuVn/VMZE43H3ebZBLx2bX8oHVKjGfoRo6QBNaJz+ciz8KiFLbeirHXs/nxeL7l8O5L/tGl8+HOlMCERfz9eQ0uQelOnkp2rSOIwS/FINtfM4W1zYAwqc8eYZhgI8WOrInxtXi2piaUuFvu/fQ4tOFwIC/9colbCX4ZtN15T3BfyLECGdi2PgMblHvHEU1nqBnWVjgve38KoH8xTcJGhhFV1hPhRegu3nAZV9Ur9gNHX+O6IzLjkLqWmDkAr9Q X-Forefront-PRVS: 08118EFC2B X-Forefront-Antispam-Report: SFV:NSPM;SFS:(10009020)(6009001)(377454003)(164054003)(189002)(199003)(24454002)(479174004)(110136002)(64126003)(6116002)(69596002)(2950100001)(92566002)(83506001)(81156007)(230700001)(189998001)(101416001)(586003)(42186005)(5008740100001)(4001350100001)(50466002)(97736004)(3846002)(33656002)(65816999)(54356999)(87266999)(76176999)(47776003)(19580405001)(40100003)(230783001)(36756003)(4326007)(5001960100002)(1096002)(80316001)(50986999)(59896002)(65956001)(5004730100002)(19580395003)(105586002)(87976001)(66066001)(77096005)(122386002)(65806001)(106356001)(53416004)(23756003);DIR:OUT;SFP:1101;SCL:1;SRVR:BN4PR07MB2129;H:dl.caveonetworks.com;FPR:;SPF:None;PTR:InfoNoRecords;MX:1;A:1;LANG:en; X-Microsoft-Exchange-Diagnostics: =?iso-8859-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Vvf2bl174nRRBEUDtPu+2YfQeu?= =?iso-8859-1?Q?ALdcsP4UeMFsL+qN6TBUkqomtKYEnusJDQmdOIzlAQPxNmOc3GAuQwGqEg?= =?iso-8859-1?Q?/aX4kmRli5+9eyfEM3SCt3GAr/qlo/wtlQTpOhYViKJE/L/hOOHs3rzsDf?= =?iso-8859-1?Q?nKNocUtDmS6a6Bm3/Z/sc4623kKbAUc9tdoRsyX/4UyIwjg4F+19/s/dOl?= =?iso-8859-1?Q?Ye612UJhHmzKubIMkpMYSRgpDa6uib/AAQ0fSPlWIV3iZsQo1+7M0XK9v6?= =?iso-8859-1?Q?w8RdMa5yJp/3pmhx3WaI3ZQ0Kfzt3tELLaCSrb5+Et7aBdHIve2UXOMGHf?= =?iso-8859-1?Q?PtBF60znIRa+VTLk0FTq5kFeVlXkRST0fmFMCAD3T1Y+uE9+S8jJTlbxzC?= =?iso-8859-1?Q?n+1YVulonjEksaxEWm5Dm9nNSq0hUqdh4sr4/V2aBwffvvYkoeZKBXUwY/?= =?iso-8859-1?Q?k6BojsIurPcwnYEJIvmNKKvMTTpq0dOA3oQ2e01pEphLPxJ5B2QAAYTo6F?= =?iso-8859-1?Q?unRrFS2I2nHPYl62Hrw4x4Z9l5t4/OpCkPtOzwP2ajuE9cEEH1g=3D=3D?= X-Microsoft-Exchange-Diagnostics: 1;BN4PR07MB2129;5:PaeE03ZJUgRjoqI6jVqt76fZLzP7M74Zb62egnLRYs6YbbZ3SLooYUbdbnRXRzuEqaAsTsEEphuLkDPg23wRU99M2WGH4BEiyWWwhOqTqpq14GKlOco+zYcNq03rbbObq5scRgy7c4XvUKELZrGgeA==;24:FYAUQIcEW9l5NpnJrTWtDjuiicKgWXCexBw28lMZAwgbsi3crVtE4Bde844xdWA98TlbSSDD/aVy/2s5tfcSzwgIM4RaM7iZskeUrS8bOV4= SpamDiagnosticOutput: 1:23 SpamDiagnosticMetadata: NSPM X-OriginatorOrg: caviumnetworks.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 04 Jan 2016 18:18:57.5814 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-Transport-CrossTenantHeadersStamped: BN4PR07MB2129 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 12/29/2015 12:37 PM, Rob Herring wrote: > On Tue, Dec 22, 2015 at 03:43:52PM -0800, David Daney wrote: >> From: David Daney >> >> Some Cavium ThunderX processors require quirky access methods for the >> config space of the PCIe bridge. Add a driver to provide these config >> space accessor functions. The pci-host-common code is used to >> configure the PCI machinery. > > Same comments again... Yes, I think your initial reply and my v2 must have crossed in mid-flight. Then I was on holiday, but now I can respond... > >> Signed-off-by: David Daney >> --- >> .../devicetree/bindings/pci/pcie-thunder-pem.txt | 43 ++++ >> drivers/pci/host/Kconfig | 7 + >> drivers/pci/host/Makefile | 1 + >> drivers/pci/host/pcie-thunder-pem.c | 283 +++++++++++++++++++++ >> 4 files changed, 334 insertions(+) >> create mode 100644 Documentation/devicetree/bindings/pci/pcie-thunder-pem.txt >> create mode 100644 drivers/pci/host/pcie-thunder-pem.c >> >> diff --git a/Documentation/devicetree/bindings/pci/pcie-thunder-pem.txt b/Documentation/devicetree/bindings/pci/pcie-thunder-pem.txt >> new file mode 100644 >> index 0000000..52f56b3 >> --- /dev/null >> +++ b/Documentation/devicetree/bindings/pci/pcie-thunder-pem.txt >> @@ -0,0 +1,43 @@ >> +* ThunderX PEM PCIe host controller >> + >> +Firmware-initialized PCIe host controller found on some Cavium >> +ThunderX processors. >> + >> +The properties and their meanings are identical to those described in >> +host-generic-pci.txt except as listed below. >> + >> +Properties of the host controller node that differ from >> +host-generic-pci.txt: >> + >> +- compatible : Must be "cavium,pci-host-thunder-pem" > > pcie rather than pci? Technically it is a PCI host controller at the root, and doesn't become PCIe until we traverse a PCIe RC bridge, Because of this, and also because there is deployed firmware supplying this compatible string, I would like to keep the name as is. If you really want consistency, we could rename the driver (and this binding description file) to be pci-thunder-pem. > >> + >> +- reg : Two entries: First the configuration space for down >> + stream devices base address and size, as accessed >> + from the parent bus. Second, the register bank of >> + the PEM device PCIe bridge. >> + >> +Example: >> + >> + pem2 { > > pcie-controller@... instead of pem2. That is purely cosmetic, as the names are not used for anything. I can change it as you suggest. [...] Thanks, David Daney