]> git.karo-electronics.de Git - karo-tx-linux.git/commitdiff
[SERIAL] SIIG 8-port serial boards support
authorAndrey Panin <pazke@donpac.ru>
Thu, 2 Feb 2006 20:15:09 +0000 (20:15 +0000)
committerRussell King <rmk+kernel@arm.linux.org.uk>
Thu, 2 Feb 2006 20:15:09 +0000 (20:15 +0000)
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>
drivers/serial/8250_pci.c
include/linux/pci_ids.h

index 2a912153321e47345d9e11ea1698467993d41817..bb9ec28ccc2bea3d034579ed56da6a3dd2f49932 100644 (file)
@@ -439,6 +439,20 @@ static int pci_siig_init(struct pci_dev *dev)
        return -ENODEV;
 }
 
+static int pci_siig_setup(struct serial_private *priv,
+                         struct pciserial_board *board,
+                         struct uart_port *port, int idx)
+{
+       unsigned int bar = FL_GET_BASE(board->flags) + idx, offset = 0;
+
+       if (idx > 3) {
+               bar = 4;
+               offset = (idx - 4) * 8;
+       }
+
+       return setup_port(priv, port, bar, offset, 0);
+}
+
 /*
  * Timedia has an explosion of boards, and to avoid the PCI table from
  * growing *huge*, we use this function to collapse some 70 entries
@@ -748,7 +762,7 @@ static struct pci_serial_quirk pci_serial_quirks[] = {
                .subvendor      = PCI_ANY_ID,
                .subdevice      = PCI_ANY_ID,
                .init           = pci_siig_init,
-               .setup          = pci_default_setup,
+               .setup          = pci_siig_setup,
        },
        /*
         * Titan cards
@@ -2141,6 +2155,15 @@ static struct pci_device_id serial_pci_tbl[] = {
        {       PCI_VENDOR_ID_SIIG, PCI_DEVICE_ID_SIIG_4S_20x_850,
                PCI_ANY_ID, PCI_ANY_ID, 0, 0,
                pbn_b0_bt_4_921600 },
+       {       PCI_VENDOR_ID_SIIG, PCI_DEVICE_ID_SIIG_8S_20x_550,
+               PCI_ANY_ID, PCI_ANY_ID, 0, 0,
+               pbn_b0_bt_8_921600 },
+       {       PCI_VENDOR_ID_SIIG, PCI_DEVICE_ID_SIIG_8S_20x_650,
+               PCI_ANY_ID, PCI_ANY_ID, 0, 0,
+               pbn_b0_bt_8_921600 },
+       {       PCI_VENDOR_ID_SIIG, PCI_DEVICE_ID_SIIG_8S_20x_850,
+               PCI_ANY_ID, PCI_ANY_ID, 0, 0,
+               pbn_b0_bt_8_921600 },
 
        /*
         * Computone devices submitted by Doug McNash dmcnash@computone.com
index b0b908f583c58a38a614e6e51f30d71ae43d9508..92a619ba163fedaa803631c8e6b48113466df423 100644 (file)
 #define PCI_DEVICE_ID_SIIG_2S1P_20x_550        0x2060
 #define PCI_DEVICE_ID_SIIG_2S1P_20x_650        0x2061
 #define PCI_DEVICE_ID_SIIG_2S1P_20x_850        0x2062
+#define PCI_DEVICE_ID_SIIG_8S_20x_550  0x2080
+#define PCI_DEVICE_ID_SIIG_8S_20x_650  0x2081
+#define PCI_DEVICE_ID_SIIG_8S_20x_850  0x2082
 #define PCI_SUBDEVICE_ID_SIIG_QUARTET_SERIAL   0x2050
 
 #define PCI_VENDOR_ID_RADISYS          0x1331