sunplus-uart.c (446279168e030fd0ed68e2bba336bef8bb3da352) sunplus-uart.c (bec5b814d46c2a704c3c8148752e62a33e9fa6dc)
1// SPDX-License-Identifier: GPL-2.0
2/*
3 * Sunplus SoC UART driver
4 *
5 * Author: Hammer Hsieh <hammerh0314@gmail.com>
6 *
7 * Note1: This driver is 8250-like uart, but are not register compatible.
8 *

--- 319 unchanged lines hidden (view full) ---

328 writel(0, port->membase + SUP_UART_ISC); /* disable all interrupt */
329 spin_unlock_irqrestore(&port->lock, flags);
330
331 free_irq(port->irq, port);
332}
333
334static void sunplus_set_termios(struct uart_port *port,
335 struct ktermios *termios,
1// SPDX-License-Identifier: GPL-2.0
2/*
3 * Sunplus SoC UART driver
4 *
5 * Author: Hammer Hsieh <hammerh0314@gmail.com>
6 *
7 * Note1: This driver is 8250-like uart, but are not register compatible.
8 *

--- 319 unchanged lines hidden (view full) ---

328 writel(0, port->membase + SUP_UART_ISC); /* disable all interrupt */
329 spin_unlock_irqrestore(&port->lock, flags);
330
331 free_irq(port->irq, port);
332}
333
334static void sunplus_set_termios(struct uart_port *port,
335 struct ktermios *termios,
336 struct ktermios *oldtermios)
336 const struct ktermios *oldtermios)
337{
338 u32 ext, div, div_l, div_h, baud, lcr;
339 u32 clk = port->uartclk;
340 unsigned long flags;
341
342 baud = uart_get_baud_rate(port, termios, oldtermios, 0, port->uartclk / 16);
343
344 /* baud rate = uartclk / ((16 * divisor + 1) + divisor_ext) */

--- 431 unchanged lines hidden ---
337{
338 u32 ext, div, div_l, div_h, baud, lcr;
339 u32 clk = port->uartclk;
340 unsigned long flags;
341
342 baud = uart_get_baud_rate(port, termios, oldtermios, 0, port->uartclk / 16);
343
344 /* baud rate = uartclk / ((16 * divisor + 1) + divisor_ext) */

--- 431 unchanged lines hidden ---