Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

serial/8250: Add suport for later SUNIX (TIMEDIA) boards.

Add support for later SUNIX (TIMEDIA) Universal PCI Single and Multi-Port
Communications Boards.

These boards have PCI Vendor ID 1fd4 with device ID 1999 but otherwise
appear to be the same as the TIMEDIA boards already supported by 8250_pci
and parport_serial.

Tested with:

a. the two port serial board part number SER5037A,
b. the two port serial and one port parallel board part number
MIO5079A.

Signed-off-by: Stephen Chivers <schivers@csc.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

authored by

Stephen Chivers and committed by
Greg Kroah-Hartman
abd7baca 1651d0a9

+54
+21
drivers/parport/parport_serial.c
··· 63 63 timedia_9079b, 64 64 timedia_9079c, 65 65 wch_ch353_2s1p, 66 + sunix_2s1p, 66 67 }; 67 68 68 69 /* each element directly indexed from enum list, above */ ··· 149 148 /* timedia_9079b */ { 1, { { 2, 3 }, } }, 150 149 /* timedia_9079c */ { 1, { { 2, 3 }, } }, 151 150 /* wch_ch353_2s1p*/ { 1, { { 2, -1}, } }, 151 + /* sunix_2s1p */ { 1, { { 3, -1 }, } }, 152 152 }; 153 + 154 + #define PCI_VENDOR_ID_SUNIX 0x1fd4 155 + #define PCI_DEVICE_ID_SUNIX_1999 0x1999 153 156 154 157 static struct pci_device_id parport_serial_pci_tbl[] = { 155 158 /* PCI cards */ ··· 251 246 { 0x1409, 0x7168, 0x1409, 0xb079, 0, 0, timedia_9079a }, 252 247 { 0x1409, 0x7168, 0x1409, 0xc079, 0, 0, timedia_9079b }, 253 248 { 0x1409, 0x7168, 0x1409, 0xd079, 0, 0, timedia_9079c }, 249 + 254 250 /* WCH CARDS */ 255 251 { 0x4348, 0x7053, 0x4348, 0x3253, 0, 0, wch_ch353_2s1p}, 252 + 253 + /* 254 + * More SUNIX variations. At least one of these has part number 255 + * '5079A but subdevice 0x102. That board reports 0x0708 as 256 + * its PCI Class. 257 + */ 258 + { PCI_VENDOR_ID_SUNIX, PCI_DEVICE_ID_SUNIX_1999, PCI_VENDOR_ID_SUNIX, 259 + 0x0102, 0, 0, sunix_2s1p }, 260 + 256 261 { 0, } /* terminate list */ 257 262 }; 258 263 MODULE_DEVICE_TABLE(pci,parport_serial_pci_tbl); ··· 484 469 .num_ports = 2, 485 470 .base_baud = 115200, 486 471 .uart_offset = 8, 472 + }, 473 + [sunix_2s1p] = { 474 + .flags = FL_BASE0|FL_BASE_BARS, 475 + .num_ports = 2, 476 + .base_baud = 921600, 477 + .uart_offset = 8, 487 478 }, 488 479 }; 489 480
+33
drivers/tty/serial/8250/8250_pci.c
··· 1565 1565 #define PCI_DEVICE_ID_COMMTECH_4222PCIE 0x0022 1566 1566 #define PCI_DEVICE_ID_BROADCOM_TRUMANAGE 0x160a 1567 1567 1568 + #define PCI_VENDOR_ID_SUNIX 0x1fd4 1569 + #define PCI_DEVICE_ID_SUNIX_1999 0x1999 1570 + 1568 1571 1569 1572 /* Unknown vendors/cards - this should not be in linux/pci_ids.h */ 1570 1573 #define PCI_SUBDEVICE_ID_UNKNOWN_0x1584 0x1584 ··· 1961 1958 .device = PCI_ANY_ID, 1962 1959 .subvendor = PCI_ANY_ID, 1963 1960 .subdevice = PCI_ANY_ID, 1961 + .setup = pci_timedia_setup, 1962 + }, 1963 + /* 1964 + * SUNIX (Timedia) cards 1965 + * Do not "probe" for these cards as there is at least one combination 1966 + * card that should be handled by parport_pc that doesn't match the 1967 + * rule in pci_timedia_probe. 1968 + * It is part number is MIO5079A but its subdevice ID is 0x0102. 1969 + * There are some boards with part number SER5037AL that report 1970 + * subdevice ID 0x0002. 1971 + */ 1972 + { 1973 + .vendor = PCI_VENDOR_ID_SUNIX, 1974 + .device = PCI_DEVICE_ID_SUNIX_1999, 1975 + .subvendor = PCI_VENDOR_ID_SUNIX, 1976 + .subdevice = PCI_ANY_ID, 1977 + .init = pci_timedia_init, 1964 1978 .setup = pci_timedia_setup, 1965 1979 }, 1966 1980 /* ··· 4228 4208 pbn_oxsemi }, 4229 4209 { PCI_VENDOR_ID_TIMEDIA, PCI_DEVICE_ID_TIMEDIA_1889, 4230 4210 PCI_VENDOR_ID_TIMEDIA, PCI_ANY_ID, 0, 0, 4211 + pbn_b0_bt_1_921600 }, 4212 + 4213 + /* 4214 + * SUNIX (TIMEDIA) 4215 + */ 4216 + { PCI_VENDOR_ID_SUNIX, PCI_DEVICE_ID_SUNIX_1999, 4217 + PCI_VENDOR_ID_SUNIX, PCI_ANY_ID, 4218 + PCI_CLASS_COMMUNICATION_SERIAL << 8, 0xffff00, 4219 + pbn_b0_bt_1_921600 }, 4220 + 4221 + { PCI_VENDOR_ID_SUNIX, PCI_DEVICE_ID_SUNIX_1999, 4222 + PCI_VENDOR_ID_SUNIX, PCI_ANY_ID, 4223 + PCI_CLASS_COMMUNICATION_MULTISERIAL << 8, 0xffff00, 4231 4224 pbn_b0_bt_1_921600 }, 4232 4225 4233 4226 /*