Skip to content

Commit

Permalink
Revert "crypto: montage: tsse_vuart: drop unused vuart_wait_for_xmitr()"
Browse files Browse the repository at this point in the history
This reverts commit 355d339.

Signed-off-by: Mingcong Bai <[email protected]>
  • Loading branch information
MingcongBai authored and opsiff committed Nov 14, 2024
1 parent 355d339 commit ce54e35
Showing 1 changed file with 18 additions and 0 deletions.
18 changes: 18 additions & 0 deletions drivers/crypto/montage/tsse/tsse_vuart.c
Original file line number Diff line number Diff line change
Expand Up @@ -74,6 +74,24 @@ static void vuart_serial_out(struct uart_port *port, int offset, int value)
writel(value, port->membase + offset);
}

static void vuart_wait_for_xmitr(struct uart_port *port)
{
unsigned int status, tmout = 10000;

for (;;) {
status = vuart_serial_in(port, VUART_FSR);
if (FIELD_GET(VUART_FSR_TXFIFOE, status))
break;
if (--tmout == 0) {
pr_err("%s:timeout(10ms), TX is not empty.\n",
__func__);
break;
}
udelay(1);
touch_nmi_watchdog();
}
}

static unsigned int vuart_tx_empty(struct uart_port *port)
{
unsigned long flags;
Expand Down

0 comments on commit ce54e35

Please sign in to comment.