Re: PCI device support in Open Firmware (device tree syntax)
> You are right. u-boot do PCI device BAR resources assign and flat > device tree describe PCI device interrupt-map. I use "lspci -s xxx -x" > for the PCI device, the resources was assigned properly. Note that the device-tree -can- contain PCI devices, but it's not mandatory. If your bootloader does the probing and configuration of the PCI bus, it might be a good idea for that bootloader to also create the PCI device nodes in the tree, since this will allow in a near future the kernel to "instanciate" them from that tree instead of probing with config space, which is faster and more reliably. (Currently only ppc64 does that but it will become generic soon). Cheers, Ben. -- To unsubscribe from this list: send the line "unsubscribe linux-embedded" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
Re: PCI device support in Open Firmware (device tree syntax)
On Tue, Jun 30, 2009 at 09:36:51AM +0800, Johnny Hung wrote: > Thanks for your reply. So there are no PCI device resource info in > flat device tree. Usually not -- but occasionally there's something special to be described. > How do PCI device resources be assign in general case or is there any example? The kernel does the assignment. > I am so confusing, would you please give me detailed describle? Without narrowing down your question, the best I can do is tell you to look at the existing code and device trees. :-( -Scott -- To unsubscribe from this list: send the line "unsubscribe linux-embedded" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
Re: PCI device support in Open Firmware (device tree syntax)
2009/6/30 Marco Stornelli : > 2009/6/30 Johnny Hung : >> Thanks for your reply. So there are no PCI device resource info in >> flat device tree. >> How do PCI device resources be assign in general case or is there any >> example? >> I am so confusing, would you please give me detailed describle? >> >> BRs, H. Johnny >>> > > You should look at your bootloader about the initial configuration of > the pci device, in general it should (more or less) do the work of > BIOS as you said. After that the kernel can probe them. > > Marco > You are right. u-boot do PCI device BAR resources assign and flat device tree describe PCI device interrupt-map. I use "lspci -s xxx -x" for the PCI device, the resources was assigned properly. Thanks. BRs, H. Johnny -- To unsubscribe from this list: send the line "unsubscribe linux-embedded" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
Re: PCI device support in Open Firmware (device tree syntax)
Thanks for your reply. So there are no PCI device resource info in flat device tree. How do PCI device resources be assign in general case or is there any example? I am so confusing, would you please give me detailed describle? BRs, H. Johnny > > With flat device trees, PCI devices are not typically included as they > can be probed instead. Interrupt mapping is conveyed by the > interrupt-map property in the PCI controller node. > > -Scott > -- To unsubscribe from this list: send the line "unsubscribe linux-embedded" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
Re: PCI device support in Open Firmware (device tree syntax)
On Mon, Jun 29, 2009 at 11:58:22PM +0800, Johnny Hung wrote: > Hi all, > I am working in customized Freescale MPC8313 board. There are two > PCI devices (Broadcom Switch) in PCI bus. > Each PCI device has its configuration space. It contains > vendor/product ID (RO)..., and important information, likes BARs > (Base Address), INT line and IRQ(RW). These resources (BAR, INT, IRQ) > is assigned from BIOS in x86 arch. > My problem is how to assign PCI device resources in device tree. I > can't find exist dts file as an example. I have read the > http://www.power.org/resources/downloads/Power_ePAPR_APPROVED_v1.0.pdf > file. It's described detailed about device tree > except PCI device. So, anyone give me a hint or sany tuff is appreciated. >I think Linux Kernel parses device tree and get the PCI device > resources information then write into PCI configuration space. > So PCI device driver do pci_register_driver (get resource) and do > itself probe for PCI device. Is it right? CMIIAW With flat device trees, PCI devices are not typically included as they can be probed instead. Interrupt mapping is conveyed by the interrupt-map property in the PCI controller node. -Scott -- To unsubscribe from this list: send the line "unsubscribe linux-embedded" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html