| .. | .. |
|---|
| 40 | 40 | #define PCI_DEVICE_ID_COMMTECH_4224PCIE 0x0020 |
|---|
| 41 | 41 | #define PCI_DEVICE_ID_COMMTECH_4228PCIE 0x0021 |
|---|
| 42 | 42 | #define PCI_DEVICE_ID_COMMTECH_4222PCIE 0x0022 |
|---|
| 43 | + |
|---|
| 43 | 44 | #define PCI_DEVICE_ID_EXAR_XR17V4358 0x4358 |
|---|
| 44 | 45 | #define PCI_DEVICE_ID_EXAR_XR17V8358 0x8358 |
|---|
| 46 | + |
|---|
| 47 | +#define PCI_SUBDEVICE_ID_USR_2980 0x0128 |
|---|
| 48 | +#define PCI_SUBDEVICE_ID_USR_2981 0x0129 |
|---|
| 49 | + |
|---|
| 50 | +#define PCI_DEVICE_ID_SEALEVEL_710xC 0x1001 |
|---|
| 51 | +#define PCI_DEVICE_ID_SEALEVEL_720xC 0x1002 |
|---|
| 52 | +#define PCI_DEVICE_ID_SEALEVEL_740xC 0x1004 |
|---|
| 53 | +#define PCI_DEVICE_ID_SEALEVEL_780xC 0x1008 |
|---|
| 54 | +#define PCI_DEVICE_ID_SEALEVEL_716xC 0x1010 |
|---|
| 45 | 55 | |
|---|
| 46 | 56 | #define UART_EXAR_INT0 0x80 |
|---|
| 47 | 57 | #define UART_EXAR_8XMODE 0x88 /* 8X sampling rate select */ |
|---|
| .. | .. |
|---|
| 596 | 606 | |
|---|
| 597 | 607 | maxnr = pci_resource_len(pcidev, bar) >> (board->reg_shift + 3); |
|---|
| 598 | 608 | |
|---|
| 599 | | - nr_ports = board->num_ports ? board->num_ports : pcidev->device & 0x0f; |
|---|
| 609 | + if (pcidev->vendor == PCI_VENDOR_ID_ACCESSIO) |
|---|
| 610 | + nr_ports = BIT(((pcidev->device & 0x38) >> 3) - 1); |
|---|
| 611 | + else if (board->num_ports) |
|---|
| 612 | + nr_ports = board->num_ports; |
|---|
| 613 | + else if (pcidev->vendor == PCI_VENDOR_ID_SEALEVEL) |
|---|
| 614 | + nr_ports = pcidev->device & 0xff; |
|---|
| 615 | + else |
|---|
| 616 | + nr_ports = pcidev->device & 0x0f; |
|---|
| 600 | 617 | |
|---|
| 601 | 618 | priv = devm_kzalloc(&pcidev->dev, struct_size(priv, line, nr_ports), GFP_KERNEL); |
|---|
| 602 | 619 | if (!priv) |
|---|
| .. | .. |
|---|
| 695 | 712 | |
|---|
| 696 | 713 | static SIMPLE_DEV_PM_OPS(exar_pci_pm, exar_suspend, exar_resume); |
|---|
| 697 | 714 | |
|---|
| 698 | | -static const struct exar8250_board acces_com_2x = { |
|---|
| 699 | | - .num_ports = 2, |
|---|
| 700 | | - .setup = pci_xr17c154_setup, |
|---|
| 701 | | -}; |
|---|
| 702 | | - |
|---|
| 703 | | -static const struct exar8250_board acces_com_4x = { |
|---|
| 704 | | - .num_ports = 4, |
|---|
| 705 | | - .setup = pci_xr17c154_setup, |
|---|
| 706 | | -}; |
|---|
| 707 | | - |
|---|
| 708 | | -static const struct exar8250_board acces_com_8x = { |
|---|
| 709 | | - .num_ports = 8, |
|---|
| 710 | | - .setup = pci_xr17c154_setup, |
|---|
| 711 | | -}; |
|---|
| 712 | | - |
|---|
| 713 | | - |
|---|
| 714 | 715 | static const struct exar8250_board pbn_fastcom335_2 = { |
|---|
| 715 | 716 | .num_ports = 2, |
|---|
| 716 | 717 | .setup = pci_fastcom335_setup, |
|---|
| .. | .. |
|---|
| 794 | 795 | (kernel_ulong_t)&bd \ |
|---|
| 795 | 796 | } |
|---|
| 796 | 797 | |
|---|
| 798 | +#define USR_DEVICE(devid, sdevid, bd) { \ |
|---|
| 799 | + PCI_DEVICE_SUB( \ |
|---|
| 800 | + PCI_VENDOR_ID_USR, \ |
|---|
| 801 | + PCI_DEVICE_ID_EXAR_##devid, \ |
|---|
| 802 | + PCI_VENDOR_ID_EXAR, \ |
|---|
| 803 | + PCI_SUBDEVICE_ID_USR_##sdevid), 0, 0, \ |
|---|
| 804 | + (kernel_ulong_t)&bd \ |
|---|
| 805 | + } |
|---|
| 806 | + |
|---|
| 797 | 807 | static const struct pci_device_id exar_pci_tbl[] = { |
|---|
| 798 | | - EXAR_DEVICE(ACCESSIO, COM_2S, acces_com_2x), |
|---|
| 799 | | - EXAR_DEVICE(ACCESSIO, COM_4S, acces_com_4x), |
|---|
| 800 | | - EXAR_DEVICE(ACCESSIO, COM_8S, acces_com_8x), |
|---|
| 801 | | - EXAR_DEVICE(ACCESSIO, COM232_8, acces_com_8x), |
|---|
| 802 | | - EXAR_DEVICE(ACCESSIO, COM_2SM, acces_com_2x), |
|---|
| 803 | | - EXAR_DEVICE(ACCESSIO, COM_4SM, acces_com_4x), |
|---|
| 804 | | - EXAR_DEVICE(ACCESSIO, COM_8SM, acces_com_8x), |
|---|
| 808 | + EXAR_DEVICE(ACCESSIO, COM_2S, pbn_exar_XR17C15x), |
|---|
| 809 | + EXAR_DEVICE(ACCESSIO, COM_4S, pbn_exar_XR17C15x), |
|---|
| 810 | + EXAR_DEVICE(ACCESSIO, COM_8S, pbn_exar_XR17C15x), |
|---|
| 811 | + EXAR_DEVICE(ACCESSIO, COM232_8, pbn_exar_XR17C15x), |
|---|
| 812 | + EXAR_DEVICE(ACCESSIO, COM_2SM, pbn_exar_XR17C15x), |
|---|
| 813 | + EXAR_DEVICE(ACCESSIO, COM_4SM, pbn_exar_XR17C15x), |
|---|
| 814 | + EXAR_DEVICE(ACCESSIO, COM_8SM, pbn_exar_XR17C15x), |
|---|
| 805 | 815 | |
|---|
| 806 | 816 | CONNECT_DEVICE(XR17C152, UART_2_232, pbn_connect), |
|---|
| 807 | 817 | CONNECT_DEVICE(XR17C154, UART_4_232, pbn_connect), |
|---|
| .. | .. |
|---|
| 817 | 827 | CONNECT_DEVICE(XR17C158, UART_8_485, pbn_connect), |
|---|
| 818 | 828 | |
|---|
| 819 | 829 | IBM_DEVICE(XR17C152, SATURN_SERIAL_ONE_PORT, pbn_exar_ibm_saturn), |
|---|
| 830 | + |
|---|
| 831 | + /* USRobotics USR298x-OEM PCI Modems */ |
|---|
| 832 | + USR_DEVICE(XR17C152, 2980, pbn_exar_XR17C15x), |
|---|
| 833 | + USR_DEVICE(XR17C152, 2981, pbn_exar_XR17C15x), |
|---|
| 820 | 834 | |
|---|
| 821 | 835 | /* Exar Corp. XR17C15[248] Dual/Quad/Octal UART */ |
|---|
| 822 | 836 | EXAR_DEVICE(EXAR, XR17C152, pbn_exar_XR17C15x), |
|---|
| .. | .. |
|---|
| 837 | 851 | EXAR_DEVICE(COMMTECH, 4224PCI335, pbn_fastcom335_4), |
|---|
| 838 | 852 | EXAR_DEVICE(COMMTECH, 2324PCI335, pbn_fastcom335_4), |
|---|
| 839 | 853 | EXAR_DEVICE(COMMTECH, 2328PCI335, pbn_fastcom335_8), |
|---|
| 854 | + |
|---|
| 855 | + EXAR_DEVICE(SEALEVEL, 710xC, pbn_exar_XR17V35x), |
|---|
| 856 | + EXAR_DEVICE(SEALEVEL, 720xC, pbn_exar_XR17V35x), |
|---|
| 857 | + EXAR_DEVICE(SEALEVEL, 740xC, pbn_exar_XR17V35x), |
|---|
| 858 | + EXAR_DEVICE(SEALEVEL, 780xC, pbn_exar_XR17V35x), |
|---|
| 859 | + EXAR_DEVICE(SEALEVEL, 716xC, pbn_exar_XR17V35x), |
|---|
| 840 | 860 | { 0, } |
|---|
| 841 | 861 | }; |
|---|
| 842 | 862 | MODULE_DEVICE_TABLE(pci, exar_pci_tbl); |
|---|