From bba6ebb2daac17bd2268c97b7255e477c2b15b52 Mon Sep 17 00:00:00 2001 From: Rabeeh Khoury Date: Wed, 26 Feb 2020 17:57:54 +0200 Subject: [PATCH] pci: spr2803: quirk to fix class ID spr2803 class is 0x0, this quirk modifies that to multimedia class in order to allocate memory to it's bars. Signed-off-by: Rabeeh Khoury --- drivers/pci/quirks.c | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/drivers/pci/quirks.c b/drivers/pci/quirks.c index 28c64f84bfe7..4ddf7e43d531 100644 --- a/drivers/pci/quirks.c +++ b/drivers/pci/quirks.c @@ -3068,6 +3068,18 @@ static void fixup_ti816x_class(struct pci_dev *dev) DECLARE_PCI_FIXUP_CLASS_EARLY(PCI_VENDOR_ID_TI, 0xb800, PCI_CLASS_NOT_DEFINED, 8, fixup_ti816x_class); +static void fixup_spr2803_class(struct pci_dev *dev) +{ + u32 class = dev->class; + + /* spr2803 does not have class code */ + dev->class = PCI_CLASS_MULTIMEDIA_VIDEO << 8; + pci_info(dev, "PCI class overridden (%#08x -> %#08x)\n", + class, dev->class); +} +DECLARE_PCI_FIXUP_CLASS_EARLY(0x1e00, 0x2803, + PCI_CLASS_NOT_DEFINED, 8, fixup_spr2803_class); + /* * Some PCIe devices do not work reliably with the claimed maximum * payload size supported. -- 2.17.1