diff options
author | Andrey Panin <pazke@donpac.ru> | 2006-02-02 15:15:09 -0500 |
---|---|---|
committer | Russell King <rmk+kernel@arm.linux.org.uk> | 2006-02-02 15:15:09 -0500 |
commit | 3ec9c59449744dcc390d593a017d30671546fd9e (patch) | |
tree | c478df4c56fcf92ae614463542b27b6f40f7a6a1 /drivers/serial/8250_pci.c | |
parent | b4103333d7904310d34de18d85e51e3d74f00a3b (diff) |
[SERIAL] SIIG 8-port serial boards support
This patch adds support for SIIG 8-port boards. These boards have 4 ports in
separate bars and another 4 ports in the single bar. Because of this strange
port arrangement these cards need special setup function. Fortunately no other
SIIG cards have more than 4 port, so this setup function could be used for them
too.
Signed-off-by: Andrey Panin <pazke@donpac.ru>
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
Diffstat (limited to 'drivers/serial/8250_pci.c')
-rw-r--r-- | drivers/serial/8250_pci.c | 25 |
1 files changed, 24 insertions, 1 deletions
diff --git a/drivers/serial/8250_pci.c b/drivers/serial/8250_pci.c index 2a912153321e..bb9ec28ccc2b 100644 --- a/drivers/serial/8250_pci.c +++ b/drivers/serial/8250_pci.c | |||
@@ -439,6 +439,20 @@ static int pci_siig_init(struct pci_dev *dev) | |||
439 | return -ENODEV; | 439 | return -ENODEV; |
440 | } | 440 | } |
441 | 441 | ||
442 | static int pci_siig_setup(struct serial_private *priv, | ||
443 | struct pciserial_board *board, | ||
444 | struct uart_port *port, int idx) | ||
445 | { | ||
446 | unsigned int bar = FL_GET_BASE(board->flags) + idx, offset = 0; | ||
447 | |||
448 | if (idx > 3) { | ||
449 | bar = 4; | ||
450 | offset = (idx - 4) * 8; | ||
451 | } | ||
452 | |||
453 | return setup_port(priv, port, bar, offset, 0); | ||
454 | } | ||
455 | |||
442 | /* | 456 | /* |
443 | * Timedia has an explosion of boards, and to avoid the PCI table from | 457 | * Timedia has an explosion of boards, and to avoid the PCI table from |
444 | * growing *huge*, we use this function to collapse some 70 entries | 458 | * growing *huge*, we use this function to collapse some 70 entries |
@@ -748,7 +762,7 @@ static struct pci_serial_quirk pci_serial_quirks[] = { | |||
748 | .subvendor = PCI_ANY_ID, | 762 | .subvendor = PCI_ANY_ID, |
749 | .subdevice = PCI_ANY_ID, | 763 | .subdevice = PCI_ANY_ID, |
750 | .init = pci_siig_init, | 764 | .init = pci_siig_init, |
751 | .setup = pci_default_setup, | 765 | .setup = pci_siig_setup, |
752 | }, | 766 | }, |
753 | /* | 767 | /* |
754 | * Titan cards | 768 | * Titan cards |
@@ -2141,6 +2155,15 @@ static struct pci_device_id serial_pci_tbl[] = { | |||
2141 | { PCI_VENDOR_ID_SIIG, PCI_DEVICE_ID_SIIG_4S_20x_850, | 2155 | { PCI_VENDOR_ID_SIIG, PCI_DEVICE_ID_SIIG_4S_20x_850, |
2142 | PCI_ANY_ID, PCI_ANY_ID, 0, 0, | 2156 | PCI_ANY_ID, PCI_ANY_ID, 0, 0, |
2143 | pbn_b0_bt_4_921600 }, | 2157 | pbn_b0_bt_4_921600 }, |
2158 | { PCI_VENDOR_ID_SIIG, PCI_DEVICE_ID_SIIG_8S_20x_550, | ||
2159 | PCI_ANY_ID, PCI_ANY_ID, 0, 0, | ||
2160 | pbn_b0_bt_8_921600 }, | ||
2161 | { PCI_VENDOR_ID_SIIG, PCI_DEVICE_ID_SIIG_8S_20x_650, | ||
2162 | PCI_ANY_ID, PCI_ANY_ID, 0, 0, | ||
2163 | pbn_b0_bt_8_921600 }, | ||
2164 | { PCI_VENDOR_ID_SIIG, PCI_DEVICE_ID_SIIG_8S_20x_850, | ||
2165 | PCI_ANY_ID, PCI_ANY_ID, 0, 0, | ||
2166 | pbn_b0_bt_8_921600 }, | ||
2144 | 2167 | ||
2145 | /* | 2168 | /* |
2146 | * Computone devices submitted by Doug McNash dmcnash@computone.com | 2169 | * Computone devices submitted by Doug McNash dmcnash@computone.com |