Subject: Re: Device Tree & PCI

From: Benjamin Herrenschmidt <[email-masked]>
Date: Sat, 12 Jan 2008 19:27:39 +1100

>         pci_bridge@12 {
>     		interrupt-map-mask = <0f800 0 0 7>;
>     		interrupt-map = <
>     		                /* IDSEL 0x10 */
>     		                00008000 0 0 1 &PCI_INT 1
> 
>     		                /* IDSEL 0x11 */
>     		                00008800 0 0 1 &PCI_INT 2
>     		                
>     		                /* IDSEL 0x12 */
>     		                00009000 0 0 1 &PCI_INT 3
>     		                
>     		                /* IDSEL 0x13 */
>     		                00009800 0 0 1 &PCI_INT 4>;
>         };

Your PCI bridge node needs more than those 2 properties. At the very
least it needs device_type "pci" and name "pci" (rather than pci-bridge)
to make the kernel parser happier, it also needs a proper class code and
a "reg" property providing its configuration address (devfn) so that the
kernel can do the matching between what it finds on the PCI bus and that
node.

Basically, you need to make sure the function pci_device_to_OF_node()
works for your bridge or the interrupt resolution will not work. I'd
suggest you add debugging to that function to dump what it's doing so
you can get your tree in order.

Cheers,
Ben.