Commit e1fd1865 authored by Stephen Neuendorffer's avatar Stephen Neuendorffer Committed by Paul Mackerras

[POWERPC] Improved documentation of device tree 'ranges'

This clarifies how 'ranges' properties are used, and in particular,
how to get an identity mapping.
Signed-off-by: default avatarStephen Neuendorffer <stephen.neuendorffer@xilinx.com>
Acked-by: default avatarDavid Gibson <david@gibson.dropbear.id.au>
Acked-by: default avatarGrant Likely <grant.likely@secretlab.ca>
Signed-off-by: default avatarPaul Mackerras <paulus@samba.org>
parent 773f76b1
...@@ -711,13 +711,14 @@ define a bus type with a more complex address format, including things ...@@ -711,13 +711,14 @@ define a bus type with a more complex address format, including things
like address space bits, you'll have to add a bus translator to the like address space bits, you'll have to add a bus translator to the
prom_parse.c file of the recent kernels for your bus type. prom_parse.c file of the recent kernels for your bus type.
The "reg" property only defines addresses and sizes (if #size-cells The "reg" property only defines addresses and sizes (if #size-cells is
is non-0) within a given bus. In order to translate addresses upward non-0) within a given bus. In order to translate addresses upward
(that is into parent bus addresses, and possibly into CPU physical (that is into parent bus addresses, and possibly into CPU physical
addresses), all busses must contain a "ranges" property. If the addresses), all busses must contain a "ranges" property. If the
"ranges" property is missing at a given level, it's assumed that "ranges" property is missing at a given level, it's assumed that
translation isn't possible. The format of the "ranges" property for a translation isn't possible, i.e., the registers are not visible on the
bus is a list of: parent bus. The format of the "ranges" property for a bus is a list
of:
bus address, parent bus address, size bus address, parent bus address, size
...@@ -735,6 +736,10 @@ fit in a single 32-bit word. New 32-bit powerpc boards should use a ...@@ -735,6 +736,10 @@ fit in a single 32-bit word. New 32-bit powerpc boards should use a
1/1 format, unless the processor supports physical addresses greater 1/1 format, unless the processor supports physical addresses greater
than 32-bits, in which case a 2/1 format is recommended. than 32-bits, in which case a 2/1 format is recommended.
Alternatively, the "ranges" property may be empty, indicating that the
registers are visible on the parent bus using an identity mapping
translation. In other words, the parent bus address space is the same
as the child bus address space.
2) Note about "compatible" properties 2) Note about "compatible" properties
------------------------------------- -------------------------------------
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment