]> git.baikalelectronics.ru Git - kernel.git/commit
PCI: loongson: Work around LS7A incorrect Interrupt Pin registers
authorJianmin Lv <lvjianmin@loongson.cn>
Thu, 14 Jul 2022 12:42:16 +0000 (20:42 +0800)
committerBjorn Helgaas <bhelgaas@google.com>
Thu, 21 Jul 2022 17:42:00 +0000 (12:42 -0500)
commit596ca6b02fad313658db1476a11b78acd25172f1
tree6f7c1ad247f2c92652f70b2064ac1be3abd39b41
parent0da408b4d5a9eefc81ce099d34c25e7d602887aa
PCI: loongson: Work around LS7A incorrect Interrupt Pin registers

Several devices integrated into LS7A report 1 (which means they use
INTA) in their Interrupt Pin registers, but they actually use a different
interrupt.

Add a quirk to override the incorrect Interrupt Pin values.

This is only needed by ACPI-based systems. For DT-based systems,
pci_assign_irq() ignores the Interrupt Pin register except to learn that
the device uses INTx and the host bridge .map_irq() function
(loongson_map_irq()) learns the IRQ mapping via DT and of_irq_parse_pci().

[bhelgaas: drop PCIE_PORT_x, OHCI, GPU since they are function 0 and don't
need the quirk, squash in updates from
https://lore.kernel.org/r/CAAhV-H40_o+9KS1t67O98GusM38pDaiB4bssxd3KQZpAByfnLg@mail.gmail.com]
Link: https://lore.kernel.org/r/20220714124216.1489304-8-chenhuacai@loongson.cn
Signed-off-by: Jianmin Lv <lvjianmin@loongson.cn>
Signed-off-by: Huacai Chen <chenhuacai@loongson.cn>
Signed-off-by: Bjorn Helgaas <bhelgaas@google.com>
drivers/pci/controller/pci-loongson.c