diff options
author | Angelo Butti <buttiangelo@gmail.com> | 2013-10-15 15:41:10 -0400 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2013-10-19 22:51:17 -0400 |
commit | 943414752045defdd7e476a830e2d8c0ec37cca2 (patch) | |
tree | 352eedaaca7495d8507514f01e63328c0ffb62ff /drivers/tty/serial | |
parent | 37cd940b2044ca0c481e70742da37278a2d736ae (diff) |
serial: 8250_pci: add Pericom PCIe Serial board Support (12d8:7952/4/8) - Chip PI7C9X7952/4/8
Signed-off-by: Angelo Butti <buttiangelo@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/tty/serial')
-rw-r--r-- | drivers/tty/serial/8250/8250_pci.c | 48 |
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 | ||
1310 | static 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 | |||
1310 | static int | 1333 | static int |
1311 | ce4100_serial_setup(struct serial_private *priv, | 1334 | ce4100_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 | { |