aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/tty/serial/8250
diff options
context:
space:
mode:
authorGreg Kroah-Hartman <gregkh@linuxfoundation.org>2013-01-25 16:27:36 -0500
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2013-01-25 16:27:36 -0500
commit9f9cba810f36d16f4e64477e879a69f6c47b389d (patch)
treed787abcbead1439d3f82f0719efe520fd9689f79 /drivers/tty/serial/8250
parentdbf5bef8da169b38db804996a661f8d634df8295 (diff)
parent949db153b6466c6f7cad5a427ecea94985927311 (diff)
Merge 3.8-rc5 into tty-next
This resolves a number of tty driver merge issues found in linux-next Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/tty/serial/8250')
-rw-r--r--drivers/tty/serial/8250/8250.c11
-rw-r--r--drivers/tty/serial/8250/8250.h1
-rw-r--r--drivers/tty/serial/8250/8250_dw.c2
-rw-r--r--drivers/tty/serial/8250/8250_pci.c42
4 files changed, 53 insertions, 3 deletions
diff --git a/drivers/tty/serial/8250/8250.c b/drivers/tty/serial/8250/8250.c
index cb7db5a8ae92..24939ca3eedc 100644
--- a/drivers/tty/serial/8250/8250.c
+++ b/drivers/tty/serial/8250/8250.c
@@ -293,6 +293,12 @@ static const struct serial8250_config uart_config[] = {
293 UART_FCR_R_TRIG_00 | UART_FCR_T_TRIG_00, 293 UART_FCR_R_TRIG_00 | UART_FCR_T_TRIG_00,
294 .flags = UART_CAP_FIFO, 294 .flags = UART_CAP_FIFO,
295 }, 295 },
296 [PORT_BRCM_TRUMANAGE] = {
297 .name = "TruManage",
298 .fifo_size = 1,
299 .tx_loadsz = 1024,
300 .flags = UART_CAP_HFIFO,
301 },
296 [PORT_8250_CIR] = { 302 [PORT_8250_CIR] = {
297 .name = "CIR port" 303 .name = "CIR port"
298 } 304 }
@@ -1423,6 +1429,11 @@ void serial8250_tx_chars(struct uart_8250_port *up)
1423 port->icount.tx++; 1429 port->icount.tx++;
1424 if (uart_circ_empty(xmit)) 1430 if (uart_circ_empty(xmit))
1425 break; 1431 break;
1432 if (up->capabilities & UART_CAP_HFIFO) {
1433 if ((serial_port_in(port, UART_LSR) & BOTH_EMPTY) !=
1434 BOTH_EMPTY)
1435 break;
1436 }
1426 } while (--count > 0); 1437 } while (--count > 0);
1427 1438
1428 if (uart_circ_chars_pending(xmit) < WAKEUP_CHARS) 1439 if (uart_circ_chars_pending(xmit) < WAKEUP_CHARS)
diff --git a/drivers/tty/serial/8250/8250.h b/drivers/tty/serial/8250/8250.h
index 363d549d2e0d..34eb676916fe 100644
--- a/drivers/tty/serial/8250/8250.h
+++ b/drivers/tty/serial/8250/8250.h
@@ -69,6 +69,7 @@ struct serial8250_config {
69#define UART_CAP_AFE (1 << 11) /* MCR-based hw flow control */ 69#define UART_CAP_AFE (1 << 11) /* MCR-based hw flow control */
70#define UART_CAP_UUE (1 << 12) /* UART needs IER bit 6 set (Xscale) */ 70#define UART_CAP_UUE (1 << 12) /* UART needs IER bit 6 set (Xscale) */
71#define UART_CAP_RTOIE (1 << 13) /* UART needs IER bit 4 set (Xscale, Tegra) */ 71#define UART_CAP_RTOIE (1 << 13) /* UART needs IER bit 4 set (Xscale, Tegra) */
72#define UART_CAP_HFIFO (1 << 14) /* UART has a "hidden" FIFO */
72 73
73#define UART_BUG_QUOT (1 << 0) /* UART has buggy quot LSB */ 74#define UART_BUG_QUOT (1 << 0) /* UART has buggy quot LSB */
74#define UART_BUG_TXEN (1 << 1) /* UART has buggy TX IIR status */ 75#define UART_BUG_TXEN (1 << 1) /* UART has buggy TX IIR status */
diff --git a/drivers/tty/serial/8250/8250_dw.c b/drivers/tty/serial/8250/8250_dw.c
index 117bb8b03598..db0e66f6dd0e 100644
--- a/drivers/tty/serial/8250/8250_dw.c
+++ b/drivers/tty/serial/8250/8250_dw.c
@@ -105,7 +105,7 @@ static int dw8250_handle_irq(struct uart_port *p)
105 } else if ((iir & UART_IIR_BUSY) == UART_IIR_BUSY) { 105 } else if ((iir & UART_IIR_BUSY) == UART_IIR_BUSY) {
106 /* Clear the USR and write the LCR again. */ 106 /* Clear the USR and write the LCR again. */
107 (void)p->serial_in(p, DW_UART_USR); 107 (void)p->serial_in(p, DW_UART_USR);
108 p->serial_out(p, d->last_lcr, UART_LCR); 108 p->serial_out(p, UART_LCR, d->last_lcr);
109 109
110 return 1; 110 return 1;
111 } 111 }
diff --git a/drivers/tty/serial/8250/8250_pci.c b/drivers/tty/serial/8250/8250_pci.c
index 3b0cc3a09deb..3cb333242912 100644
--- a/drivers/tty/serial/8250/8250_pci.c
+++ b/drivers/tty/serial/8250/8250_pci.c
@@ -1332,6 +1332,18 @@ pci_omegapci_setup(struct serial_private *priv,
1332 return setup_port(priv, port, 2, idx * 8, 0); 1332 return setup_port(priv, port, 2, idx * 8, 0);
1333} 1333}
1334 1334
1335static int
1336pci_brcm_trumanage_setup(struct serial_private *priv,
1337 const struct pciserial_board *board,
1338 struct uart_8250_port *port, int idx)
1339{
1340 int ret = pci_default_setup(priv, board, port, idx);
1341
1342 port->port.type = PORT_BRCM_TRUMANAGE;
1343 port->port.flags = (port->port.flags | UPF_FIXED_PORT | UPF_FIXED_TYPE);
1344 return ret;
1345}
1346
1335static int skip_tx_en_setup(struct serial_private *priv, 1347static int skip_tx_en_setup(struct serial_private *priv,
1336 const struct pciserial_board *board, 1348 const struct pciserial_board *board,
1337 struct uart_8250_port *port, int idx) 1349 struct uart_8250_port *port, int idx)
@@ -1548,9 +1560,10 @@ pci_wch_ch353_setup(struct serial_private *priv,
1548#define PCI_VENDOR_ID_AGESTAR 0x5372 1560#define PCI_VENDOR_ID_AGESTAR 0x5372
1549#define PCI_DEVICE_ID_AGESTAR_9375 0x6872 1561#define PCI_DEVICE_ID_AGESTAR_9375 0x6872
1550#define PCI_VENDOR_ID_ASIX 0x9710 1562#define PCI_VENDOR_ID_ASIX 0x9710
1551#define PCI_DEVICE_ID_COMMTECH_4222PCIE 0x0019
1552#define PCI_DEVICE_ID_COMMTECH_4224PCIE 0x0020 1563#define PCI_DEVICE_ID_COMMTECH_4224PCIE 0x0020
1553#define PCI_DEVICE_ID_COMMTECH_4228PCIE 0x0021 1564#define PCI_DEVICE_ID_COMMTECH_4228PCIE 0x0021
1565#define PCI_DEVICE_ID_COMMTECH_4222PCIE 0x0022
1566#define PCI_DEVICE_ID_BROADCOM_TRUMANAGE 0x160a
1554 1567
1555 1568
1556/* Unknown vendors/cards - this should not be in linux/pci_ids.h */ 1569/* Unknown vendors/cards - this should not be in linux/pci_ids.h */
@@ -2211,6 +2224,17 @@ static struct pci_serial_quirk pci_serial_quirks[] __refdata = {
2211 .setup = pci_xr17v35x_setup, 2224 .setup = pci_xr17v35x_setup,
2212 }, 2225 },
2213 /* 2226 /*
2227 * Broadcom TruManage (NetXtreme)
2228 */
2229 {
2230 .vendor = PCI_VENDOR_ID_BROADCOM,
2231 .device = PCI_DEVICE_ID_BROADCOM_TRUMANAGE,
2232 .subvendor = PCI_ANY_ID,
2233 .subdevice = PCI_ANY_ID,
2234 .setup = pci_brcm_trumanage_setup,
2235 },
2236
2237 /*
2214 * Default "match everything" terminator entry 2238 * Default "match everything" terminator entry
2215 */ 2239 */
2216 { 2240 {
@@ -2405,6 +2429,7 @@ enum pci_board_num_t {
2405 pbn_ce4100_1_115200, 2429 pbn_ce4100_1_115200,
2406 pbn_omegapci, 2430 pbn_omegapci,
2407 pbn_NETMOS9900_2s_115200, 2431 pbn_NETMOS9900_2s_115200,
2432 pbn_brcm_trumanage,
2408}; 2433};
2409 2434
2410/* 2435/*
@@ -2503,7 +2528,7 @@ static struct pciserial_board pci_boards[] = {
2503 2528
2504 [pbn_b0_8_1152000_200] = { 2529 [pbn_b0_8_1152000_200] = {
2505 .flags = FL_BASE0, 2530 .flags = FL_BASE0,
2506 .num_ports = 2, 2531 .num_ports = 8,
2507 .base_baud = 1152000, 2532 .base_baud = 1152000,
2508 .uart_offset = 0x200, 2533 .uart_offset = 0x200,
2509 }, 2534 },
@@ -3149,6 +3174,12 @@ static struct pciserial_board pci_boards[] = {
3149 .num_ports = 2, 3174 .num_ports = 2,
3150 .base_baud = 115200, 3175 .base_baud = 115200,
3151 }, 3176 },
3177 [pbn_brcm_trumanage] = {
3178 .flags = FL_BASE0,
3179 .num_ports = 1,
3180 .reg_shift = 2,
3181 .base_baud = 115200,
3182 },
3152}; 3183};
3153 3184
3154static const struct pci_device_id blacklist[] = { 3185static const struct pci_device_id blacklist[] = {
@@ -4780,6 +4811,13 @@ static struct pci_device_id serial_pci_tbl[] = {
4780 pbn_omegapci }, 4811 pbn_omegapci },
4781 4812
4782 /* 4813 /*
4814 * Broadcom TruManage
4815 */
4816 { PCI_VENDOR_ID_BROADCOM, PCI_DEVICE_ID_BROADCOM_TRUMANAGE,
4817 PCI_ANY_ID, PCI_ANY_ID, 0, 0,
4818 pbn_brcm_trumanage },
4819
4820 /*
4783 * AgeStar as-prs2-009 4821 * AgeStar as-prs2-009
4784 */ 4822 */
4785 { PCI_VENDOR_ID_AGESTAR, PCI_DEVICE_ID_AGESTAR_9375, 4823 { PCI_VENDOR_ID_AGESTAR, PCI_DEVICE_ID_AGESTAR_9375,