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:Jeremie GARCIA <jeremie.garcia@intel.com> Signed-off-by:
Sebastien GRIFFOUL <sebastien.griffoul@intel.com>
Loading
Please sign in to comment