aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/serial
diff options
context:
space:
mode:
authorRussell King <rmk@dyn-67.arm.linux.org.uk>2005-07-27 06:33:03 -0400
committerRussell King <rmk+kernel@arm.linux.org.uk>2005-07-27 06:33:03 -0400
commit67d74b870725448e0108984eec551609771e6b73 (patch)
tree60c49c145880f16ef62d60861ee0723d268091e2 /drivers/serial
parent72ce9a83331afdd4df944f210a5210bf5acb7d6a (diff)
[SERIAL] Collapse the SIIG quirk entries
Collapse all the SIIG quirk entries into one. SIIG10x cards all have PCI device IDs of 0x10xx, SIIG20x cards all have PCI device IDs of 0x20xx. Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
Diffstat (limited to 'drivers/serial')
-rw-r--r--drivers/serial/8250_pci.c157
1 files changed, 18 insertions, 139 deletions
diff --git a/drivers/serial/8250_pci.c b/drivers/serial/8250_pci.c
index 8f2617206e8f..c43de35a6c9d 100644
--- a/drivers/serial/8250_pci.c
+++ b/drivers/serial/8250_pci.c
@@ -393,6 +393,9 @@ static void __devexit sbs_exit(struct pci_dev *dev)
393 * - 10x cards have control registers in IO and/or memory space; 393 * - 10x cards have control registers in IO and/or memory space;
394 * - 20x cards have control registers in standard PCI configuration space. 394 * - 20x cards have control registers in standard PCI configuration space.
395 * 395 *
396 * Note: all 10x cards have PCI device ids 0x10..
397 * all 20x cards have PCI device ids 0x20..
398 *
396 * There are also Quartet Serial cards which use Oxford Semiconductor 399 * There are also Quartet Serial cards which use Oxford Semiconductor
397 * 16954 quad UART PCI chip clocked by 18.432 MHz quartz. 400 * 16954 quad UART PCI chip clocked by 18.432 MHz quartz.
398 * 401 *
@@ -449,6 +452,19 @@ static int pci_siig20x_init(struct pci_dev *dev)
449 return 0; 452 return 0;
450} 453}
451 454
455static int pci_siig_init(struct pci_dev *dev)
456{
457 unsigned int type = dev->device & 0xff00;
458
459 if (type == 0x1000)
460 return pci_siig10x_init(dev);
461 else if (type == 0x2000)
462 return pci_siig20x_init(dev);
463
464 moan_device("Unknown SIIG card", dev);
465 return -ENODEV;
466}
467
452int pci_siig10x_fn(struct pci_dev *dev, int enable) 468int pci_siig10x_fn(struct pci_dev *dev, int enable)
453{ 469{
454 int ret = 0; 470 int ret = 0;
@@ -759,152 +775,15 @@ static struct pci_serial_quirk pci_serial_quirks[] = {
759 .setup = sbs_setup, 775 .setup = sbs_setup,
760 .exit = __devexit_p(sbs_exit), 776 .exit = __devexit_p(sbs_exit),
761 }, 777 },
762
763 /* 778 /*
764 * SIIG cards. 779 * SIIG cards.
765 * It is not clear whether these could be collapsed.
766 */ 780 */
767 { 781 {
768 .vendor = PCI_VENDOR_ID_SIIG, 782 .vendor = PCI_VENDOR_ID_SIIG,
769 .device = PCI_DEVICE_ID_SIIG_1S_10x_550, 783 .device = PCI_ANY_ID,
770 .subvendor = PCI_ANY_ID,
771 .subdevice = PCI_ANY_ID,
772 .init = pci_siig10x_init,
773 .setup = pci_default_setup,
774 },
775 {
776 .vendor = PCI_VENDOR_ID_SIIG,
777 .device = PCI_DEVICE_ID_SIIG_1S_10x_650,
778 .subvendor = PCI_ANY_ID,
779 .subdevice = PCI_ANY_ID,
780 .init = pci_siig10x_init,
781 .setup = pci_default_setup,
782 },
783 {
784 .vendor = PCI_VENDOR_ID_SIIG,
785 .device = PCI_DEVICE_ID_SIIG_1S_10x_850,
786 .subvendor = PCI_ANY_ID,
787 .subdevice = PCI_ANY_ID,
788 .init = pci_siig10x_init,
789 .setup = pci_default_setup,
790 },
791 {
792 .vendor = PCI_VENDOR_ID_SIIG,
793 .device = PCI_DEVICE_ID_SIIG_2S_10x_550,
794 .subvendor = PCI_ANY_ID,
795 .subdevice = PCI_ANY_ID,
796 .init = pci_siig10x_init,
797 .setup = pci_default_setup,
798 },
799 {
800 .vendor = PCI_VENDOR_ID_SIIG,
801 .device = PCI_DEVICE_ID_SIIG_2S_10x_650,
802 .subvendor = PCI_ANY_ID,
803 .subdevice = PCI_ANY_ID,
804 .init = pci_siig10x_init,
805 .setup = pci_default_setup,
806 },
807 {
808 .vendor = PCI_VENDOR_ID_SIIG,
809 .device = PCI_DEVICE_ID_SIIG_2S_10x_850,
810 .subvendor = PCI_ANY_ID,
811 .subdevice = PCI_ANY_ID,
812 .init = pci_siig10x_init,
813 .setup = pci_default_setup,
814 },
815 {
816 .vendor = PCI_VENDOR_ID_SIIG,
817 .device = PCI_DEVICE_ID_SIIG_4S_10x_550,
818 .subvendor = PCI_ANY_ID,
819 .subdevice = PCI_ANY_ID,
820 .init = pci_siig10x_init,
821 .setup = pci_default_setup,
822 },
823 {
824 .vendor = PCI_VENDOR_ID_SIIG,
825 .device = PCI_DEVICE_ID_SIIG_4S_10x_650,
826 .subvendor = PCI_ANY_ID,
827 .subdevice = PCI_ANY_ID,
828 .init = pci_siig10x_init,
829 .setup = pci_default_setup,
830 },
831 {
832 .vendor = PCI_VENDOR_ID_SIIG,
833 .device = PCI_DEVICE_ID_SIIG_4S_10x_850,
834 .subvendor = PCI_ANY_ID,
835 .subdevice = PCI_ANY_ID,
836 .init = pci_siig10x_init,
837 .setup = pci_default_setup,
838 },
839 {
840 .vendor = PCI_VENDOR_ID_SIIG,
841 .device = PCI_DEVICE_ID_SIIG_1S_20x_550,
842 .subvendor = PCI_ANY_ID,
843 .subdevice = PCI_ANY_ID,
844 .init = pci_siig20x_init,
845 .setup = pci_default_setup,
846 },
847 {
848 .vendor = PCI_VENDOR_ID_SIIG,
849 .device = PCI_DEVICE_ID_SIIG_1S_20x_650,
850 .subvendor = PCI_ANY_ID,
851 .subdevice = PCI_ANY_ID,
852 .init = pci_siig20x_init,
853 .setup = pci_default_setup,
854 },
855 {
856 .vendor = PCI_VENDOR_ID_SIIG,
857 .device = PCI_DEVICE_ID_SIIG_1S_20x_850,
858 .subvendor = PCI_ANY_ID,
859 .subdevice = PCI_ANY_ID,
860 .init = pci_siig20x_init,
861 .setup = pci_default_setup,
862 },
863 {
864 .vendor = PCI_VENDOR_ID_SIIG,
865 .device = PCI_DEVICE_ID_SIIG_2S_20x_550,
866 .subvendor = PCI_ANY_ID,
867 .subdevice = PCI_ANY_ID,
868 .init = pci_siig20x_init,
869 .setup = pci_default_setup,
870 },
871 { .vendor = PCI_VENDOR_ID_SIIG,
872 .device = PCI_DEVICE_ID_SIIG_2S_20x_650,
873 .subvendor = PCI_ANY_ID,
874 .subdevice = PCI_ANY_ID,
875 .init = pci_siig20x_init,
876 .setup = pci_default_setup,
877 },
878 {
879 .vendor = PCI_VENDOR_ID_SIIG,
880 .device = PCI_DEVICE_ID_SIIG_2S_20x_850,
881 .subvendor = PCI_ANY_ID,
882 .subdevice = PCI_ANY_ID,
883 .init = pci_siig20x_init,
884 .setup = pci_default_setup,
885 },
886 {
887 .vendor = PCI_VENDOR_ID_SIIG,
888 .device = PCI_DEVICE_ID_SIIG_4S_20x_550,
889 .subvendor = PCI_ANY_ID,
890 .subdevice = PCI_ANY_ID,
891 .init = pci_siig20x_init,
892 .setup = pci_default_setup,
893 },
894 {
895 .vendor = PCI_VENDOR_ID_SIIG,
896 .device = PCI_DEVICE_ID_SIIG_4S_20x_650,
897 .subvendor = PCI_ANY_ID,
898 .subdevice = PCI_ANY_ID,
899 .init = pci_siig20x_init,
900 .setup = pci_default_setup,
901 },
902 {
903 .vendor = PCI_VENDOR_ID_SIIG,
904 .device = PCI_DEVICE_ID_SIIG_4S_20x_850,
905 .subvendor = PCI_ANY_ID, 784 .subvendor = PCI_ANY_ID,
906 .subdevice = PCI_ANY_ID, 785 .subdevice = PCI_ANY_ID,
907 .init = pci_siig20x_init, 786 .init = pci_siig_init,
908 .setup = pci_default_setup, 787 .setup = pci_default_setup,
909 }, 788 },
910 /* 789 /*