[RFC] AmigaOne device tree source v2
segher at kernel.crashing.org
Thu Sep 6 23:36:30 EST 2007
>> PCI memory space sits on the PCI bus, not on the PCI host bridge,
>> so is not part of "reg" but is part of "ranges" here, since it is
>> direct mapped into the host's address space.
> That's right, but what about this example here (from a Pegasos II):
> /proc/device-tree/pci at 80000000:
> reg 80000000 40000000
> ranges 01000000 00000000 00000000 fe000000 00000000 00010000
> 02000000 00000000 80000000 80000000 00000000 40000000
That's just broken.
> AFAIU the reg property overlaps the ranges property for the PCI memory
> space from 0x80000000 to 0xC0000000 or the CPU address space at the
> same location!?
reg = < something for pci config space >,
< fe000000 10000 >
ranges = < 02000000 0 80000000 80000000 0 40000000 >
>> PCI legacy I/O is not direct mapped: there is no legacy I/O on a
>> PowerPC system bus. So, it can not be mentioned in the "ranges"
>> property, but the PHB registers used to access it should be shown
>> in the "reg" property. It could be a simple linear window (it
>> sounds like it is here?), but it could for example also be implemented
>> via an address/data register pair.
> Yes, it is a simple linear address window. I'll remove its address
> from the reg property.
No, please remove it from the "ranges" property, instead.
>> The order of the "reg" entries depends on the exact model of PCI
>> bridge, so a device binding for it has to be written.
> Only the Pegasos I and the AmigaOne use this PCI bridge. I guess it
> be enough to check for the board type, but a compatible property
Please always use "compatible" to probe any devices.
More information about the Linuxppc-dev