[PATCH 4/6] bootwrapper: Add non-OF serial console support

Tom Rini trini at kernel.crashing.org
Thu Aug 3 02:17:12 EST 2006


On Wed, Jul 19, 2006 at 04:12:44PM -0700, Mark A. Greer wrote:

> This patch adds support for serial I/O to the bootwrapper.
> 
> It is broken into 2 layers.  The first layer is generic serial
> operations that calls uart-specific routines to do the actual I/O.
> The second layer contains support for a 16550 compatible uart.
> 
> The division allows support for other serial devices to be easily
> added in the future (e.g., the Marvell MPSC and the Freescale CPM).

Why do we do this with indirection rather than weak defaults and then
real implementations?  The only places I see that are data are:

> +	ns16550_scd.base = NULL;
> +	ns16550_scd.reg_shift = 0;

And I imagine that on platforms where these are real, we dig them out of
the tree and set them, in your scheme, so it'd just be an empty (return
0/NULL) weak function, or the dig in the tree function.  Heck, it could
just always be a 'dig in the tree' function.

-- 
Tom Rini



More information about the Linuxppc-dev mailing list