Skip to content
Commit 300dee8a authored by Sebastien Griffoul's avatar Sebastien Griffoul Committed by Inaky Perez-Gonzalez
Browse files

serial: fix ns16550 set_baud_rate()



In order to change the baudrate the DLAB bit of the LCR register has to
be set to 1 (This bit is used to enable reading and writing of the 
divisor latch register). This bit must be cleared after the baudrate
setup in order to access other registers.

The set_baud_rate function correctly sets the DLAB bit of the LCR reg but
never clears it. Therefore the ns16550 doesn't properly work any more
after updating the initial baud rate.

In order to fix this issue the LCR reg has to be temporary saved
(because it contains other important settings). After switching to a new
baud rate the LCR reg value has to be restored. 

Change-Id: Ied4db683cbf40ba3125e747552968ddf1a66e2be
Signed-off-by: default avatarJeremie GARCIA <jeremie.garcia@intel.com>
Signed-off-by: default avatarSebastien GRIFFOUL <sebastien.griffoul@intel.com>
parent 36c19491
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment