aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/serial
diff options
context:
space:
mode:
authorKrauth.Julien <Krauth.Julien@addi-data.com>2008-02-05 01:27:49 -0500
committerLinus Torvalds <torvalds@woody.linux-foundation.org>2008-02-05 12:44:09 -0500
commit02c9b5cf9acd8a85313b892dc5196ccf133d4884 (patch)
tree7feb5cf1c34ed8cc602171f66cbe9adfe2eb19d3 /drivers/serial
parent1452750afc923b838a76e23150d5f1b4fc718b11 (diff)
serial: add ADDI-DATA GmbH Communication cardsin8250_pci.c and pci_ids.h
Add ADDI-DATA GmbH communication cards to 8250_pci driver. Supported cards are: APCI-7300, APCI-7420, APCI-7500, APCI-7800 APCI-7300-2, APCI-7420-2, APCI-7500-2 APCI-7300-3, APCI-7420-3, APCI-7500-3, APCI-7800-3 [akpm@linux-foundation.org: coding-style fixes] Signed-off-by: Krauth J. <krauth.julien@addi-data.com> Cc: Russell King <rmk@arm.linux.org.uk> Cc: Alan Cox <alan@redhat.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'drivers/serial')
-rw-r--r--drivers/serial/8250_pci.c133
1 files changed, 133 insertions, 0 deletions
diff --git a/drivers/serial/8250_pci.c b/drivers/serial/8250_pci.c
index ceb03c9e749f..0a4ac2b6eb5a 100644
--- a/drivers/serial/8250_pci.c
+++ b/drivers/serial/8250_pci.c
@@ -106,6 +106,32 @@ setup_port(struct serial_private *priv, struct uart_port *port,
106} 106}
107 107
108/* 108/*
109 * ADDI-DATA GmbH communication cards <info@addi-data.com>
110 */
111static int addidata_apci7800_setup(struct serial_private *priv,
112 struct pciserial_board *board,
113 struct uart_port *port, int idx)
114{
115 unsigned int bar = 0, offset = board->first_offset;
116 bar = FL_GET_BASE(board->flags);
117
118 if (idx < 2) {
119 offset += idx * board->uart_offset;
120 } else if ((idx >= 2) && (idx < 4)) {
121 bar += 1;
122 offset += ((idx - 2) * board->uart_offset);
123 } else if ((idx >= 4) && (idx < 6)) {
124 bar += 2;
125 offset += ((idx - 4) * board->uart_offset);
126 } else if (idx >= 6) {
127 bar += 3;
128 offset += ((idx - 6) * board->uart_offset);
129 }
130
131 return setup_port(priv, port, bar, offset, board->reg_shift);
132}
133
134/*
109 * AFAVLAB uses a different mixture of BARs and offsets 135 * AFAVLAB uses a different mixture of BARs and offsets
110 * Not that ugly ;) -- HW 136 * Not that ugly ;) -- HW
111 */ 137 */
@@ -752,6 +778,16 @@ pci_default_setup(struct serial_private *priv, struct pciserial_board *board,
752 */ 778 */
753static struct pci_serial_quirk pci_serial_quirks[] = { 779static struct pci_serial_quirk pci_serial_quirks[] = {
754 /* 780 /*
781 * ADDI-DATA GmbH communication cards <info@addi-data.com>
782 */
783 {
784 .vendor = PCI_VENDOR_ID_ADDIDATA_OLD,
785 .device = PCI_DEVICE_ID_ADDIDATA_APCI7800,
786 .subvendor = PCI_ANY_ID,
787 .subdevice = PCI_ANY_ID,
788 .setup = addidata_apci7800_setup,
789 },
790 /*
755 * AFAVLAB cards - these may be called via parport_serial 791 * AFAVLAB cards - these may be called via parport_serial
756 * It is not clear whether this applies to all products. 792 * It is not clear whether this applies to all products.
757 */ 793 */
@@ -1179,6 +1215,12 @@ static struct pciserial_board pci_boards[] __devinitdata = {
1179 .base_baud = 115200, 1215 .base_baud = 115200,
1180 .uart_offset = 8, 1216 .uart_offset = 8,
1181 }, 1217 },
1218 [pbn_b0_8_115200] = {
1219 .flags = FL_BASE0,
1220 .num_ports = 8,
1221 .base_baud = 115200,
1222 .uart_offset = 8,
1223 },
1182 1224
1183 [pbn_b0_1_921600] = { 1225 [pbn_b0_1_921600] = {
1184 .flags = FL_BASE0, 1226 .flags = FL_BASE0,
@@ -2697,6 +2739,97 @@ static struct pci_device_id serial_pci_tbl[] = {
2697 pbn_pasemi_1682M }, 2739 pbn_pasemi_1682M },
2698 2740
2699 /* 2741 /*
2742 * ADDI-DATA GmbH communication cards <info@addi-data.com>
2743 */
2744 { PCI_VENDOR_ID_ADDIDATA,
2745 PCI_DEVICE_ID_ADDIDATA_APCI7500,
2746 PCI_ANY_ID,
2747 PCI_ANY_ID,
2748 0,
2749 0,
2750 pbn_b0_4_115200 },
2751
2752 { PCI_VENDOR_ID_ADDIDATA,
2753 PCI_DEVICE_ID_ADDIDATA_APCI7420,
2754 PCI_ANY_ID,
2755 PCI_ANY_ID,
2756 0,
2757 0,
2758 pbn_b0_2_115200 },
2759
2760 { PCI_VENDOR_ID_ADDIDATA,
2761 PCI_DEVICE_ID_ADDIDATA_APCI7300,
2762 PCI_ANY_ID,
2763 PCI_ANY_ID,
2764 0,
2765 0,
2766 pbn_b0_1_115200 },
2767
2768 { PCI_VENDOR_ID_ADDIDATA_OLD,
2769 PCI_DEVICE_ID_ADDIDATA_APCI7800,
2770 PCI_ANY_ID,
2771 PCI_ANY_ID,
2772 0,
2773 0,
2774 pbn_b1_8_115200 },
2775
2776 { PCI_VENDOR_ID_ADDIDATA,
2777 PCI_DEVICE_ID_ADDIDATA_APCI7500_2,
2778 PCI_ANY_ID,
2779 PCI_ANY_ID,
2780 0,
2781 0,
2782 pbn_b0_4_115200 },
2783
2784 { PCI_VENDOR_ID_ADDIDATA,
2785 PCI_DEVICE_ID_ADDIDATA_APCI7420_2,
2786 PCI_ANY_ID,
2787 PCI_ANY_ID,
2788 0,
2789 0,
2790 pbn_b0_2_115200 },
2791
2792 { PCI_VENDOR_ID_ADDIDATA,
2793 PCI_DEVICE_ID_ADDIDATA_APCI7300_2,
2794 PCI_ANY_ID,
2795 PCI_ANY_ID,
2796 0,
2797 0,
2798 pbn_b0_1_115200 },
2799
2800 { PCI_VENDOR_ID_ADDIDATA,
2801 PCI_DEVICE_ID_ADDIDATA_APCI7500_3,
2802 PCI_ANY_ID,
2803 PCI_ANY_ID,
2804 0,
2805 0,
2806 pbn_b0_4_115200 },
2807
2808 { PCI_VENDOR_ID_ADDIDATA,
2809 PCI_DEVICE_ID_ADDIDATA_APCI7420_3,
2810 PCI_ANY_ID,
2811 PCI_ANY_ID,
2812 0,
2813 0,
2814 pbn_b0_2_115200 },
2815
2816 { PCI_VENDOR_ID_ADDIDATA,
2817 PCI_DEVICE_ID_ADDIDATA_APCI7300_3,
2818 PCI_ANY_ID,
2819 PCI_ANY_ID,
2820 0,
2821 0,
2822 pbn_b0_1_115200 },
2823
2824 { PCI_VENDOR_ID_ADDIDATA,
2825 PCI_DEVICE_ID_ADDIDATA_APCI7800_3,
2826 PCI_ANY_ID,
2827 PCI_ANY_ID,
2828 0,
2829 0,
2830 pbn_b0_8_115200 },
2831
2832 /*
2700 * These entries match devices with class COMMUNICATION_SERIAL, 2833 * These entries match devices with class COMMUNICATION_SERIAL,
2701 * COMMUNICATION_MODEM or COMMUNICATION_MULTISERIAL 2834 * COMMUNICATION_MODEM or COMMUNICATION_MULTISERIAL
2702 */ 2835 */