diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2017-09-05 10:30:48 -0700 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2017-09-05 10:30:48 -0700 |
commit | e63a94f12b5fc67b2b92a89d4058e7a9021e900e (patch) | |
tree | 9fddf35df3289bd41c2310937bf2faed4d036603 /drivers/tty/serial/pch_uart.c | |
parent | Merge tag 'usb-4.14-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/usb (diff) | |
parent | tty: goldfish: Implement support for kernel 'earlycon' parameter (diff) | |
download | linux-dev-e63a94f12b5fc67b2b92a89d4058e7a9021e900e.tar.xz linux-dev-e63a94f12b5fc67b2b92a89d4058e7a9021e900e.zip |
Merge tag 'tty-4.14-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/tty
Pull tty/serial updates from Greg KH:
"Here is the big tty/serial driver update for 4.14-rc1.
Well, not all that big, just a number of small serial driver fixes,
and a new serial driver. Also in here are some much needed goldfish
tty driver (emulator) fixes to try to get that codebase under control.
All of these have been in linux-next for a while with no reported
issues"
* tag 'tty-4.14-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/tty: (94 commits)
tty: goldfish: Implement support for kernel 'earlycon' parameter
tty: goldfish: Use streaming DMA for r/w operations on Ranchu platforms
tty: goldfish: Refactor constants to better reflect their nature
serial: 8250_port: Remove useless NULL checks
earlycon: initialise baud field of earlycon device structure
tty: hvcs: make ktermios const
pty: show associative slave of ptmx in fdinfo
tty: n_gsm: Add compat_ioctl
tty: hvcs: constify vio_device_id
tty: hvc_vio: constify vio_device_id
tty: mips_ejtag_fdc: constify mips_cdmm_device_id
Introduce 8250_men_mcb
mcb: introduce mcb_get_resource()
serial: imx: Avoid post-PIO cleanup if TX DMA is started
tty: serial: imx: disable irq after suspend
serial: 8250_uniphier: add suspend/resume support
serial: 8250_uniphier: use CHAR register for canary to detect power-off
serial: 8250_uniphier: fix serial port index in private data
serial: 8250: of: Add new port type for MediaTek BTIF controller on MT7622/23 SoC
dt-bindings: serial: 8250: Add MediaTek BTIF controller bindings
...
Diffstat (limited to 'drivers/tty/serial/pch_uart.c')
-rw-r--r-- | drivers/tty/serial/pch_uart.c | 38 |
1 files changed, 16 insertions, 22 deletions
diff --git a/drivers/tty/serial/pch_uart.c b/drivers/tty/serial/pch_uart.c index d3796dc26fa9..ae8cfc81ffc5 100644 --- a/drivers/tty/serial/pch_uart.c +++ b/drivers/tty/serial/pch_uart.c @@ -46,11 +46,6 @@ enum { PCH_UART_HANDLED_LS_INT_SHIFT, }; -enum { - PCH_UART_8LINE, - PCH_UART_2LINE, -}; - #define PCH_UART_DRIVER_DEVICE "ttyPCH" /* Set the max number of UART port @@ -267,7 +262,7 @@ struct eg20t_port { /** * struct pch_uart_driver_data - private data structure for UART-DMA - * @port_type: The number of DMA channel + * @port_type: The type of UART port * @line_no: UART port line number (0, 1, 2...) */ struct pch_uart_driver_data { @@ -290,17 +285,17 @@ enum pch_uart_num_t { }; static struct pch_uart_driver_data drv_dat[] = { - [pch_et20t_uart0] = {PCH_UART_8LINE, 0}, - [pch_et20t_uart1] = {PCH_UART_2LINE, 1}, - [pch_et20t_uart2] = {PCH_UART_2LINE, 2}, - [pch_et20t_uart3] = {PCH_UART_2LINE, 3}, - [pch_ml7213_uart0] = {PCH_UART_8LINE, 0}, - [pch_ml7213_uart1] = {PCH_UART_2LINE, 1}, - [pch_ml7213_uart2] = {PCH_UART_2LINE, 2}, - [pch_ml7223_uart0] = {PCH_UART_8LINE, 0}, - [pch_ml7223_uart1] = {PCH_UART_2LINE, 1}, - [pch_ml7831_uart0] = {PCH_UART_8LINE, 0}, - [pch_ml7831_uart1] = {PCH_UART_2LINE, 1}, + [pch_et20t_uart0] = {PORT_PCH_8LINE, 0}, + [pch_et20t_uart1] = {PORT_PCH_2LINE, 1}, + [pch_et20t_uart2] = {PORT_PCH_2LINE, 2}, + [pch_et20t_uart3] = {PORT_PCH_2LINE, 3}, + [pch_ml7213_uart0] = {PORT_PCH_8LINE, 0}, + [pch_ml7213_uart1] = {PORT_PCH_2LINE, 1}, + [pch_ml7213_uart2] = {PORT_PCH_2LINE, 2}, + [pch_ml7223_uart0] = {PORT_PCH_8LINE, 0}, + [pch_ml7223_uart1] = {PORT_PCH_2LINE, 1}, + [pch_ml7831_uart0] = {PORT_PCH_8LINE, 0}, + [pch_ml7831_uart1] = {PORT_PCH_2LINE, 1}, }; #ifdef CONFIG_SERIAL_PCH_UART_CONSOLE @@ -1777,10 +1772,10 @@ static struct eg20t_port *pch_uart_init_port(struct pci_dev *pdev, goto init_port_free_txbuf; switch (port_type) { - case PORT_UNKNOWN: + case PORT_PCH_8LINE: fifosize = 256; /* EG20T/ML7213: UART0 */ break; - case PORT_8250: + case PORT_PCH_2LINE: fifosize = 64; /* EG20T:UART1~3 ML7213: UART1~2*/ break; default: @@ -1804,7 +1799,7 @@ static struct eg20t_port *pch_uart_init_port(struct pci_dev *pdev, priv->fifo_size = fifosize; priv->uartclk = pch_uart_get_uartclk(); - priv->port_type = PORT_MAX_8250 + port_type + 1; + priv->port_type = port_type; priv->port.dev = &pdev->dev; priv->port.iobase = iobase; priv->port.membase = NULL; @@ -1862,8 +1857,7 @@ static void pch_uart_exit_port(struct eg20t_port *priv) { #ifdef CONFIG_DEBUG_FS - if (priv->debugfs) - debugfs_remove(priv->debugfs); + debugfs_remove(priv->debugfs); #endif uart_remove_one_port(&pch_uart_driver, &priv->port); free_page((unsigned long)priv->rxbuf.buf); |