[U-Boot] [PATCH] include/ns16550.h: Unify structure declaration for registers

Scott Wood scottwood at freescale.com
Mon May 4 23:21:19 CEST 2009


On Mon, May 04, 2009 at 05:40:37PM +0200, Detlev Zundel wrote:
> >> static unsigned int serial_in(struct uart_8250_port *up, int offset)
> > [snip]
> >> }
> >>
> >> to be "simpler and more solid" readb(struct->field) (which is
> >> effectively what we have in the current implementation)?  You consider
> >> "more configurable" to be a good in its own?

That's not "configuration", that's "separation of concerns".  Why
hardcode the bus mapping in code that only cares about the higher level
register interface?

> > Yes.
> 
> Wow.  As a rhetorical question - where do you actually draw the line if
> you consider configurable to be a good in its own?  Shouldn't we then
> have configuration options for UARTs who are attached bit-reversed on
> the databus also?  And an option for a bit-shift in the data itself?

If there's such hardware out there that needs to be supported, yes. :-)

-Scott


More information about the U-Boot mailing list