Thread (54 messages) 54 messages, 8 authors, 2007-08-24

Re: [PATCH 2/6] PowerPC 440EPx: Sequoia DTS

From: Segher Boessenkool <hidden>
Date: 2007-08-09 19:53:41

quoted
quoted
quoted
I haven't heard or thought of anything better either.  Using 
"ranges"
is conceptually wrong, even ignoring the technical problems that 
come
with it.
Why is "ranges" conceptually wrong?
The flash partitions aren't separate devices sitting on a
"flash bus", they are "sub-devices" of their parent.
Well, yes, but nonetheless the partitions show up as part of the
overall physical address space.  How do you encode that other than in
'ranges'?
All that address space shows up in the flash node already.  To
access the partitions you have to go via that "master" node
anyway (some commands have to be sent to address 0 on the flash,
or similar).

It is a very nice feature to not only be able to translate addresses
"up" the device tree, but also "down".

Also, it mimics reality, just like a good OF citizen should:
those partitions aren't actually devices at all, so they
certainly shouldn't be assigned a part of the host address
space.
quoted
quoted
To be honest this looks rather to me like another case where having
overlapping 'reg' and 'ranges' would actually make sense.
It never makes sense.  You should give the "master" device
the full "reg" range it covers, and have it define its own
address space; "sub-devices" can carve out their little hunk
from that.  You don't want more than one device owning the
same address range in the same address space.
Why not?  After all, the physical address ranges of the flash
partitions really do overlap with that of the flash device as a whole.
They don't overlap, a partition is a proper subset of the flash.
Which as usual is shown as "reg" in the child node and #a,#s in
the parent node.


Segher
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help