On Mon, Mar 25, 2013 at 09:38:47AM +0100, Thomas Petazzoni wrote:
> Dear Thierry Reding,
> 
> Thanks for your feedback!
> 
> On Mon, 25 Mar 2013 08:58:10 +0100, Thierry Reding wrote:
> 
> > That sounds very much like one of the use-cases that were discussed. The
> > easiest solution would probably be to add an API to look up an MSI chip
> > from a DT phandle, so that the PCIe controller's device node could have
> > it as a property, somewhat like this:
> > 
> >     msi: interrupt-controller {
> >     };
> > 
> >     pcie-controller {
> >             ...
> >             marvell,msi = <&msi>;
> >             ...
> >     };
> 
> I'm not sure how to handle this msi interrupt controller with the main
> interrupt controller. For now, I have:
> 
>         mpic: interrupt-controller@d0020000 {
>               reg = <0xd0020a00 0x2d0>,
>                     <0xd0021070 0x58>;
>         };
> 
>       [...]
> 
>       soc {
>                 interrupt-parent = <&mpic>;
>               [...]
>       };
> 
> And the MSI interrupt controller shares the same registers as the MPIC.
> So should it be something like:
> 
>       interrupt-controller {
>               reg = <0xd0020a00 0x2d0>,
>                     <0xd0021070 0x58>;
> 
>               mpic {
>                       /* Not sure what to have here */
>               };
> 
>               msi {
> 
>                       /* Here either */
>               };
>       };
> 
>       soc {
>                 interrupt-parent = <&mpic>;
> 
>               pcie-controller {
>                       marvell,msi = <&msi>;
>               };
>       };
> 
> Or some other idea?

I think you can just make this:

        mpic: interrupt-controller@d0020000 {
                ...
        };

        ...

        soc {
                pcie-controller {
                        marvell,msi = <&mpic>;
                };
        };

And everything else should just work given the APIs I mentioned. But as
you said it'd be good if somebody else could share their opinion about
this.

Thierry

Attachment: pgp9nkpr9m8BV.pgp
Description: PGP signature

Reply via email to