Commit 27b17ae0 authored by Nava kishore Manne's avatar Nava kishore Manne Committed by Greg Kroah-Hartman

tty: serial: xuartps: Wait for rx and tx reset done status

After issuing the reset, driver is not checking the rx and tx reset
done status. So, modified driver to wait for the reset done status.
Signed-off-by: default avatarNava kishore Manne <navam@xilinx.com>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent 3816b2f8
...@@ -694,6 +694,10 @@ static void cdns_uart_set_termios(struct uart_port *port, ...@@ -694,6 +694,10 @@ static void cdns_uart_set_termios(struct uart_port *port,
ctrl_reg |= CDNS_UART_CR_TXRST | CDNS_UART_CR_RXRST; ctrl_reg |= CDNS_UART_CR_TXRST | CDNS_UART_CR_RXRST;
writel(ctrl_reg, port->membase + CDNS_UART_CR); writel(ctrl_reg, port->membase + CDNS_UART_CR);
while (readl(port->membase + CDNS_UART_CR) &
(CDNS_UART_CR_TXRST | CDNS_UART_CR_RXRST))
cpu_relax();
/* /*
* Clear the RX disable and TX disable bits and then set the TX enable * Clear the RX disable and TX disable bits and then set the TX enable
* bit and RX enable bit to enable the transmitter and receiver. * bit and RX enable bit to enable the transmitter and receiver.
...@@ -797,6 +801,10 @@ static int cdns_uart_startup(struct uart_port *port) ...@@ -797,6 +801,10 @@ static int cdns_uart_startup(struct uart_port *port)
writel(CDNS_UART_CR_TXRST | CDNS_UART_CR_RXRST, writel(CDNS_UART_CR_TXRST | CDNS_UART_CR_RXRST,
port->membase + CDNS_UART_CR); port->membase + CDNS_UART_CR);
while (readl(port->membase + CDNS_UART_CR) &
(CDNS_UART_CR_TXRST | CDNS_UART_CR_RXRST))
cpu_relax();
/* /*
* Clear the RX disable bit and then set the RX enable bit to enable * Clear the RX disable bit and then set the RX enable bit to enable
* the receiver. * the receiver.
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment