Re: Question about how PCI subsystem uses device trees

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 




[+cc devicetree list; I'm devicetree-illiterate]

On Tue, Dec 10, 2013 at 12:53 PM, Rajat Jain <rajatjain@xxxxxxxxxxx> wrote:
> Hello,
>
> I am trying to understand and create device tree for a new powerpc platform. (Please feel free to point out any problems with my device tree below.) My questions:
>
> 1) For a PCI-PCI bridge that I'm representing like this:
>
> pcie@2,3 {
>         vendor-id = <0x10b5>;
>       device-id = <0x8618>;
>       class-code = <0x060400>;
>       #size-cells = <2>;
>       #address-cells = <3>;
>       device_type = "pci";
>       bus-range = <0x20 0x2f>;
>       reg = <0x00021800 0x00000000 0x000000000        /* Cfg:2.3.0: */
>              0x00000000 0x00000000>;
>       ranges = <0x02000000 0x00000000 0xA0000000      /* Mem behind bridge: 0xA0000000 - 0xA03FFFFF */
>                 0x02000000 0x00000000 0xA0000000
>                 0x00000000 0x04000000>;
> };
>
> Is the above is only to _notify_ the kernel that this is how the firmware shall be setting the PCI bridge (Thus firmware has obligation of setting it like this before passing control to the kernel), and hence the kernel will merely take note of it and not really configure the bridge registers?
>
> Or is the above telling the kernel that this is how the kernel should _setup_ the device (thus firmware does not set up the device, but rather the kernel use this info to setup the device)?
>
> 2) For an PCI endpoint that I am representing like this:
>
>
> xyz@20,0 {
>         vendor-id = ...
>       device-id = ...
>       class-code = <0x0880>;
>       compatible = ...
>         ...
>       reg = <0x00200000 0x00000000 0x00000000 /* Cfg:20.0.0: */
>              0x00000000 0x00000000
>              0x02200010 0x00000000 0xA0000000 /* Mem:20.0.0:(Bar0) 64MB@0xA0000000 */
>              0x00000000 0x04000000>;
>         ...
> };
>
> Does the above tell the kernel to _program_ the BAR0 register using the above address? Or does it cause the kernel to assume that the BAR0 has been programmed with this address?
>
> 3) Lastly, what is the difference in behavior when I select PCI_PROBE_NORMAL over PCI_PROBE_DEVTREE?
>
> Thanks,
>
> Rajat
>
> --
> To unsubscribe from this list: send the line "unsubscribe linux-pci" in
> the body of a message to majordomo@xxxxxxxxxxxxxxx
> More majordomo info at  http://vger.kernel.org/majordomo-info.html
--
To unsubscribe from this list: send the line "unsubscribe devicetree" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html




[Index of Archives]     [Device Tree Compilter]     [Device Tree Spec]     [Linux Driver Backports]     [Video for Linux]     [Linux USB Devel]     [Linux PCI Devel]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [XFree86]     [Yosemite Backpacking]
  Powered by Linux