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

From: Segher Boessenkool <[email-masked]>
Date: Wed, 21 Mar 2007 14:49:30 +0100

>> 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