diff options
author | Bjorn Helgaas <bhelgaas@google.com> | 2024-07-19 10:10:28 -0500 |
---|---|---|
committer | Bjorn Helgaas <bhelgaas@google.com> | 2024-07-19 10:10:28 -0500 |
commit | 145eec91b38a56a619fb1edc867f09fecc8dc44f (patch) | |
tree | ebc4ede72c766bfab3497af418408d1969f1e40f /drivers/pci | |
parent | 9965133729ed70293f565d35bf67f6a87fe88c6a (diff) | |
parent | a4bbcac11d3cea85822af8b40daed7e96bca5068 (diff) | |
download | lwn-145eec91b38a56a619fb1edc867f09fecc8dc44f.tar.gz lwn-145eec91b38a56a619fb1edc867f09fecc8dc44f.zip |
Merge branch 'pci/controller/loongson'
* pci/controller/loongson:
PCI: loongson: Enable MSI in LS7A Root Complex
Diffstat (limited to 'drivers/pci')
-rw-r--r-- | drivers/pci/controller/pci-loongson.c | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/drivers/pci/controller/pci-loongson.c b/drivers/pci/controller/pci-loongson.c index 8b34ccff073a..bc630ab8a283 100644 --- a/drivers/pci/controller/pci-loongson.c +++ b/drivers/pci/controller/pci-loongson.c @@ -163,6 +163,19 @@ DECLARE_PCI_FIXUP_FINAL(PCI_VENDOR_ID_LOONGSON, DECLARE_PCI_FIXUP_FINAL(PCI_VENDOR_ID_LOONGSON, DEV_LS7A_HDMI, loongson_pci_pin_quirk); +static void loongson_pci_msi_quirk(struct pci_dev *dev) +{ + u16 val, class = dev->class >> 8; + + if (class != PCI_CLASS_BRIDGE_HOST) + return; + + pci_read_config_word(dev, dev->msi_cap + PCI_MSI_FLAGS, &val); + val |= PCI_MSI_FLAGS_ENABLE; + pci_write_config_word(dev, dev->msi_cap + PCI_MSI_FLAGS, val); +} +DECLARE_PCI_FIXUP_FINAL(PCI_VENDOR_ID_LOONGSON, DEV_LS7A_PCIE_PORT5, loongson_pci_msi_quirk); + static struct loongson_pci *pci_bus_to_loongson_pci(struct pci_bus *bus) { struct pci_config_window *cfg; |