Skip to content

Commit 73398c2

Browse files
committed
Merge tag 'tty-7.1-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/tty
Pull tty/serial updates from Greg KH: "Here is the set of tty and serial driver changes for 7.1-rc1. Not much here this cycle, biggest thing is the removal of an old driver that never got any actual hardware support (esp32), and the second try to moving the tty ports to their own workqueues (first try was in 7.0-rc1 but was reverted due to problems) Otherwise it's just a small set of driver updates and some vt modifier key enhancements. All have been in linux-next for a while with no reported issues" * tag 'tty-7.1-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/tty: (35 commits) tty: serial: ip22zilog: Fix section mispatch warning hvc/xen: Check console connection flag serial: sh-sci: Add support for RZ/G3L RSCI dt-bindings: serial: renesas,rsci: Document RZ/G3L SoC tty: atmel_serial: update outdated reference to atmel_tasklet_func() serial: xilinx_uartps: Drop unused include serial: qcom-geni: drop stray newline format specifier serial: 8250: loongson: Enable building on MIPS Loongson64 dt-bindings: serial: 8250: Add Loongson 3A4000 uart compatible serial: 8250_fintek: Add support for F81214E tty: tty_port: add workqueue to flip TTY buffer vt: support ITU-T T.416 color subparameters serial: qcom-geni: Fix RTS behavior with flow control tty: serial: imx: keep dma request disabled before dma transfer setup tty: serial: 8250: Add SystemBase Multi I/O cards serial: pic32_uart: allow driver to be compiled on all architectures with COMPILE_TEST serial: tegra: remove Kconfig dependency on APB DMA controller dt-bindings: serial: amlogic,meson-uart: Add compatible string for A9 dt-bindings: serial: atmel,at91-usart: add microchip,lan9691-usart serial: auart: check clk_enable() return in console write ...
2 parents 40735a6 + a1a81ae commit 73398c2

43 files changed

Lines changed: 532 additions & 1364 deletions

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

Documentation/devicetree/bindings/serial/8250.yaml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -182,6 +182,7 @@ properties:
182182
- const: ns16550a
183183
- items:
184184
- enum:
185+
- loongson,ls3a4000-uart
185186
- loongson,ls3a5000-uart
186187
- loongson,ls3a6000-uart
187188
- loongson,ls2k2000-uart

Documentation/devicetree/bindings/serial/amlogic,meson-uart.yaml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -56,6 +56,7 @@ properties:
5656
items:
5757
- enum:
5858
- amlogic,a4-uart
59+
- amlogic,a9-uart
5960
- amlogic,s6-uart
6061
- amlogic,s7-uart
6162
- amlogic,s7d-uart

Documentation/devicetree/bindings/serial/atmel,at91-usart.yaml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,7 @@ properties:
2424
- const: atmel,at91sam9260-usart
2525
- items:
2626
- enum:
27+
- microchip,lan9691-usart
2728
- microchip,sam9x60-usart
2829
- microchip,sam9x7-usart
2930
- microchip,sama7d65-usart

Documentation/devicetree/bindings/serial/renesas,rsci.yaml

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@ properties:
1414
compatible:
1515
oneOf:
1616
- enum:
17+
- renesas,r9a08g046-rsci # RZ/G3L
1718
- renesas,r9a09g047-rsci # RZ/G3E
1819
- renesas,r9a09g077-rsci # RZ/T2H
1920

@@ -145,6 +146,31 @@ allOf:
145146
- resets
146147
- reset-names
147148

149+
- if:
150+
properties:
151+
compatible:
152+
contains:
153+
const: renesas,r9a08g046-rsci
154+
then:
155+
properties:
156+
interrupts:
157+
minItems: 6
158+
159+
interrupt-names:
160+
minItems: 6
161+
162+
clocks:
163+
minItems: 2
164+
maxItems: 3
165+
166+
clock-names:
167+
minItems: 2
168+
maxItems: 3
169+
170+
required:
171+
- resets
172+
- reset-names
173+
148174
unevaluatedProperties: false
149175

150176
examples:

Documentation/devicetree/bindings/serial/snps-dw-apb-uart.yaml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -71,6 +71,7 @@ properties:
7171
- rockchip,rk3568-uart
7272
- rockchip,rk3576-uart
7373
- rockchip,rk3588-uart
74+
- rockchip,rv1103b-uart
7475
- rockchip,rv1108-uart
7576
- rockchip,rv1126-uart
7677
- sophgo,sg2044-uart

drivers/tty/hvc/hvc_iucv.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -130,7 +130,7 @@ static struct iucv_handler hvc_iucv_handler = {
130130
*/
131131
static struct hvc_iucv_private *hvc_iucv_get_private(uint32_t num)
132132
{
133-
if (num > hvc_iucv_devices)
133+
if (num >= hvc_iucv_devices)
134134
return NULL;
135135
return hvc_iucv_table[num];
136136
}

drivers/tty/pty.c

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -532,14 +532,16 @@ static void __init legacy_pty_init(void)
532532
pty_driver = tty_alloc_driver(legacy_count,
533533
TTY_DRIVER_RESET_TERMIOS |
534534
TTY_DRIVER_REAL_RAW |
535-
TTY_DRIVER_DYNAMIC_ALLOC);
535+
TTY_DRIVER_DYNAMIC_ALLOC |
536+
TTY_DRIVER_NO_WORKQUEUE);
536537
if (IS_ERR(pty_driver))
537538
panic("Couldn't allocate pty driver");
538539

539540
pty_slave_driver = tty_alloc_driver(legacy_count,
540541
TTY_DRIVER_RESET_TERMIOS |
541542
TTY_DRIVER_REAL_RAW |
542-
TTY_DRIVER_DYNAMIC_ALLOC);
543+
TTY_DRIVER_DYNAMIC_ALLOC |
544+
TTY_DRIVER_NO_WORKQUEUE);
543545
if (IS_ERR(pty_slave_driver))
544546
panic("Couldn't allocate pty slave driver");
545547

@@ -849,15 +851,17 @@ static void __init unix98_pty_init(void)
849851
TTY_DRIVER_REAL_RAW |
850852
TTY_DRIVER_DYNAMIC_DEV |
851853
TTY_DRIVER_DEVPTS_MEM |
852-
TTY_DRIVER_DYNAMIC_ALLOC);
854+
TTY_DRIVER_DYNAMIC_ALLOC |
855+
TTY_DRIVER_NO_WORKQUEUE);
853856
if (IS_ERR(ptm_driver))
854857
panic("Couldn't allocate Unix98 ptm driver");
855858
pts_driver = tty_alloc_driver(NR_UNIX98_PTY_MAX,
856859
TTY_DRIVER_RESET_TERMIOS |
857860
TTY_DRIVER_REAL_RAW |
858861
TTY_DRIVER_DYNAMIC_DEV |
859862
TTY_DRIVER_DEVPTS_MEM |
860-
TTY_DRIVER_DYNAMIC_ALLOC);
863+
TTY_DRIVER_DYNAMIC_ALLOC |
864+
TTY_DRIVER_NO_WORKQUEUE);
861865
if (IS_ERR(pts_driver))
862866
panic("Couldn't allocate Unix98 pts driver");
863867

drivers/tty/serial/8250/8250_core.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -524,7 +524,7 @@ console_initcall(univ8250_console_init);
524524

525525
struct uart_driver serial8250_reg = {
526526
.owner = THIS_MODULE,
527-
.driver_name = "serial",
527+
.driver_name = "serial_8250",
528528
.dev_name = "ttyS",
529529
.major = TTY_MAJOR,
530530
.minor = 64,

drivers/tty/serial/8250/8250_fintek.c

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
// SPDX-License-Identifier: GPL-2.0
22
/*
3-
* Probe for F81216A LPC to 4 UART
3+
* Probe for F81216A LPC to 4 UART and F81214E LPC/eSPI to 2 UART
44
*
55
* Copyright (C) 2014-2016 Ricardo Ribalda, Qtechnology A/S
66
*/
@@ -23,6 +23,7 @@
2323
#define CHIP_ID_F81216AD 0x1602
2424
#define CHIP_ID_F81216E 0x1617
2525
#define CHIP_ID_F81216H 0x0501
26+
#define CHIP_ID_F81214E 0x1417
2627
#define CHIP_ID_F81216 0x0802
2728
#define VENDOR_ID1 0x23
2829
#define VENDOR_ID1_VAL 0x19
@@ -161,6 +162,7 @@ static int fintek_8250_check_id(struct fintek_8250 *pdata)
161162
case CHIP_ID_F81216AD:
162163
case CHIP_ID_F81216E:
163164
case CHIP_ID_F81216H:
165+
case CHIP_ID_F81214E:
164166
case CHIP_ID_F81216:
165167
break;
166168
default:
@@ -185,6 +187,7 @@ static int fintek_8250_get_ldn_range(struct fintek_8250 *pdata, int *min,
185187
case CHIP_ID_F81216AD:
186188
case CHIP_ID_F81216E:
187189
case CHIP_ID_F81216H:
190+
case CHIP_ID_F81214E:
188191
case CHIP_ID_F81216:
189192
*min = F81216_LDN_LOW;
190193
*max = F81216_LDN_HIGH;
@@ -255,6 +258,7 @@ static void fintek_8250_set_irq_mode(struct fintek_8250 *pdata, bool is_level)
255258
case CHIP_ID_F81216AD:
256259
case CHIP_ID_F81216E:
257260
case CHIP_ID_F81216H:
261+
case CHIP_ID_F81214E:
258262
case CHIP_ID_F81216:
259263
sio_write_mask_reg(pdata, FINTEK_IRQ_MODE, IRQ_SHARE,
260264
IRQ_SHARE);
@@ -269,6 +273,7 @@ static void fintek_8250_set_max_fifo(struct fintek_8250 *pdata)
269273
switch (pdata->pid) {
270274
case CHIP_ID_F81216E: /* 128Bytes FIFO */
271275
case CHIP_ID_F81216H:
276+
case CHIP_ID_F81214E:
272277
case CHIP_ID_F81966:
273278
case CHIP_ID_F81866:
274279
sio_write_mask_reg(pdata, FIFO_CTRL,
@@ -304,6 +309,7 @@ static void fintek_8250_set_termios(struct uart_port *port,
304309
switch (pdata->pid) {
305310
case CHIP_ID_F81216E:
306311
case CHIP_ID_F81216H:
312+
case CHIP_ID_F81214E:
307313
reg = RS485;
308314
break;
309315
case CHIP_ID_F81966:
@@ -354,6 +360,7 @@ static void fintek_8250_set_termios_handler(struct uart_8250_port *uart)
354360
switch (pdata->pid) {
355361
case CHIP_ID_F81216E:
356362
case CHIP_ID_F81216H:
363+
case CHIP_ID_F81214E:
357364
case CHIP_ID_F81966:
358365
case CHIP_ID_F81866:
359366
uart->port.set_termios = fintek_8250_set_termios;
@@ -446,6 +453,7 @@ static void fintek_8250_set_rs485_handler(struct uart_8250_port *uart)
446453
break;
447454

448455
case CHIP_ID_F81216E: /* F81216E does not support RS485 delays */
456+
case CHIP_ID_F81214E: /* F81214E does not support RS485 delays */
449457
uart->port.rs485_config = fintek_8250_rs485_config;
450458
uart->port.rs485_supported = fintek_8250_rs485_supported;
451459
break;

drivers/tty/serial/8250/8250_pci.c

Lines changed: 51 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -100,6 +100,8 @@
100100
#define PCI_DEVICE_ID_ADDIDATA_CPCI7420_NG 0x7025
101101
#define PCI_DEVICE_ID_ADDIDATA_CPCI7300_NG 0x7026
102102

103+
#define PCI_VENDOR_ID_SYSTEMBASE 0x14a1
104+
103105
/* Unknown vendors/cards - this should not be in linux/pci_ids.h */
104106
#define PCI_SUBDEVICE_ID_UNKNOWN_0x1584 0x1584
105107
#define PCI_SUBDEVICE_ID_UNKNOWN_0x1588 0x1588
@@ -2133,6 +2135,35 @@ pci_moxa_setup(struct serial_private *priv,
21332135
return setup_port(priv, port, bar, offset, 0);
21342136
}
21352137

2138+
#define SB_OPTR_IMR0 0x0c /* Interrupt mask register, p0 to p7 */
2139+
static int pci_systembase_init(struct pci_dev *dev)
2140+
{
2141+
resource_size_t iobase;
2142+
2143+
if (!IS_ENABLED(CONFIG_HAS_IOPORT))
2144+
return serial_8250_warn_need_ioport(dev);
2145+
2146+
iobase = pci_resource_start(dev, 1);
2147+
2148+
/* This will support up to 8 ports */
2149+
outb(0xff, iobase + SB_OPTR_IMR0);
2150+
2151+
return 0;
2152+
}
2153+
2154+
static void pci_systembase_exit(struct pci_dev *dev)
2155+
{
2156+
resource_size_t iobase;
2157+
2158+
if (!IS_ENABLED(CONFIG_HAS_IOPORT)) {
2159+
serial_8250_warn_need_ioport(dev);
2160+
return;
2161+
}
2162+
2163+
iobase = pci_resource_start(dev, 0);
2164+
outb(0x00, iobase + SB_OPTR_IMR0);
2165+
}
2166+
21362167
/*
21372168
* Master list of serial port init/setup/exit quirks.
21382169
* This does not describe the general nature of the port.
@@ -2481,6 +2512,16 @@ static struct pci_serial_quirk pci_serial_quirks[] = {
24812512
.init = pci_siig_init,
24822513
.setup = pci_siig_setup,
24832514
},
2515+
/* Systembase */
2516+
{
2517+
.vendor = PCI_VENDOR_ID_SYSTEMBASE,
2518+
.device = 0x0008,
2519+
.subvendor = PCI_ANY_ID,
2520+
.subdevice = PCI_ANY_ID,
2521+
.init = pci_systembase_init,
2522+
.setup = pci_default_setup,
2523+
.exit = pci_systembase_exit,
2524+
},
24842525
/*
24852526
* Titan cards
24862527
*/
@@ -3054,6 +3095,7 @@ enum pci_board_num_t {
30543095
pbn_b0_1_921600,
30553096
pbn_b0_2_921600,
30563097
pbn_b0_4_921600,
3098+
pbn_b0_8_921600,
30573099

30583100
pbn_b0_2_1130000,
30593101

@@ -3254,6 +3296,12 @@ static struct pciserial_board pci_boards[] = {
32543296
.base_baud = 921600,
32553297
.uart_offset = 8,
32563298
},
3299+
[pbn_b0_8_921600] = {
3300+
.flags = FL_BASE0,
3301+
.num_ports = 8,
3302+
.base_baud = 921600,
3303+
.uart_offset = 8,
3304+
},
32573305

32583306
[pbn_b0_2_1130000] = {
32593307
.flags = FL_BASE0,
@@ -6169,6 +6217,9 @@ static const struct pci_device_id serial_pci_tbl[] = {
61696217
PCI_ANY_ID, PCI_ANY_ID,
61706218
0, 0, pbn_b0_1_115200 },
61716219

6220+
/* Systembase Multi I/O cards */
6221+
{ PCI_VDEVICE(SYSTEMBASE, 0x0008), pbn_b0_8_921600 },
6222+
61726223
/* Fintek PCI serial cards */
61736224
{ PCI_DEVICE(0x1c29, 0x1104), .driver_data = pbn_fintek_4 },
61746225
{ PCI_DEVICE(0x1c29, 0x1108), .driver_data = pbn_fintek_8 },

0 commit comments

Comments
 (0)