Skip to content

Commit 0bb1f4e

Browse files
chenhuacaiKexyBiscuit
authored andcommitted
AOSCOS: 8250_pci: Add a new PLX9050 serial port card support
[Mingcong Bai: Resolved merge conflicts in drivers/tty/serial/8250/8250_pci.c, applied parts of the patch to drivers/tty/serial/8250/8250_pcilib.c per commit 0348386 ("serial: 8250_pci: Add serial8250_pci_setup_port definition in 8250_pcilib.c").] Signed-off-by: Huacai Chen <[email protected]> Signed-off-by: Mingcong Bai <[email protected]> Signed-off-by: Kexy Biscuit <[email protected]>
1 parent 8e4d295 commit 0bb1f4e

File tree

2 files changed

+25
-0
lines changed

2 files changed

+25
-0
lines changed

drivers/tty/serial/8250/8250_pci.c

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -332,6 +332,12 @@ static int pci_plx9050_init(struct pci_dev *dev)
332332
* deep FIFOs
333333
*/
334334
irq_config = 0x5b;
335+
336+
if ((dev->vendor == PCI_VENDOR_ID_PLX) &&
337+
(dev->device == PCI_DEVICE_ID_PLX_9050) &&
338+
(dev->subsystem_vendor == PCI_VENDOR_ID_PLX) &&
339+
(dev->subsystem_device == PCI_DEVICE_ID_PLX_9050))
340+
irq_config = 0x53;
335341
/*
336342
* enable/disable interrupts
337343
*/
@@ -2398,6 +2404,15 @@ static struct pci_serial_quirk pci_serial_quirks[] = {
23982404
.setup = pci_default_setup,
23992405
.exit = pci_plx9050_exit,
24002406
},
2407+
{
2408+
.vendor = PCI_VENDOR_ID_PLX,
2409+
.device = PCI_DEVICE_ID_PLX_9050,
2410+
.subvendor = PCI_VENDOR_ID_PLX,
2411+
.subdevice = PCI_DEVICE_ID_PLX_9050,
2412+
.init = pci_plx9050_init,
2413+
.setup = pci_default_setup,
2414+
.exit = pci_plx9050_exit,
2415+
},
24012416
{
24022417
.vendor = PCI_VENDOR_ID_PLX,
24032418
.device = PCI_DEVICE_ID_PLX_9050,
@@ -4528,6 +4543,10 @@ static const struct pci_device_id serial_pci_tbl[] = {
45284543
PCI_SUBDEVICE_ID_UNKNOWN_0x1584, 0, 0,
45294544
pbn_b2_4_115200 },
45304545
/* Unknown card - subdevice 0x1588 */
4546+
{ PCI_VENDOR_ID_PLX, PCI_DEVICE_ID_PLX_9050,
4547+
PCI_VENDOR_ID_PLX,
4548+
PCI_DEVICE_ID_PLX_9050, 0, 0,
4549+
pbn_b2_8_921600 },
45314550
{ PCI_VENDOR_ID_PLX, PCI_DEVICE_ID_PLX_9050,
45324551
PCI_VENDOR_ID_PLX,
45334552
PCI_SUBDEVICE_ID_UNKNOWN_0x1588, 0, 0,

drivers/tty/serial/8250/8250_pcilib.c

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,12 @@ int serial8250_pci_setup_port(struct pci_dev *dev, struct uart_8250_port *port,
2727
if (bar >= PCI_STD_NUM_BARS)
2828
return -EINVAL;
2929

30+
if ((dev->vendor == PCI_VENDOR_ID_PLX) &&
31+
(dev->device == PCI_DEVICE_ID_PLX_9050) &&
32+
(dev->subsystem_vendor == PCI_VENDOR_ID_PLX) &&
33+
(dev->subsystem_device == PCI_DEVICE_ID_PLX_9050))
34+
offset += 0x80;
35+
3036
if (pci_resource_flags(dev, bar) & IORESOURCE_MEM) {
3137
if (!pcim_iomap(dev, bar, 0) && !pcim_iomap_table(dev))
3238
return -ENOMEM;

0 commit comments

Comments
 (0)