diff options
Diffstat (limited to 'drivers/tty')
-rw-r--r-- | drivers/tty/serial/8250.c | 20 | ||||
-rw-r--r-- | drivers/tty/serial/8250_pci.c | 33 |
2 files changed, 52 insertions, 1 deletions
diff --git a/drivers/tty/serial/8250.c b/drivers/tty/serial/8250.c index 435ce14e676c..82ca71aa9d10 100644 --- a/drivers/tty/serial/8250.c +++ b/drivers/tty/serial/8250.c | |||
@@ -309,6 +309,13 @@ static const struct serial8250_config uart_config[] = { | |||
309 | UART_FCR_T_TRIG_01, | 309 | UART_FCR_T_TRIG_01, |
310 | .flags = UART_CAP_FIFO | UART_CAP_RTOIE, | 310 | .flags = UART_CAP_FIFO | UART_CAP_RTOIE, |
311 | }, | 311 | }, |
312 | [PORT_XR17D15X] = { | ||
313 | .name = "XR17D15X", | ||
314 | .fifo_size = 64, | ||
315 | .tx_loadsz = 64, | ||
316 | .fcr = UART_FCR_ENABLE_FIFO | UART_FCR_R_TRIG_10, | ||
317 | .flags = UART_CAP_FIFO | UART_CAP_AFE | UART_CAP_EFR, | ||
318 | }, | ||
312 | }; | 319 | }; |
313 | 320 | ||
314 | #if defined(CONFIG_MIPS_ALCHEMY) | 321 | #if defined(CONFIG_MIPS_ALCHEMY) |
@@ -1075,6 +1082,14 @@ static void autoconfig_16550a(struct uart_8250_port *up) | |||
1075 | serial_outp(up, UART_IER, iersave); | 1082 | serial_outp(up, UART_IER, iersave); |
1076 | 1083 | ||
1077 | /* | 1084 | /* |
1085 | * Exar uarts have EFR in a weird location | ||
1086 | */ | ||
1087 | if (up->port.flags & UPF_EXAR_EFR) { | ||
1088 | up->port.type = PORT_XR17D15X; | ||
1089 | up->capabilities |= UART_CAP_AFE | UART_CAP_EFR; | ||
1090 | } | ||
1091 | |||
1092 | /* | ||
1078 | * We distinguish between 16550A and U6 16550A by counting | 1093 | * We distinguish between 16550A and U6 16550A by counting |
1079 | * how many bytes are in the FIFO. | 1094 | * how many bytes are in the FIFO. |
1080 | */ | 1095 | */ |
@@ -2417,7 +2432,10 @@ serial8250_do_set_termios(struct uart_port *port, struct ktermios *termios, | |||
2417 | efr |= UART_EFR_CTS; | 2432 | efr |= UART_EFR_CTS; |
2418 | 2433 | ||
2419 | serial_outp(up, UART_LCR, UART_LCR_CONF_MODE_B); | 2434 | serial_outp(up, UART_LCR, UART_LCR_CONF_MODE_B); |
2420 | serial_outp(up, UART_EFR, efr); | 2435 | if (up->port.flags & UPF_EXAR_EFR) |
2436 | serial_outp(up, UART_XR_EFR, efr); | ||
2437 | else | ||
2438 | serial_outp(up, UART_EFR, efr); | ||
2421 | } | 2439 | } |
2422 | 2440 | ||
2423 | #ifdef CONFIG_ARCH_OMAP | 2441 | #ifdef CONFIG_ARCH_OMAP |
diff --git a/drivers/tty/serial/8250_pci.c b/drivers/tty/serial/8250_pci.c index 6b887d90a205..a79caba96d12 100644 --- a/drivers/tty/serial/8250_pci.c +++ b/drivers/tty/serial/8250_pci.c | |||
@@ -1101,6 +1101,15 @@ static int pci_eg20t_init(struct pci_dev *dev) | |||
1101 | #endif | 1101 | #endif |
1102 | } | 1102 | } |
1103 | 1103 | ||
1104 | static int | ||
1105 | pci_xr17c154_setup(struct serial_private *priv, | ||
1106 | const struct pciserial_board *board, | ||
1107 | struct uart_port *port, int idx) | ||
1108 | { | ||
1109 | port->flags |= UPF_EXAR_EFR; | ||
1110 | return pci_default_setup(priv, board, port, idx); | ||
1111 | } | ||
1112 | |||
1104 | /* This should be in linux/pci_ids.h */ | 1113 | /* This should be in linux/pci_ids.h */ |
1105 | #define PCI_VENDOR_ID_SBSMODULARIO 0x124B | 1114 | #define PCI_VENDOR_ID_SBSMODULARIO 0x124B |
1106 | #define PCI_SUBVENDOR_ID_SBSMODULARIO 0x124B | 1115 | #define PCI_SUBVENDOR_ID_SBSMODULARIO 0x124B |
@@ -1506,6 +1515,30 @@ static struct pci_serial_quirk pci_serial_quirks[] __refdata = { | |||
1506 | .setup = pci_timedia_setup, | 1515 | .setup = pci_timedia_setup, |
1507 | }, | 1516 | }, |
1508 | /* | 1517 | /* |
1518 | * Exar cards | ||
1519 | */ | ||
1520 | { | ||
1521 | .vendor = PCI_VENDOR_ID_EXAR, | ||
1522 | .device = PCI_DEVICE_ID_EXAR_XR17C152, | ||
1523 | .subvendor = PCI_ANY_ID, | ||
1524 | .subdevice = PCI_ANY_ID, | ||
1525 | .setup = pci_xr17c154_setup, | ||
1526 | }, | ||
1527 | { | ||
1528 | .vendor = PCI_VENDOR_ID_EXAR, | ||
1529 | .device = PCI_DEVICE_ID_EXAR_XR17C154, | ||
1530 | .subvendor = PCI_ANY_ID, | ||
1531 | .subdevice = PCI_ANY_ID, | ||
1532 | .setup = pci_xr17c154_setup, | ||
1533 | }, | ||
1534 | { | ||
1535 | .vendor = PCI_VENDOR_ID_EXAR, | ||
1536 | .device = PCI_DEVICE_ID_EXAR_XR17C158, | ||
1537 | .subvendor = PCI_ANY_ID, | ||
1538 | .subdevice = PCI_ANY_ID, | ||
1539 | .setup = pci_xr17c154_setup, | ||
1540 | }, | ||
1541 | /* | ||
1509 | * Xircom cards | 1542 | * Xircom cards |
1510 | */ | 1543 | */ |
1511 | { | 1544 | { |