aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--drivers/tty/serial/8250/8250_pci.c48
1 files changed, 48 insertions, 0 deletions
diff --git a/drivers/tty/serial/8250/8250_pci.c b/drivers/tty/serial/8250/8250_pci.c
index 4ea45c15388c..4697a514b80a 100644
--- a/drivers/tty/serial/8250/8250_pci.c
+++ b/drivers/tty/serial/8250/8250_pci.c
@@ -1307,6 +1307,29 @@ static int pci_default_setup(struct serial_private *priv,
1307 return setup_port(priv, port, bar, offset, board->reg_shift); 1307 return setup_port(priv, port, bar, offset, board->reg_shift);
1308} 1308}
1309 1309
1310static int pci_pericom_setup(struct serial_private *priv,
1311 const struct pciserial_board *board,
1312 struct uart_8250_port *port, int idx)
1313{
1314 unsigned int bar, offset = board->first_offset, maxnr;
1315
1316 bar = FL_GET_BASE(board->flags);
1317 if (board->flags & FL_BASE_BARS)
1318 bar += idx;
1319 else
1320 offset += idx * board->uart_offset;
1321
1322 maxnr = (pci_resource_len(priv->dev, bar) - board->first_offset) >>
1323 (board->reg_shift + 3);
1324
1325 if (board->flags & FL_REGION_SZ_CAP && idx >= maxnr)
1326 return 1;
1327
1328 port->port.uartclk = 14745600;
1329
1330 return setup_port(priv, port, bar, offset, board->reg_shift);
1331}
1332
1310static int 1333static int
1311ce4100_serial_setup(struct serial_private *priv, 1334ce4100_serial_setup(struct serial_private *priv,
1312 const struct pciserial_board *board, 1335 const struct pciserial_board *board,
@@ -2016,6 +2039,31 @@ static struct pci_serial_quirk pci_serial_quirks[] __refdata = {
2016 .exit = pci_plx9050_exit, 2039 .exit = pci_plx9050_exit,
2017 }, 2040 },
2018 /* 2041 /*
2042 * Pericom
2043 */
2044 {
2045 .vendor = 0x12d8,
2046 .device = 0x7952,
2047 .subvendor = PCI_ANY_ID,
2048 .subdevice = PCI_ANY_ID,
2049 .setup = pci_pericom_setup,
2050 },
2051 {
2052 .vendor = 0x12d8,
2053 .device = 0x7954,
2054 .subvendor = PCI_ANY_ID,
2055 .subdevice = PCI_ANY_ID,
2056 .setup = pci_pericom_setup,
2057 },
2058 {
2059 .vendor = 0x12d8,
2060 .device = 0x7958,
2061 .subvendor = PCI_ANY_ID,
2062 .subdevice = PCI_ANY_ID,
2063 .setup = pci_pericom_setup,
2064 },
2065
2066 /*
2019 * PLX 2067 * PLX
2020 */ 2068 */
2021 { 2069 {