serial/uart_ns16550: keep LCR settings when programming DLAB
The LCR register specifies the format of the asynchronous data communication exchange. Keep the data/stop bit and parity settings intact during baud rate change. Signed-off-by: Timo Teräs <timo.teras@iki.fi>
This commit is contained in:
parent
5d9a6aa9df
commit
047a229985
1 changed files with 1 additions and 1 deletions
|
@ -254,7 +254,7 @@ static void set_baud_rate(struct device *dev, u32_t baud_rate)
|
|||
|
||||
/* set the DLAB to access the baud rate divisor registers */
|
||||
lcr_cache = INBYTE(LCR(dev));
|
||||
OUTBYTE(LCR(dev), LCR_DLAB);
|
||||
OUTBYTE(LCR(dev), LCR_DLAB | lcr_cache);
|
||||
OUTBYTE(BRDL(dev), (unsigned char)(divisor & 0xff));
|
||||
OUTBYTE(BRDH(dev), (unsigned char)((divisor >> 8) & 0xff));
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue