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

Configure Feed

Select the types of activity you want to include in your feed.

tty: serial: 8250: Add SystemBase Multi I/O cards

Add support for the SystemBase Multi I/O serial cards, which are
"compatible" with a standard 16550A controllers, except that they need
to have their interrupts enabled in a proprietary way.

Tested with a Delock "Serial PCI Express x1 Card 8x Serial RS-232".

Signed-off-by: Michael Walle <mwalle@kernel.org>
Link: https://patch.msgid.link/20260225081739.946723-1-mwalle@kernel.org
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

authored by

Michael Walle and committed by
Greg Kroah-Hartman
072ce481 37b4cab6

+51
+51
drivers/tty/serial/8250/8250_pci.c
··· 100 100 #define PCI_DEVICE_ID_ADDIDATA_CPCI7420_NG 0x7025 101 101 #define PCI_DEVICE_ID_ADDIDATA_CPCI7300_NG 0x7026 102 102 103 + #define PCI_VENDOR_ID_SYSTEMBASE 0x14a1 104 + 103 105 /* Unknown vendors/cards - this should not be in linux/pci_ids.h */ 104 106 #define PCI_SUBDEVICE_ID_UNKNOWN_0x1584 0x1584 105 107 #define PCI_SUBDEVICE_ID_UNKNOWN_0x1588 0x1588 ··· 2130 2128 return setup_port(priv, port, bar, offset, 0); 2131 2129 } 2132 2130 2131 + #define SB_OPTR_IMR0 0x0c /* Interrupt mask register, p0 to p7 */ 2132 + static int pci_systembase_init(struct pci_dev *dev) 2133 + { 2134 + resource_size_t iobase; 2135 + 2136 + if (!IS_ENABLED(CONFIG_HAS_IOPORT)) 2137 + return serial_8250_warn_need_ioport(dev); 2138 + 2139 + iobase = pci_resource_start(dev, 1); 2140 + 2141 + /* This will support up to 8 ports */ 2142 + outb(0xff, iobase + SB_OPTR_IMR0); 2143 + 2144 + return 0; 2145 + } 2146 + 2147 + static void pci_systembase_exit(struct pci_dev *dev) 2148 + { 2149 + resource_size_t iobase; 2150 + 2151 + if (!IS_ENABLED(CONFIG_HAS_IOPORT)) { 2152 + serial_8250_warn_need_ioport(dev); 2153 + return; 2154 + } 2155 + 2156 + iobase = pci_resource_start(dev, 0); 2157 + outb(0x00, iobase + SB_OPTR_IMR0); 2158 + } 2159 + 2133 2160 /* 2134 2161 * Master list of serial port init/setup/exit quirks. 2135 2162 * This does not describe the general nature of the port. ··· 2506 2475 .subdevice = PCI_ANY_ID, 2507 2476 .init = pci_siig_init, 2508 2477 .setup = pci_siig_setup, 2478 + }, 2479 + /* Systembase */ 2480 + { 2481 + .vendor = PCI_VENDOR_ID_SYSTEMBASE, 2482 + .device = 0x0008, 2483 + .subvendor = PCI_ANY_ID, 2484 + .subdevice = PCI_ANY_ID, 2485 + .init = pci_systembase_init, 2486 + .setup = pci_default_setup, 2487 + .exit = pci_systembase_exit, 2509 2488 }, 2510 2489 /* 2511 2490 * Titan cards ··· 3082 3041 pbn_b0_1_921600, 3083 3042 pbn_b0_2_921600, 3084 3043 pbn_b0_4_921600, 3044 + pbn_b0_8_921600, 3085 3045 3086 3046 pbn_b0_2_1130000, 3087 3047 ··· 3280 3238 [pbn_b0_4_921600] = { 3281 3239 .flags = FL_BASE0, 3282 3240 .num_ports = 4, 3241 + .base_baud = 921600, 3242 + .uart_offset = 8, 3243 + }, 3244 + [pbn_b0_8_921600] = { 3245 + .flags = FL_BASE0, 3246 + .num_ports = 8, 3283 3247 .base_baud = 921600, 3284 3248 .uart_offset = 8, 3285 3249 }, ··· 6199 6151 { PCI_VENDOR_ID_REALTEK, 0x816b, 6200 6152 PCI_ANY_ID, PCI_ANY_ID, 6201 6153 0, 0, pbn_b0_1_115200 }, 6154 + 6155 + /* Systembase Multi I/O cards */ 6156 + { PCI_VDEVICE(SYSTEMBASE, 0x0008), pbn_b0_8_921600 }, 6202 6157 6203 6158 /* Fintek PCI serial cards */ 6204 6159 { PCI_DEVICE(0x1c29, 0x1104), .driver_data = pbn_fintek_4 },