uartps: SW reset of RX and TX when changing baud rate

Perform SW reset of RX and TX before re-enabling, when changing baud rate.

Signed-off-by: Harini Katakam <harinik@xilinx.com>
Acked-by: Anirudha Sarangi <anirudh@xilinx.com>
This commit is contained in:
Harini Katakam 2014-06-23 15:00:27 +05:30 committed by Jagannadha Sutradharudu Teki
parent d88caf4050
commit 6384181d64
2 changed files with 10 additions and 0 deletions

View file

@ -43,6 +43,8 @@
* Ver Who Date Changes
* ----- ------ -------- ----------------------------------------------
* 1.00 drg/jz 01/13/10 First Release
* 2.2 hk 06/23/14 SW reset of RX and TX should be done when changing
* baud rate. CR# 804281.
* </pre>
*
*****************************************************************************/
@ -624,6 +626,12 @@ int XUartPs_SetBaudRate(XUartPs *InstancePtr, u32 BaudRate)
XUartPs_WriteReg(InstancePtr->Config.BaseAddress,
XUARTPS_BAUDDIV_OFFSET, Best_BAUDDIV);
/*
* RX and TX SW reset
*/
XUartPs_WriteReg(InstancePtr->Config.BaseAddress, XUARTPS_CR_OFFSET,
XUARTPS_CR_TXRST | XUARTPS_CR_RXRST);
/*
* Enable device
*/

View file

@ -150,6 +150,8 @@
* constant definitions.
* 2.0 hk 03/07/14 Version number revised.
* 2.1 hk 04/16/14 Change XUARTPS_MAX_RATE to 921600. CR# 780625.
* 2.2 hk 06/23/14 SW reset of RX and TX should be done when changing
* baud rate. CR# 804281.
*
* </pre>
*