[PATCH 03/17] bootwrapper: Add xlate_reg(), and use it to find serial registers.

Segher Boessenkool segher at kernel.crashing.org
Thu Mar 22 00:49:30 EST 2007


>> xlate_reg() uses the ranges properties of a node's parentage to find 
>> the
>> absolute physical address of the node's registers.
>>
>> The ns16550 driver uses this when no virtual-reg property is found.
>
> This is a pretty large chunk of code for use on just some platforms.
> Remind me why we can't just insist on the presence of virtual-reg?

Because "virtual-reg" is evil and should preferably never
be used?  On the other hand, address translation for directly
memory mapped devices via "ranges" properties is a darn
solid, quite flexible, and proven mechanism.

I didn't look at the actual code but it should be really
small; I hope it doesn't copy the Linux code with its
millions of workarounds for broken device trees -- we
should insist on correct trees, or even just fix them
if they *are* broken ;-)


Segher




More information about the Linuxppc-dev mailing list