powerpc_flash_init(), wtf!?

Segher Boessenkool segher at kernel.crashing.org
Sun May 6 06:19:51 EST 2007


>> But if the flash really is on an external bus controlled by a bus
>> controller on the SoC, it sounds like it should go under that bus
>> bridge.  In which case the SoC would need another range in its ranges
>> property.
>
>    Erm, how multiple memory ranges are supposed to work? Aren't the 
> addresses in the "reg" property of subnodes relative to the "ranges" 
> property?

If the address space of a child bus is a subset (perhaps
after some mapping) of the address space of the parent bus,
the "ranges" property in the parent node describes that
subset (and mapping).  If the address spaces are identical,
this is expressed by an empty "ranges" property.  If there
is no such mapping (indirect register access, for example),
this is expressed by the absence of a "ranges" property.

There can be multiple ranges in a "ranges" property, that's
why it's called "ranges" and not "range".  A common example
is the "ranges" property in PCI bus nodes (if those have
both a memory and legacy I/O range; for host bridges, this
means that both those ranges are direct mapped).

I hope this answered your question, it was a bit vague.


Segher




More information about the Linuxppc-dev mailing list