From: Sergei Shtylyov <sergei.shtylyov@cogentembedded.com>
To: linux-arm-kernel@lists.infradead.org
Subject: Re: [PATCH v4 1/2] ARM: shmobile: r8a7790: add internal PCI bridge nodes
Date: Fri, 20 Jun 2014 21:25:26 +0000 [thread overview]
Message-ID: <53A4A6C6.9000703@cogentembedded.com> (raw)
In-Reply-To: <4490558.0d3xbrzEgW@wuerfel>
On 06/21/2014 01:10 AM, Arnd Bergmann wrote:
>>>> + pci0: pci@ee090000 {
>>>> + compatible = "renesas,pci-r8a7790";
>>>> + clocks = <&mstp7_clks R8A7790_CLK_EHCI>;
>>>> + reg = <0x0 0xee090000 0x0 0xc00>,
>>>> + <0x0 0xee080000 0x0 0x1100>;
>>>> + interrupts = <0 108 IRQ_TYPE_LEVEL_HIGH>;
>>>> + status = "disabled";
>>>> +
>>>> + bus-range = <0 0>;
>>>> + #address-cells = >;
>>>> + #size-cells = <2>;
>>>> + #interrupt-cells = <1>;
>>>> + interrupt-map-mask = <0xff00 0 0 0x7>;
>>>> + interrupt-map = <0x0000 0 0 1 &gic 0 108 IRQ_TYPE_LEVEL_HIGH
>>>> + 0x0800 0 0 1 &gic 0 108 IRQ_TYPE_LEVEL_HIGH
>>>> + 0x1000 0 0 2 &gic 0 108 IRQ_TYPE_LEVEL_HIGH>;
>>>> + };
>>> Hmm, this device node is not actually compliant to the PCI binding,
>>> it needs a "ranges" property that can be used to look up the memory
>>> and I/O space windows.
>> The PCI driver doesn't support I/O space.
> Well, whichever windows are registered by the driver should come
> from the ranges property.
I know. Too bad the driver's original author managed to misunderstand that...
>>> It also needs a device_type property.
>> Hm, are you sure about that? I thought only PCI devices should have it...
> Yes, pretty sure it's needed in both the host controller and the
> devices.
I don't understand the case of the PCI devices, honestly. Shouldn't the
"device_type" prop reflect the device's functionality rather than the bus
where it's located?
>>> I realize that the driver doesn't currently use them, but you should
>>> adhere to the binding anyway, so we can fix the driver at some point.
>> Sigh, agreed about the need to fix the driver. Too bad you've spoken up
>> only now though. And you've ACKed the DT bindings without those properties
>> documented or even present in an example...
> Yes, I realized that too late as well, sorry about it. For some reason
> I only looked at the interrupt-map being done right and forgot to
> check the ranges.
> We definitely need to move the code handling the ranges into a common
> location to avoid this mistake in the future.
It is already in the common location, AFAIK; what's lacking there is the
code that parses "dma-ranges" as well but that should be pretty easy to add...
> Arnd
WBR, Sergei
WARNING: multiple messages have this Message-ID (diff)
From: sergei.shtylyov@cogentembedded.com (Sergei Shtylyov)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH v4 1/2] ARM: shmobile: r8a7790: add internal PCI bridge nodes
Date: Sat, 21 Jun 2014 01:25:26 +0400 [thread overview]
Message-ID: <53A4A6C6.9000703@cogentembedded.com> (raw)
In-Reply-To: <4490558.0d3xbrzEgW@wuerfel>
On 06/21/2014 01:10 AM, Arnd Bergmann wrote:
>>>> + pci0: pci at ee090000 {
>>>> + compatible = "renesas,pci-r8a7790";
>>>> + clocks = <&mstp7_clks R8A7790_CLK_EHCI>;
>>>> + reg = <0x0 0xee090000 0x0 0xc00>,
>>>> + <0x0 0xee080000 0x0 0x1100>;
>>>> + interrupts = <0 108 IRQ_TYPE_LEVEL_HIGH>;
>>>> + status = "disabled";
>>>> +
>>>> + bus-range = <0 0>;
>>>> + #address-cells = >;
>>>> + #size-cells = <2>;
>>>> + #interrupt-cells = <1>;
>>>> + interrupt-map-mask = <0xff00 0 0 0x7>;
>>>> + interrupt-map = <0x0000 0 0 1 &gic 0 108 IRQ_TYPE_LEVEL_HIGH
>>>> + 0x0800 0 0 1 &gic 0 108 IRQ_TYPE_LEVEL_HIGH
>>>> + 0x1000 0 0 2 &gic 0 108 IRQ_TYPE_LEVEL_HIGH>;
>>>> + };
>>> Hmm, this device node is not actually compliant to the PCI binding,
>>> it needs a "ranges" property that can be used to look up the memory
>>> and I/O space windows.
>> The PCI driver doesn't support I/O space.
> Well, whichever windows are registered by the driver should come
> from the ranges property.
I know. Too bad the driver's original author managed to misunderstand that...
>>> It also needs a device_type property.
>> Hm, are you sure about that? I thought only PCI devices should have it...
> Yes, pretty sure it's needed in both the host controller and the
> devices.
I don't understand the case of the PCI devices, honestly. Shouldn't the
"device_type" prop reflect the device's functionality rather than the bus
where it's located?
>>> I realize that the driver doesn't currently use them, but you should
>>> adhere to the binding anyway, so we can fix the driver at some point.
>> Sigh, agreed about the need to fix the driver. Too bad you've spoken up
>> only now though. And you've ACKed the DT bindings without those properties
>> documented or even present in an example...
> Yes, I realized that too late as well, sorry about it. For some reason
> I only looked at the interrupt-map being done right and forgot to
> check the ranges.
> We definitely need to move the code handling the ranges into a common
> location to avoid this mistake in the future.
It is already in the common location, AFAIK; what's lacking there is the
code that parses "dma-ranges" as well but that should be pretty easy to add...
> Arnd
WBR, Sergei
WARNING: multiple messages have this Message-ID (diff)
From: Sergei Shtylyov <sergei.shtylyov@cogentembedded.com>
To: Arnd Bergmann <arnd@arndb.de>
Cc: horms@verge.net.au, linux-sh@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, magnus.damm@gmail.com,
linux@arm.linux.org.uk, linux-arm-kernel@lists.infradead.org,
ben.dooks@codethink.co.uk
Subject: Re: [PATCH v4 1/2] ARM: shmobile: r8a7790: add internal PCI bridge nodes
Date: Sat, 21 Jun 2014 01:25:26 +0400 [thread overview]
Message-ID: <53A4A6C6.9000703@cogentembedded.com> (raw)
In-Reply-To: <4490558.0d3xbrzEgW@wuerfel>
On 06/21/2014 01:10 AM, Arnd Bergmann wrote:
>>>> + pci0: pci@ee090000 {
>>>> + compatible = "renesas,pci-r8a7790";
>>>> + clocks = <&mstp7_clks R8A7790_CLK_EHCI>;
>>>> + reg = <0x0 0xee090000 0x0 0xc00>,
>>>> + <0x0 0xee080000 0x0 0x1100>;
>>>> + interrupts = <0 108 IRQ_TYPE_LEVEL_HIGH>;
>>>> + status = "disabled";
>>>> +
>>>> + bus-range = <0 0>;
>>>> + #address-cells = >;
>>>> + #size-cells = <2>;
>>>> + #interrupt-cells = <1>;
>>>> + interrupt-map-mask = <0xff00 0 0 0x7>;
>>>> + interrupt-map = <0x0000 0 0 1 &gic 0 108 IRQ_TYPE_LEVEL_HIGH
>>>> + 0x0800 0 0 1 &gic 0 108 IRQ_TYPE_LEVEL_HIGH
>>>> + 0x1000 0 0 2 &gic 0 108 IRQ_TYPE_LEVEL_HIGH>;
>>>> + };
>>> Hmm, this device node is not actually compliant to the PCI binding,
>>> it needs a "ranges" property that can be used to look up the memory
>>> and I/O space windows.
>> The PCI driver doesn't support I/O space.
> Well, whichever windows are registered by the driver should come
> from the ranges property.
I know. Too bad the driver's original author managed to misunderstand that...
>>> It also needs a device_type property.
>> Hm, are you sure about that? I thought only PCI devices should have it...
> Yes, pretty sure it's needed in both the host controller and the
> devices.
I don't understand the case of the PCI devices, honestly. Shouldn't the
"device_type" prop reflect the device's functionality rather than the bus
where it's located?
>>> I realize that the driver doesn't currently use them, but you should
>>> adhere to the binding anyway, so we can fix the driver at some point.
>> Sigh, agreed about the need to fix the driver. Too bad you've spoken up
>> only now though. And you've ACKed the DT bindings without those properties
>> documented or even present in an example...
> Yes, I realized that too late as well, sorry about it. For some reason
> I only looked at the interrupt-map being done right and forgot to
> check the ranges.
> We definitely need to move the code handling the ranges into a common
> location to avoid this mistake in the future.
It is already in the common location, AFAIK; what's lacking there is the
code that parses "dma-ranges" as well but that should be pretty easy to add...
> Arnd
WBR, Sergei
next prev parent reply other threads:[~2014-06-20 21:25 UTC|newest]
Thread overview: 30+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-06-20 20:34 [PATCH v4 0/2] Add R8A7790/Lager board PCI USB DT support Sergei Shtylyov
2014-06-20 20:34 ` Sergei Shtylyov
2014-06-20 20:34 ` Sergei Shtylyov
2014-06-20 20:36 ` [PATCH v4 1/2] ARM: shmobile: r8a7790: add internal PCI bridge nodes Sergei Shtylyov
2014-06-20 20:36 ` Sergei Shtylyov
2014-06-20 20:36 ` Sergei Shtylyov
2014-06-20 20:51 ` Arnd Bergmann
2014-06-20 20:51 ` Arnd Bergmann
2014-06-20 20:51 ` Arnd Bergmann
2014-06-20 21:00 ` Sergei Shtylyov
2014-06-20 21:00 ` Sergei Shtylyov
2014-06-20 21:00 ` Sergei Shtylyov
2014-06-20 21:10 ` Arnd Bergmann
2014-06-20 21:10 ` Arnd Bergmann
2014-06-20 21:10 ` Arnd Bergmann
2014-06-20 21:25 ` Sergei Shtylyov [this message]
2014-06-20 21:25 ` Sergei Shtylyov
2014-06-20 21:25 ` Sergei Shtylyov
2014-06-21 9:15 ` Arnd Bergmann
2014-06-21 9:15 ` Arnd Bergmann
2014-06-21 9:15 ` Arnd Bergmann
2014-06-23 20:40 ` Jason Gunthorpe
2014-06-23 20:40 ` Jason Gunthorpe
2014-06-23 20:40 ` Jason Gunthorpe
2014-06-20 21:16 ` Sergei Shtylyov
2014-06-20 21:16 ` Sergei Shtylyov
2014-06-20 21:16 ` Sergei Shtylyov
2014-06-20 20:38 ` [PATCH v4 2/2] ARM: shmobile: lager: enable internal PCI Sergei Shtylyov
2014-06-20 20:38 ` Sergei Shtylyov
2014-06-20 20:38 ` Sergei Shtylyov
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=53A4A6C6.9000703@cogentembedded.com \
--to=sergei.shtylyov@cogentembedded.com \
--cc=linux-arm-kernel@lists.infradead.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.