From mboxrd@z Thu Jan 1 00:00:00 1970 From: David Daney Subject: Re: [PATCH] net: mdio-octeon: Add PCI driver binding. Date: Thu, 24 Sep 2015 15:12:03 -0700 Message-ID: <56047533.4020906@caviumnetworks.com> References: <1442968896-30776-1-git-send-email-ddaney.cavm@gmail.com> <20150924.145206.897667718297700953.davem@davemloft.net> <56047367.3060101@caviumnetworks.com> Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-7; format=flowed Content-Transfer-Encoding: QUOTED-PRINTABLE Return-path: In-Reply-To: <56047367.3060101-M3mlKVOIwJVv6pq1l3V1OdBPR1lH4CV8@public.gmane.org> Sender: devicetree-owner-u79uwXL29TY76Z2rM5mHXA@public.gmane.org To: David Miller Cc: ddaney.cavm-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org, linux-kernel-u79uwXL29TY76Z2rM5mHXA@public.gmane.org, robh+dt-DgEjT+Ai2ygdnm+yROfE0A@public.gmane.org, pawel.moll-5wv7dgnIgG8@public.gmane.org, mark.rutland-5wv7dgnIgG8@public.gmane.org, ijc+devicetree-KcIKpvwj1kUDXYZnReoRVg@public.gmane.org, galak-sgV2jX0FEOL9JmXXK+q4OQ@public.gmane.org, devicetree-u79uwXL29TY76Z2rM5mHXA@public.gmane.org, f.fainelli-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org, netdev-u79uwXL29TY76Z2rM5mHXA@public.gmane.org, david.daney-YGCgFSpz5w/QT0dZR+AlfA@public.gmane.org List-Id: devicetree@vger.kernel.org On 09/24/2015 03:04 PM, David Daney wrote: > On 09/24/2015 02:52 PM, David Miller wrote: >> From: David Daney >> Date: Tue, 22 Sep 2015 17:41:36 -0700 >> >>> From: David Daney >>> >>> When the Cavium mdio-octeon devices appear in the Thunder family of >>> arm64 based SoCs, they show up as PCI devices. Add PCI driver >>> wrapping so the driver is bound in the standard PCI device scan. >>> >>> When in this form, a single PCI device may have more than a single >>> bus, we call this a "nexus" of buses. The standard firmware >>> device_for_each_child_node() iterator is used to find the individua= l >>> buses underneath the "nexus". >>> >>> Update the device tree binding documentation for the new PCI driver >>> binding. >>> >>> Signed-off-by: David Daney >> >> This patch breaks the build: > > For which architecture? > > I tested it on mips and arm64. I will try x86, as I guess that is wh= ere > you tried your test build. > > >> >> CC [M] drivers/net/phy/mdio-octeon.o >> In file included from drivers/net/phy/mdio-octeon.c:13:0: >> include/linux/module.h:128:27: error: redefinition of =A1__inittest=A2 >> static inline initcall_t __inittest(void) \ >> OK, I reproduced this failure. It happens with a module build only. Sorry for the breakage, I will fix it and resubmit. David Daney ^ > [...] > >> >> And frankly I'm not sure I like this change anyways. If the OF node= s >> are there, simply add code to match on those OF nodes. >> >> This is better than assuming what sits underneath a PCI node, withou= t >> any checks for the 'name' or 'compatible' properties at all. That's >> what they are there for afterall. > > There is, somewhat of, a method behind the madness here. > > In order to use MSI-X interrupts, we need a corresponding PCI device. > Now, this driver doesn't currently use interrupts, but other devices = in > the SoC do, so they must be PCI devices. > > The idea is to have the type of all drivers uniformly be PCI, rather > than a random mix of PCI and platform, and then switch them back and > forth as PCI features are/are-not used in the driver. > > Also we need to consider ACPI firmware in addition to OF device tree. > > David Daney > -- To unsubscribe from this list: send the line "unsubscribe devicetree" i= n the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org More majordomo info at http://vger.kernel.org/majordomo-info.html From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754630AbbIXWMP (ORCPT ); Thu, 24 Sep 2015 18:12:15 -0400 Received: from mail-bn1on0056.outbound.protection.outlook.com ([157.56.110.56]:13824 "EHLO na01-bn1-obe.outbound.protection.outlook.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1753865AbbIXWMM (ORCPT ); Thu, 24 Sep 2015 18:12:12 -0400 Authentication-Results: spf=none (sender IP is ) smtp.mailfrom=David.Daney@caviumnetworks.com; Message-ID: <56047533.4020906@caviumnetworks.com> Date: Thu, 24 Sep 2015 15:12:03 -0700 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: David Miller CC: , , , , , , , , , , Subject: Re: [PATCH] net: mdio-octeon: Add PCI driver binding. References: <1442968896-30776-1-git-send-email-ddaney.cavm@gmail.com> <20150924.145206.897667718297700953.davem@davemloft.net> <56047367.3060101@caviumnetworks.com> In-Reply-To: <56047367.3060101@caviumnetworks.com> Content-Type: text/plain; charset="ISO-8859-7"; format=flowed Content-Transfer-Encoding: 8bit X-Originating-IP: [64.2.3.194] X-ClientProxiedBy: SN1PR07CA0015.namprd07.prod.outlook.com (25.162.170.153) To CY1PR0701MB1725.namprd07.prod.outlook.com (25.163.21.14) X-Microsoft-Exchange-Diagnostics: 1;CY1PR0701MB1725;2:Dn/D0hfm3Z7nYJvQJXixtR/A3bnM4MGWaQmoBeRIiRUurlzf9Ukom6fkvXjOb1sgWcPQXYoC3ivJ2Niqn+pPsAq4+CDbqlpSwsyb9UbxWaaJCF84LT3FeI4X83P47WvKeyWkUwdGUir/sl7vqz00jBPCAsaVimnBLNiqDWGiI4o=;3:M6kIMYud3F9l4nqak9JtEYut3GwCtuTFL6ibaAZSvfidtSm36ECUzWl/Zs5XqQu/K9od05jlDynS4VPKsQkBka92Jg09gu9jRbn0IMEYDdVQNs2sudVYBML/tvd8WGQiGk/HoJcdTQyUsxz8QajLIQ==;25:zIuoUEMBrNI7xrHipUYalCf7lG94qIbVzF3OPXumbjuKjwFrmDeX/7a8kD3GUF60Y7iiaXXLbct14HZfUqw0aX/vElBGqZAhESdu2EIVsC4pUMjnBp7ReUzgx+CdsgO/ggy4AAF8tsa72ccurba87bKcAx6RQvoDwV7+3l5p3/xiiQ2V5UUfmrlJob2pYnxmxYCwm6TLFHoyB/9s4fN4AhfkxZZ3rVwBsX9j5uTL8XThdyZeRZhh5CdW3aRz6ZcR/3ZNHh8JaeNTHkbKQ0RGpw== X-Microsoft-Antispam: UriScan:;BCL:0;PCL:0;RULEID:;SRVR:CY1PR0701MB1725; X-Microsoft-Exchange-Diagnostics: 1;CY1PR0701MB1725;20:2JKuUno002mFZuogHp3WG6CNDvkEI+2BGa34VgtGVX8606Z390RQTurP87UIyUoiPfV0flOQ4tlpoUdkj1kSOYCJU1y4oJtJVs/hqA3RjKlFJ7hb7osG2tpmsEP6AHdF20O2TjGxSYZjYHfNtf36dj9Z+LBcnbOsj4FWq7wGaIRYfzXuivvhDglmAN6TvLDtuZDoKHi+uCAtpzr619MgUtoM4rWckB23zJObi/57akuZqmNPSuEASEW8LnoUtzhE0qzuPtPteNToot7lIqLVHbz2mcTMENZQCCqu04EqGSliKNty4ApU/txrtLEgNxNhgv/XGV3x8n5KPxhsX/6GsyBW79JHTop7XTz5xoMFawziTtb9h+/UOp3ILa5PL7Jf3z9/lTYUAMpabfgqCbVgn9sI/uzhXlNZtfXkT5n38Y3hw9pMlhLW+pClc2ECRLNpaUXx6Xdhy1wYrsw98xQ07ssVLL/JttDn+pvfMgBbfh0zJvo0mSPMc3z3Pp21QFUTxW2CTE2i+HlxBgrrJKnDFNq/4IgFbL9Kqr3NBIgOJHdAtH1VnUurtVoIA1neg+0ZNBonfbv70B4JakgFsbp3xr45KId0blkfmtvRlIsNDSE= 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)(520078)(3002001);SRVR:CY1PR0701MB1725;BCL:0;PCL:0;RULEID:;SRVR:CY1PR0701MB1725; X-Microsoft-Exchange-Diagnostics: 1;CY1PR0701MB1725;4:+VWh5w/054VC3mYCF2TAj4H9jeh9VGfDnzD1C9fF+YrELAMceRNgPjYQiKxN0rzN08TPeugT1UwZstgVrO7eLzqsh7QYXiSSYFc8IfTvkkvD3CEU62aJZEEr8iaqX5b5XCA7hHvFrEBmG4knINCdZcSietWZxAHFXUAr5lFbcdanFKylQBqfNkTnOyS2HtKz1GuXDatTylxz00oZK7G1j6PaBEMLbjed3EPkKglFYt2u0yj7Ft1X1RBNWX22IVT+QDs6cDSeDUT39gcjdIq+QD7zbEKjWOhnT6B5G+mI+xpPbs+gAFo54ZWmaW9Y8+5y7dA4RwDXkZLceNRUXYEOZ5asQKdvbuVv9XIM8UfBwl8= X-Forefront-PRVS: 070912876F X-Forefront-Antispam-Report: SFV:NSPM;SFS:(10009020)(6009001)(199003)(189002)(24454002)(377454003)(479174004)(54356999)(62966003)(65816999)(83506001)(87266999)(97736004)(5001860100001)(5001830100001)(4001350100001)(81156007)(64126003)(68736005)(46102003)(77096005)(77156002)(92566002)(42186005)(19580405001)(99136001)(69596002)(19580395003)(106356001)(105586002)(101416001)(87976001)(4001540100001)(2950100001)(5004730100002)(5001960100002)(50466002)(64706001)(189998001)(36756003)(110136002)(47776003)(53416004)(50986999)(117636001)(59896002)(76176999)(40100003)(122386002)(5001920100001)(5007970100001)(66066001)(65806001)(65956001)(62816006);DIR:OUT;SFP:1101;SCL:1;SRVR:CY1PR0701MB1725;H:dl.caveonetworks.com;FPR:;SPF:None;PTR:InfoNoRecords;A:1;MX:1;LANG:en; X-Microsoft-Exchange-Diagnostics: =?iso-8859-7?Q?1;CY1PR0701MB1725;23:ZqfDPH44M2MsA1pr5ZqT2VJqxquATWAMQZkMA?= =?iso-8859-7?Q?ACfP8Z9MqXmH8g3+HxPd/M3XrhWPJSRcxxUst2z1AMH4yJze9aufXJkBKc?= =?iso-8859-7?Q?27PrEkA45/itpwgJOKzGCAhgE5Y6M7Gbb6PT+66XhVdtJxU7EG1wgrsNtO?= =?iso-8859-7?Q?/0iZ1VCiYtI6yo2VSKacVybR/9c4q05XY2KKYRNOjZXqCm4WykBDLv9t7D?= =?iso-8859-7?Q?OXguAmIBy1eKbHF+lHoE+8fhCLo+xtvzgyY2fr9cE5HFZXLi8KhQwLN1cE?= =?iso-8859-7?Q?ia2l2PNd60KUSj27mztAQPfMfXqA3TdZ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+UakSMZ9uJNGmf1wQ8l9/okgAreABvXQnucX0akutJrqFqAo1JkSy3PWl?= =?iso-8859-7?Q?GLfjEqwb5MhhnD0OX0wFFmn08bvx47zoXwck2AFZzqU2fXcNJ5Ok3FDcef?= =?iso-8859-7?Q?FcXxY8O9ZdrcnZwzXu/qThCEGM9xq1ePR5Qozl2TaiDTHXg0c/TYG6BQmB?= =?iso-8859-7?Q?SBcNk5RZL6k8MQ0frtiHIwK8abX2WQEzGZ04KdVFCW4lkYzcFnv26CqMQr?= =?iso-8859-7?Q?I+b+LwbIbiW6kcMZMvXvyXndMZqdsOtNR0v/SxTe5V0/RdCncRcx/zfYsh?= =?iso-8859-7?B?Zz09?= X-Microsoft-Exchange-Diagnostics: 1;CY1PR0701MB1725;5:QVHUtvi0UvtVe6+wuQKJ6OXmsOzgU7AKxkGw2IQqOWhyZGHSxS0XxBW7GxH+gIwA3YnQGZqXmFmUaXySdWFwXSflU/XoS/U5BrGmhFORpXSyz3YMeGX1G2RLjWg5BNr0tZzjREn8X44uGaE4IWSb5Q==;24:jRvTSi6DqGjOwNExsFC34P5y6p+0LvDJJdlkIo+H/DitQrczxQv6xaii+DS7xgcD9omsuj4qMPNofB2oiyUMeHkI6d8K+rAmzHbi3XY7rL4=;20:gCuHqcvrDMHK/q0mnpcNPnj5VOcJepeJ2z0b6uTxkJ9uoO48rnCtn+quK621SgBQaqOkF9b787BlWEND1fI5VA== SpamDiagnosticOutput: 1:23 SpamDiagnosticMetadata: NSPM X-MS-Exchange-CrossTenant-OriginalArrivalTime: 24 Sep 2015 22:12:06.9488 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-Transport-CrossTenantHeadersStamped: CY1PR0701MB1725 X-Microsoft-Exchange-Diagnostics: 1;CY1PR0701MB1210;2:D9t2ZYwCNSCaUeAWipmoWQWxV+ZJbgi0h1RnJMgI8u6WezpfgshhNVEa67dGhFvJtLfKkKPdDimcrdLDmfKs+LiFfJdswOwr9YjYNyfP0yLty9E9peY7/IfUs6TpNMVAPRy5c74ldmPdyjsfFJriTC7z0OYLNmg58EAu7cTjZfs=;23:IPNx3txG9Tl6q8uV+6yA3fYbpIr95c3iYHE9Pjxavd+B/fQuAYAXPuG2NsGJAjdcmXjD7McRJ1nLVDkfI1g1vZ1fLrI9uwXtIGwhaWP587cqJ29X1Lua8ukCB6Rm6WMRIRFyxnVDXUQoIRuJZqSn4jbxxJ9H6WiLXrKFRX7wY77R8MMYzjiaP8W0AriyLN4X X-OriginatorOrg: caviumnetworks.com Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 09/24/2015 03:04 PM, David Daney wrote: > On 09/24/2015 02:52 PM, David Miller wrote: >> From: David Daney >> Date: Tue, 22 Sep 2015 17:41:36 -0700 >> >>> From: David Daney >>> >>> When the Cavium mdio-octeon devices appear in the Thunder family of >>> arm64 based SoCs, they show up as PCI devices. Add PCI driver >>> wrapping so the driver is bound in the standard PCI device scan. >>> >>> When in this form, a single PCI device may have more than a single >>> bus, we call this a "nexus" of buses. The standard firmware >>> device_for_each_child_node() iterator is used to find the individual >>> buses underneath the "nexus". >>> >>> Update the device tree binding documentation for the new PCI driver >>> binding. >>> >>> Signed-off-by: David Daney >> >> This patch breaks the build: > > For which architecture? > > I tested it on mips and arm64. I will try x86, as I guess that is where > you tried your test build. > > >> >> CC [M] drivers/net/phy/mdio-octeon.o >> In file included from drivers/net/phy/mdio-octeon.c:13:0: >> include/linux/module.h:128:27: error: redefinition of ¡__inittest¢ >> static inline initcall_t __inittest(void) \ >> OK, I reproduced this failure. It happens with a module build only. Sorry for the breakage, I will fix it and resubmit. David Daney ^ > [...] > >> >> And frankly I'm not sure I like this change anyways. If the OF nodes >> are there, simply add code to match on those OF nodes. >> >> This is better than assuming what sits underneath a PCI node, without >> any checks for the 'name' or 'compatible' properties at all. That's >> what they are there for afterall. > > There is, somewhat of, a method behind the madness here. > > In order to use MSI-X interrupts, we need a corresponding PCI device. > Now, this driver doesn't currently use interrupts, but other devices in > the SoC do, so they must be PCI devices. > > The idea is to have the type of all drivers uniformly be PCI, rather > than a random mix of PCI and platform, and then switch them back and > forth as PCI features are/are-not used in the driver. > > Also we need to consider ACPI firmware in addition to OF device tree. > > David Daney > From mboxrd@z Thu Jan 1 00:00:00 1970 From: David Daney Subject: Re: [PATCH] net: mdio-octeon: Add PCI driver binding. Date: Thu, 24 Sep 2015 15:12:03 -0700 Message-ID: <56047533.4020906@caviumnetworks.com> References: <1442968896-30776-1-git-send-email-ddaney.cavm@gmail.com> <20150924.145206.897667718297700953.davem@davemloft.net> <56047367.3060101@caviumnetworks.com> Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-7; format=flowed Content-Transfer-Encoding: QUOTED-PRINTABLE Cc: , , , , , , , , , , To: David Miller Return-path: In-Reply-To: <56047367.3060101-M3mlKVOIwJVv6pq1l3V1OdBPR1lH4CV8@public.gmane.org> Sender: devicetree-owner-u79uwXL29TY76Z2rM5mHXA@public.gmane.org List-Id: netdev.vger.kernel.org On 09/24/2015 03:04 PM, David Daney wrote: > On 09/24/2015 02:52 PM, David Miller wrote: >> From: David Daney >> Date: Tue, 22 Sep 2015 17:41:36 -0700 >> >>> From: David Daney >>> >>> When the Cavium mdio-octeon devices appear in the Thunder family of >>> arm64 based SoCs, they show up as PCI devices. Add PCI driver >>> wrapping so the driver is bound in the standard PCI device scan. >>> >>> When in this form, a single PCI device may have more than a single >>> bus, we call this a "nexus" of buses. The standard firmware >>> device_for_each_child_node() iterator is used to find the individua= l >>> buses underneath the "nexus". >>> >>> Update the device tree binding documentation for the new PCI driver >>> binding. >>> >>> Signed-off-by: David Daney >> >> This patch breaks the build: > > For which architecture? > > I tested it on mips and arm64. I will try x86, as I guess that is wh= ere > you tried your test build. > > >> >> CC [M] drivers/net/phy/mdio-octeon.o >> In file included from drivers/net/phy/mdio-octeon.c:13:0: >> include/linux/module.h:128:27: error: redefinition of =A1__inittest=A2 >> static inline initcall_t __inittest(void) \ >> OK, I reproduced this failure. It happens with a module build only. Sorry for the breakage, I will fix it and resubmit. David Daney ^ > [...] > >> >> And frankly I'm not sure I like this change anyways. If the OF node= s >> are there, simply add code to match on those OF nodes. >> >> This is better than assuming what sits underneath a PCI node, withou= t >> any checks for the 'name' or 'compatible' properties at all. That's >> what they are there for afterall. > > There is, somewhat of, a method behind the madness here. > > In order to use MSI-X interrupts, we need a corresponding PCI device. > Now, this driver doesn't currently use interrupts, but other devices = in > the SoC do, so they must be PCI devices. > > The idea is to have the type of all drivers uniformly be PCI, rather > than a random mix of PCI and platform, and then switch them back and > forth as PCI features are/are-not used in the driver. > > Also we need to consider ACPI firmware in addition to OF device tree. > > David Daney > -- To unsubscribe from this list: send the line "unsubscribe devicetree" i= n the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org More majordomo info at http://vger.kernel.org/majordomo-info.html