aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/serial/8250_pci.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/serial/8250_pci.c')
-rw-r--r--drivers/serial/8250_pci.c51
1 files changed, 32 insertions, 19 deletions
diff --git a/drivers/serial/8250_pci.c b/drivers/serial/8250_pci.c
index 864ef859be56..851e4839d6d9 100644
--- a/drivers/serial/8250_pci.c
+++ b/drivers/serial/8250_pci.c
@@ -134,7 +134,7 @@ afavlab_setup(struct serial_private *priv, struct pciserial_board *board,
134 * and Keystone have one Diva chip with 3 UARTs. Some later machines have 134 * and Keystone have one Diva chip with 3 UARTs. Some later machines have
135 * one Diva chip, but it has been expanded to 5 UARTs. 135 * one Diva chip, but it has been expanded to 5 UARTs.
136 */ 136 */
137static int __devinit pci_hp_diva_init(struct pci_dev *dev) 137static int pci_hp_diva_init(struct pci_dev *dev)
138{ 138{
139 int rc = 0; 139 int rc = 0;
140 140
@@ -194,7 +194,7 @@ pci_hp_diva_setup(struct serial_private *priv, struct pciserial_board *board,
194/* 194/*
195 * Added for EKF Intel i960 serial boards 195 * Added for EKF Intel i960 serial boards
196 */ 196 */
197static int __devinit pci_inteli960ni_init(struct pci_dev *dev) 197static int pci_inteli960ni_init(struct pci_dev *dev)
198{ 198{
199 unsigned long oldval; 199 unsigned long oldval;
200 200
@@ -216,7 +216,7 @@ static int __devinit pci_inteli960ni_init(struct pci_dev *dev)
216 * seems to be mainly needed on card using the PLX which also use I/O 216 * seems to be mainly needed on card using the PLX which also use I/O
217 * mapped memory. 217 * mapped memory.
218 */ 218 */
219static int __devinit pci_plx9050_init(struct pci_dev *dev) 219static int pci_plx9050_init(struct pci_dev *dev)
220{ 220{
221 u8 irq_config; 221 u8 irq_config;
222 void __iomem *p; 222 void __iomem *p;
@@ -314,7 +314,7 @@ sbs_setup(struct serial_private *priv, struct pciserial_board *board,
314/* global control register offset for SBS PMC-OctalPro */ 314/* global control register offset for SBS PMC-OctalPro */
315#define OCT_REG_CR_OFF 0x500 315#define OCT_REG_CR_OFF 0x500
316 316
317static int __devinit sbs_init(struct pci_dev *dev) 317static int sbs_init(struct pci_dev *dev)
318{ 318{
319 u8 __iomem *p; 319 u8 __iomem *p;
320 320
@@ -458,11 +458,11 @@ static int pci_siig_setup(struct serial_private *priv,
458 * growing *huge*, we use this function to collapse some 70 entries 458 * growing *huge*, we use this function to collapse some 70 entries
459 * in the PCI table into one, for sanity's and compactness's sake. 459 * in the PCI table into one, for sanity's and compactness's sake.
460 */ 460 */
461static unsigned short timedia_single_port[] = { 461static const unsigned short timedia_single_port[] = {
462 0x4025, 0x4027, 0x4028, 0x5025, 0x5027, 0 462 0x4025, 0x4027, 0x4028, 0x5025, 0x5027, 0
463}; 463};
464 464
465static unsigned short timedia_dual_port[] = { 465static const unsigned short timedia_dual_port[] = {
466 0x0002, 0x4036, 0x4037, 0x4038, 0x4078, 0x4079, 0x4085, 466 0x0002, 0x4036, 0x4037, 0x4038, 0x4078, 0x4079, 0x4085,
467 0x4088, 0x4089, 0x5037, 0x5078, 0x5079, 0x5085, 0x6079, 467 0x4088, 0x4089, 0x5037, 0x5078, 0x5079, 0x5085, 0x6079,
468 0x7079, 0x8079, 0x8137, 0x8138, 0x8237, 0x8238, 0x9079, 468 0x7079, 0x8079, 0x8137, 0x8138, 0x8237, 0x8238, 0x9079,
@@ -470,35 +470,34 @@ static unsigned short timedia_dual_port[] = {
470 0xD079, 0 470 0xD079, 0
471}; 471};
472 472
473static unsigned short timedia_quad_port[] = { 473static const unsigned short timedia_quad_port[] = {
474 0x4055, 0x4056, 0x4095, 0x4096, 0x5056, 0x8156, 0x8157, 474 0x4055, 0x4056, 0x4095, 0x4096, 0x5056, 0x8156, 0x8157,
475 0x8256, 0x8257, 0x9056, 0x9156, 0x9157, 0x9158, 0x9159, 475 0x8256, 0x8257, 0x9056, 0x9156, 0x9157, 0x9158, 0x9159,
476 0x9256, 0x9257, 0xA056, 0xA157, 0xA158, 0xA159, 0xB056, 476 0x9256, 0x9257, 0xA056, 0xA157, 0xA158, 0xA159, 0xB056,
477 0xB157, 0 477 0xB157, 0
478}; 478};
479 479
480static unsigned short timedia_eight_port[] = { 480static const unsigned short timedia_eight_port[] = {
481 0x4065, 0x4066, 0x5065, 0x5066, 0x8166, 0x9066, 0x9166, 481 0x4065, 0x4066, 0x5065, 0x5066, 0x8166, 0x9066, 0x9166,
482 0x9167, 0x9168, 0xA066, 0xA167, 0xA168, 0 482 0x9167, 0x9168, 0xA066, 0xA167, 0xA168, 0
483}; 483};
484 484
485static const struct timedia_struct { 485static const struct timedia_struct {
486 int num; 486 int num;
487 unsigned short *ids; 487 const unsigned short *ids;
488} timedia_data[] = { 488} timedia_data[] = {
489 { 1, timedia_single_port }, 489 { 1, timedia_single_port },
490 { 2, timedia_dual_port }, 490 { 2, timedia_dual_port },
491 { 4, timedia_quad_port }, 491 { 4, timedia_quad_port },
492 { 8, timedia_eight_port }, 492 { 8, timedia_eight_port }
493 { 0, NULL }
494}; 493};
495 494
496static int __devinit pci_timedia_init(struct pci_dev *dev) 495static int pci_timedia_init(struct pci_dev *dev)
497{ 496{
498 unsigned short *ids; 497 const unsigned short *ids;
499 int i, j; 498 int i, j;
500 499
501 for (i = 0; timedia_data[i].num; i++) { 500 for (i = 0; i < ARRAY_SIZE(timedia_data); i++) {
502 ids = timedia_data[i].ids; 501 ids = timedia_data[i].ids;
503 for (j = 0; ids[j]; j++) 502 for (j = 0; ids[j]; j++)
504 if (dev->subsystem_device == ids[j]) 503 if (dev->subsystem_device == ids[j])
@@ -566,13 +565,13 @@ titan_400l_800l_setup(struct serial_private *priv,
566 return setup_port(priv, port, bar, offset, board->reg_shift); 565 return setup_port(priv, port, bar, offset, board->reg_shift);
567} 566}
568 567
569static int __devinit pci_xircom_init(struct pci_dev *dev) 568static int pci_xircom_init(struct pci_dev *dev)
570{ 569{
571 msleep(100); 570 msleep(100);
572 return 0; 571 return 0;
573} 572}
574 573
575static int __devinit pci_netmos_init(struct pci_dev *dev) 574static int pci_netmos_init(struct pci_dev *dev)
576{ 575{
577 /* subdevice 0x00PS means <P> parallel, <S> serial */ 576 /* subdevice 0x00PS means <P> parallel, <S> serial */
578 unsigned int num_serial = dev->subsystem_device & 0xf; 577 unsigned int num_serial = dev->subsystem_device & 0xf;
@@ -622,7 +621,7 @@ pci_default_setup(struct serial_private *priv, struct pciserial_board *board,
622 */ 621 */
623static struct pci_serial_quirk pci_serial_quirks[] = { 622static struct pci_serial_quirk pci_serial_quirks[] = {
624 /* 623 /*
625 * AFAVLAB cards. 624 * AFAVLAB cards - these may be called via parport_serial
626 * It is not clear whether this applies to all products. 625 * It is not clear whether this applies to all products.
627 */ 626 */
628 { 627 {
@@ -754,7 +753,7 @@ static struct pci_serial_quirk pci_serial_quirks[] = {
754 .exit = __devexit_p(sbs_exit), 753 .exit = __devexit_p(sbs_exit),
755 }, 754 },
756 /* 755 /*
757 * SIIG cards. 756 * SIIG cards - these may be called via parport_serial
758 */ 757 */
759 { 758 {
760 .vendor = PCI_VENDOR_ID_SIIG, 759 .vendor = PCI_VENDOR_ID_SIIG,
@@ -811,7 +810,7 @@ static struct pci_serial_quirk pci_serial_quirks[] = {
811 .setup = pci_default_setup, 810 .setup = pci_default_setup,
812 }, 811 },
813 /* 812 /*
814 * Netmos cards 813 * Netmos cards - these may be called via parport_serial
815 */ 814 */
816 { 815 {
817 .vendor = PCI_VENDOR_ID_NETMOS, 816 .vendor = PCI_VENDOR_ID_NETMOS,
@@ -936,6 +935,7 @@ enum pci_board_num_t {
936 pbn_b1_8_1382400, 935 pbn_b1_8_1382400,
937 936
938 pbn_b2_1_115200, 937 pbn_b2_1_115200,
938 pbn_b2_2_115200,
939 pbn_b2_8_115200, 939 pbn_b2_8_115200,
940 940
941 pbn_b2_1_460800, 941 pbn_b2_1_460800,
@@ -1243,6 +1243,12 @@ static struct pciserial_board pci_boards[] __devinitdata = {
1243 .base_baud = 115200, 1243 .base_baud = 115200,
1244 .uart_offset = 8, 1244 .uart_offset = 8,
1245 }, 1245 },
1246 [pbn_b2_2_115200] = {
1247 .flags = FL_BASE2,
1248 .num_ports = 2,
1249 .base_baud = 115200,
1250 .uart_offset = 8,
1251 },
1246 [pbn_b2_8_115200] = { 1252 [pbn_b2_8_115200] = {
1247 .flags = FL_BASE2, 1253 .flags = FL_BASE2,
1248 .num_ports = 8, 1254 .num_ports = 8,
@@ -2340,6 +2346,13 @@ static struct pci_device_id serial_pci_tbl[] = {
2340 pbn_b0_1_115200 }, 2346 pbn_b0_1_115200 },
2341 2347
2342 /* 2348 /*
2349 * IntaShield IS-200
2350 */
2351 { PCI_VENDOR_ID_INTASHIELD, PCI_DEVICE_ID_INTASHIELD_IS200,
2352 PCI_ANY_ID, PCI_ANY_ID, 0, 0, /* 135a.0811 */
2353 pbn_b2_2_115200 },
2354
2355 /*
2343 * These entries match devices with class COMMUNICATION_SERIAL, 2356 * These entries match devices with class COMMUNICATION_SERIAL,
2344 * COMMUNICATION_MODEM or COMMUNICATION_MULTISERIAL 2357 * COMMUNICATION_MODEM or COMMUNICATION_MULTISERIAL
2345 */ 2358 */