Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1423846

Re: [PATCH v3 1/2] Documentation: bindings: add dt doc for Rockchip PCIe controller

From Arnd Bergmann <arnd@arndb.de>
Newsgroups linux.kernel
Subject Re: [PATCH v3 1/2] Documentation: bindings: add dt doc for Rockchip PCIe controller
Date 2016-06-16 11:30 +0200
Message-ID <rKBMC-6A6-27@gated-at.bofh.it> (permalink)
References <rKuL7-1Ve-9@gated-at.bofh.it> <rKzrs-4Vy-25@gated-at.bofh.it> <rKAxc-5MU-11@gated-at.bofh.it>
Organization linux.* mail to news gateway

Show all headers | View raw


On Thursday, June 16, 2016 4:01:12 PM CEST Wenrui Li wrote:
> 在 2016/6/16 15:00, Arnd Bergmann 写道:
> > On Thursday, June 16, 2016 9:50:21 AM CEST Shawn Lin wrote:
> >
> >> +    reset-names = "core", "mgmt", "mgmt-sticky", "pipe";
> >> +    phys = <&pcie_phy>;
> >> +    phy-names = "pcie-phy";
> >> +    pinctrl-names = "default";
> >> +    pinctrl-0 = <&pcie_clkreq>;
> >> +    #interrupt-cells = <1>;
> >> +    interrupt-controller;
> >> +    interrupt-map-mask = <0 0 0 7>;
> >> +    interrupt-map = <0 0 0 1 &pcie0 1>,
> >> +                    <0 0 0 2 &pcie0 2>,
> >> +                    <0 0 0 3 &pcie0 3>,
> >> +                    <0 0 0 4 &pcie0 4>;
> >> +};
> >>
> >
> > One thing that came up in the review of the new Marvell PCIe driver is that it's
> > most likely invalid for a device node to have both "interrupt-controller"
> > and "interrupt-map" properties. I originally thought this was a nice way to
> > handle embedded irqchips within the PCIe host, but it only really works
> > by coincidence with the current kernel, and only as long as the hwirq number
> > of the irqchip matches the integer representation of the irq line in the root
> > bridge (which it does in the example above).
> >
> > For that driver we concluded that it would be less of a hack to have the
> > irqchip as a child node of the PCIe host after all (just not with
> > device_type="pci" of course), and that makes the translation work as
> > expected.
> >
> >       Arnd
> >
> 
> Original driver have an irqchip as child node. But Marc suggested don't 
> need an intermediate node here.
> Now the conclusion is to retain the child node?

That is at least my view of the situation, sorry for the mixed messages
you have been getting. Marc, Rob, do you agree with my finding?

If we want to allow having both interrupt-map and interrupt-controller
in the same node, we need to rewrite both the irq parsing function and
have extend the DT binding for the interrupt-map to explain what we
actually expect to happen in that case. At the moment, we walk up the
tree until we find either an interrupt-map or an interrupt-controller
property, and use that to map the interrupt number. If we find an
interrupt-controller, we ignore the interrupt-map.

	Arnd

Back to linux.kernel | Previous | NextPrevious in thread | Next in thread | Find similar | Unroll thread


Thread

[PATCH v3 1/2] Documentation: bindings: add dt doc for Rockchip PCIe controller Shawn Lin <shawn.lin@rock-chips.com> - 2016-06-16 04:00 +0200
  Re: [PATCH v3 1/2] Documentation: bindings: add dt doc for Rockchip PCIe controller Arnd Bergmann <arnd@arndb.de> - 2016-06-16 09:00 +0200
    Re: [PATCH v3 1/2] Documentation: bindings: add dt doc for Rockchip  PCIe controller Wenrui Li <wenrui.li@rock-chips.com> - 2016-06-16 10:10 +0200
      Re: [PATCH v3 1/2] Documentation: bindings: add dt doc for Rockchip PCIe controller Arnd Bergmann <arnd@arndb.de> - 2016-06-16 11:30 +0200
        Re: [PATCH v3 1/2] Documentation: bindings: add dt doc for Rockchip  PCIe controller Thomas Petazzoni <thomas.petazzoni@free-electrons.com> - 2016-06-16 12:00 +0200
        Re: [PATCH v3 1/2] Documentation: bindings: add dt doc for Rockchip  PCIe controller Rob Herring <robh@kernel.org> - 2016-06-19 17:00 +0200

csiph-web