Thread (5 messages) 5 messages, 2 authors, 2005-08-24

Re: [PATCH] Allow ns16550.c to get base baud from rs_table instead of BAUD_BASE

From: Tom Rini <hidden>
Date: 2005-08-24 18:35:22

On Tue, Aug 23, 2005 at 04:47:02PM -0600, Grant Likely wrote:
[PATCH] Allow ns16550.c to get base baud from rs_table instead of BAUD_BASE

REPOST: fixed formating problems in original patch

Modifies serial_init to get base baud rate from the rs_table entry instead
of BAUD_BASE.  Will default back to BAUD_BASE if base_baud is not set.

This patch eliminates duplication between the SERIAL_PORT_DFNS macro and
BAUD_BASE.  Without the patch, if a port set the baud rate in
SERIAL_PORT_DFNS, but did not update BASE_BAUD, the BASE_BAUD value
would still be used.

Rather; serial_init() should look first in SERIAL_PORT_DFNS and use
BASE_BAUD as a backup.

Signed-off-by: Grant Likely <redacted>
With everything in-tree, this is fine as baud_base is always set to
BASE_BAUD, but I'm wondering why this was done.  Did you do a port and
not follow on this?  It looks like today you could get away without
defining BASE_BAUD correctly (8250_early uses and needs this to be
correct, but I don't think this is frequently used, yet).  But I'm not
sure what we gain here.  Thanks.

-- 
Tom Rini
http://gate.crashing.org/~trini/
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help