Merge branch 'next' into for-linus-3.0
[pandora-kernel.git] / drivers / tty / serial / 8250_pci.c
index 738cec9..f41b425 100644 (file)
@@ -1,6 +1,4 @@
 /*
- *  linux/drivers/char/8250_pci.c
- *
  *  Probe module for 8250/16550-type PCI serial ports.
  *
  *  Based on drivers/char/serial.c, by Linus Torvalds, Theodore Ts'o.
@@ -973,6 +971,14 @@ ce4100_serial_setup(struct serial_private *priv,
        return ret;
 }
 
+static int
+pci_omegapci_setup(struct serial_private *priv,
+                     const struct pciserial_board *board,
+                     struct uart_port *port, int idx)
+{
+       return setup_port(priv, port, 2, idx * 8, 0);
+}
+
 static int skip_tx_en_setup(struct serial_private *priv,
                        const struct pciserial_board *board,
                        struct uart_port *port, int idx)
@@ -988,6 +994,15 @@ static int skip_tx_en_setup(struct serial_private *priv,
        return pci_default_setup(priv, board, port, idx);
 }
 
+static int pci_eg20t_init(struct pci_dev *dev)
+{
+#if defined(CONFIG_SERIAL_PCH_UART) || defined(CONFIG_SERIAL_PCH_UART_MODULE)
+       return -ENODEV;
+#else
+       return 0;
+#endif
+}
+
 /* This should be in linux/pci_ids.h */
 #define PCI_VENDOR_ID_SBSMODULARIO     0x124B
 #define PCI_SUBVENDOR_ID_SBSMODULARIO  0x124B
@@ -1012,6 +1027,8 @@ static int skip_tx_en_setup(struct serial_private *priv,
 #define PCI_DEVICE_ID_TITAN_200EI      0xA016
 #define PCI_DEVICE_ID_TITAN_200EISI    0xA017
 #define PCI_DEVICE_ID_OXSEMI_16PCI958  0x9538
+#define PCIE_DEVICE_ID_NEO_2_OX_IBM    0x00F6
+#define PCI_DEVICE_ID_PLX_CRONYX_OMEGA 0xc001
 
 /* Unknown vendors/cards - this should not be in linux/pci_ids.h */
 #define PCI_SUBDEVICE_ID_UNKNOWN_0x1584        0x1584
@@ -1412,7 +1429,7 @@ static struct pci_serial_quirk pci_serial_quirks[] __refdata = {
                .setup          = pci_default_setup,
        },
        /*
-        * For Oxford Semiconductor and Mainpine
+        * For Oxford Semiconductor Tornado based devices
         */
        {
                .vendor         = PCI_VENDOR_ID_OXSEMI,
@@ -1430,6 +1447,74 @@ static struct pci_serial_quirk pci_serial_quirks[] __refdata = {
                .init           = pci_oxsemi_tornado_init,
                .setup          = pci_default_setup,
        },
+       {
+               .vendor         = PCI_VENDOR_ID_DIGI,
+               .device         = PCIE_DEVICE_ID_NEO_2_OX_IBM,
+               .subvendor              = PCI_SUBVENDOR_ID_IBM,
+               .subdevice              = PCI_ANY_ID,
+               .init                   = pci_oxsemi_tornado_init,
+               .setup          = pci_default_setup,
+       },
+       {
+               .vendor         = PCI_VENDOR_ID_INTEL,
+               .device         = 0x8811,
+               .init           = pci_eg20t_init,
+       },
+       {
+               .vendor         = PCI_VENDOR_ID_INTEL,
+               .device         = 0x8812,
+               .init           = pci_eg20t_init,
+       },
+       {
+               .vendor         = PCI_VENDOR_ID_INTEL,
+               .device         = 0x8813,
+               .init           = pci_eg20t_init,
+       },
+       {
+               .vendor         = PCI_VENDOR_ID_INTEL,
+               .device         = 0x8814,
+               .init           = pci_eg20t_init,
+       },
+       {
+               .vendor         = 0x10DB,
+               .device         = 0x8027,
+               .init           = pci_eg20t_init,
+       },
+       {
+               .vendor         = 0x10DB,
+               .device         = 0x8028,
+               .init           = pci_eg20t_init,
+       },
+       {
+               .vendor         = 0x10DB,
+               .device         = 0x8029,
+               .init           = pci_eg20t_init,
+       },
+       {
+               .vendor         = 0x10DB,
+               .device         = 0x800C,
+               .init           = pci_eg20t_init,
+       },
+       {
+               .vendor         = 0x10DB,
+               .device         = 0x800D,
+               .init           = pci_eg20t_init,
+       },
+       {
+               .vendor         = 0x10DB,
+               .device         = 0x800D,
+               .init           = pci_eg20t_init,
+       },
+       /*
+        * Cronyx Omega PCI (PLX-chip based)
+        */
+       {
+               .vendor         = PCI_VENDOR_ID_PLX,
+               .device         = PCI_DEVICE_ID_PLX_CRONYX_OMEGA,
+               .subvendor      = PCI_ANY_ID,
+               .subdevice      = PCI_ANY_ID,
+               .setup          = pci_omegapci_setup,
+        },
        /*
         * Default "match everything" terminator entry
         */
@@ -1617,6 +1702,7 @@ enum pci_board_num_t {
        pbn_ADDIDATA_PCIe_4_3906250,
        pbn_ADDIDATA_PCIe_8_3906250,
        pbn_ce4100_1_115200,
+       pbn_omegapci,
 };
 
 /*
@@ -2312,6 +2398,12 @@ static struct pciserial_board pci_boards[] __devinitdata = {
                .base_baud      = 921600,
                .reg_shift      = 2,
        },
+       [pbn_omegapci] = {
+               .flags          = FL_BASE0,
+               .num_ports      = 8,
+               .base_baud      = 115200,
+               .uart_offset    = 0x200,
+       },
 };
 
 static const struct pci_device_id softmodem_blacklist[] = {
@@ -3075,6 +3167,14 @@ static struct pci_device_id serial_pci_tbl[] = {
        {       PCI_VENDOR_ID_MAINPINE, 0x4000, /* IQ Express 8 Port V.34 Super-G3 Fax */
                PCI_VENDOR_ID_MAINPINE, 0x4008, 0, 0,
                pbn_oxsemi_8_4000000 },
+
+       /*
+        * Digi/IBM PCIe 2-port Async EIA-232 Adapter utilizing OxSemi Tornado
+        */
+       {       PCI_VENDOR_ID_DIGI, PCIE_DEVICE_ID_NEO_2_OX_IBM,
+               PCI_SUBVENDOR_ID_IBM, PCI_ANY_ID, 0, 0,
+               pbn_oxsemi_2_4000000 },
+
        /*
         * SBS Technologies, Inc. P-Octal and PMC-OCTPRO cards,
         * from skokodyn@yahoo.com
@@ -3801,6 +3901,12 @@ static struct pci_device_id serial_pci_tbl[] = {
                PCI_ANY_ID,  PCI_ANY_ID, 0, 0,
                pbn_ce4100_1_115200 },
 
+       /*
+        * Cronyx Omega PCI
+        */
+       {       PCI_VENDOR_ID_PLX, PCI_DEVICE_ID_PLX_CRONYX_OMEGA,
+               PCI_ANY_ID, PCI_ANY_ID, 0, 0,
+               pbn_omegapci },
 
        /*
         * These entries match devices with class COMMUNICATION_SERIAL,