From: David Daney <ddaney@caviumnetworks.com>
To: David Miller <davem@davemloft.net>
Cc: <ddaney.cavm@gmail.com>, <linux-kernel@vger.kernel.org>,
<robh+dt@kernel.org>, <pawel.moll@arm.com>,
<mark.rutland@arm.com>, <ijc+devicetree@hellion.org.uk>,
<galak@codeaurora.org>, <devicetree@vger.kernel.org>,
<f.fainelli@gmail.com>, <netdev@vger.kernel.org>,
<david.daney@cavium.com>
Subject: Re: [PATCH] net: mdio-octeon: Add PCI driver binding.
Date: Thu, 24 Sep 2015 15:12:03 -0700 [thread overview]
Message-ID: <56047533.4020906@caviumnetworks.com> (raw)
In-Reply-To: <56047367.3060101@caviumnetworks.com>
On 09/24/2015 03:04 PM, David Daney wrote:
> On 09/24/2015 02:52 PM, David Miller wrote:
>> From: David Daney <ddaney.cavm@gmail.com>
>> Date: Tue, 22 Sep 2015 17:41:36 -0700
>>
>>> From: David Daney <david.daney@cavium.com>
>>>
>>> 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 <david.daney@cavium.com>
>>
>> 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
>
next prev parent reply other threads:[~2015-09-24 22:12 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-09-23 0:41 David Daney
2015-09-24 21:52 ` David Miller
2015-09-24 22:04 ` David Daney
2015-09-24 22:12 ` David Daney [this message]
2015-09-24 22:16 ` David Miller
2015-09-24 22:14 ` David Miller
2015-09-24 22:45 ` David Daney
2015-09-24 22:50 ` David Miller
2015-09-24 22:54 ` David Daney
2015-09-24 23:07 ` David Miller
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=56047533.4020906@caviumnetworks.com \
--to=ddaney@caviumnetworks.com \
--cc=davem@davemloft.net \
--cc=david.daney@cavium.com \
--cc=ddaney.cavm@gmail.com \
--cc=devicetree@vger.kernel.org \
--cc=f.fainelli@gmail.com \
--cc=galak@codeaurora.org \
--cc=ijc+devicetree@hellion.org.uk \
--cc=linux-kernel@vger.kernel.org \
--cc=mark.rutland@arm.com \
--cc=netdev@vger.kernel.org \
--cc=pawel.moll@arm.com \
--cc=robh+dt@kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®