summaryrefslogtreecommitdiff
path: root/drivers/tty/serial/lpc32xx_hs.c
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@linux-foundation.org>2022-03-28 13:00:51 -0700
committerLinus Torvalds <torvalds@linux-foundation.org>2022-03-28 13:00:51 -0700
commit7203062171db6669f746d14148c4af76af619e74 (patch)
tree5640e34ebe000769828632d3d6b9b95170283aab /drivers/tty/serial/lpc32xx_hs.c
parentdfdc1de64248b5e1024d8188aeaf0e59ec6cecd5 (diff)
parentb31c41339f4f8a833cb9dc509f87aab6a159ffe4 (diff)
downloadlinux-7203062171db6669f746d14148c4af76af619e74.tar.gz
Merge tag 'tty-5.18-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/tty
Pull tty/serial driver updates from Greg KH: "Here are the big set of tty and serial driver changes for 5.18-rc1. Nothing major, some more good cleanups from Jiri and 2 new serial drivers. Highlights include: - termbits cleanups - export symbol cleanups and other core cleanups from Jiri Slaby - new sunplus and mvebu uart drivers (amazing that people are still creating new uarts...) - samsung serial driver cleanups - ldisc 29 is now "reserved" for experimental/development line disciplines - lots of other tiny fixes and cleanups to serial drivers and bindings All of these have been in linux-next for a while with no reported issues" * tag 'tty-5.18-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/tty: (104 commits) vt_ioctl: fix potential spectre v1 in VT_DISALLOCATE serial: 8250: fix XOFF/XON sending when DMA is used tty: serial: samsung: Add ARTPEC-8 support dt-bindings: serial: samsung: Add ARTPEC-8 UART serial: sc16is7xx: Clear RS485 bits in the shutdown tty: serial: samsung: simplify getting OF match data tty: serial: samsung: constify variables and pointers tty: serial: samsung: constify s3c24xx_serial_drv_data members tty: serial: samsung: constify UART name tty: serial: samsung: constify s3c24xx_serial_drv_data tty: serial: samsung: reduce number of casts tty: serial: samsung: embed s3c2410_uartcfg in parent structure tty: serial: samsung: embed s3c24xx_uart_info in parent structure serial: 8250_tegra: mark acpi_device_id as unused with !ACPI tty: serial: bcm63xx: use more precise Kconfig symbol serial: SERIAL_SUNPLUS should depend on ARCH_SUNPLUS tty: serial: jsm: fix two assignments in if conditions tty: serial: jsm: remove redundant assignments to variable linestatus serial: 8250_mtk: make two read-only arrays static const serial: samsung_tty: do not unlock port->lock for uart_write_wakeup() ...
Diffstat (limited to 'drivers/tty/serial/lpc32xx_hs.c')
-rw-r--r--drivers/tty/serial/lpc32xx_hs.c12
1 files changed, 5 insertions, 7 deletions
diff --git a/drivers/tty/serial/lpc32xx_hs.c b/drivers/tty/serial/lpc32xx_hs.c
index 07c4161eb4cc..93140cac1ca1 100644
--- a/drivers/tty/serial/lpc32xx_hs.c
+++ b/drivers/tty/serial/lpc32xx_hs.c
@@ -122,7 +122,7 @@ static void wait_for_xmit_ready(struct uart_port *port)
}
}
-static void lpc32xx_hsuart_console_putchar(struct uart_port *port, int ch)
+static void lpc32xx_hsuart_console_putchar(struct uart_port *port, unsigned char ch)
{
wait_for_xmit_ready(port);
writel((u32)ch, LPC32XX_HSUART_FIFO(port->membase));
@@ -276,10 +276,11 @@ static void __serial_lpc32xx_rx(struct uart_port *port)
tty_flip_buffer_push(tport);
}
+static void serial_lpc32xx_stop_tx(struct uart_port *port);
+
static void __serial_lpc32xx_tx(struct uart_port *port)
{
struct circ_buf *xmit = &port->state->xmit;
- unsigned int tmp;
if (port->x_char) {
writel((u32)port->x_char, LPC32XX_HSUART_FIFO(port->membase));
@@ -306,11 +307,8 @@ static void __serial_lpc32xx_tx(struct uart_port *port)
uart_write_wakeup(port);
exit_tx:
- if (uart_circ_empty(xmit)) {
- tmp = readl(LPC32XX_HSUART_CTRL(port->membase));
- tmp &= ~LPC32XX_HSU_TX_INT_EN;
- writel(tmp, LPC32XX_HSUART_CTRL(port->membase));
- }
+ if (uart_circ_empty(xmit))
+ serial_lpc32xx_stop_tx(port);
}
static irqreturn_t serial_lpc32xx_interrupt(int irq, void *dev_id)