Skip to content

Commit c768f8c

Browse files
chenhuacaibjorn-helgaas
authored andcommitted
PCI: loongson: Add more devices that need MRRS quirk
Loongson-2K SOC and LS7A2000 chipset add new PCI IDs that need MRRS quirk. Add them. Link: https://lore.kernel.org/r/20230211023321.3530080-1-chenhuacai@loongson.cn Signed-off-by: Huacai Chen <chenhuacai@loongson.cn> Signed-off-by: Bjorn Helgaas <bhelgaas@google.com>
1 parent 8b3517f commit c768f8c

File tree

1 file changed

+24
-9
lines changed

1 file changed

+24
-9
lines changed

drivers/pci/controller/pci-loongson.c

Lines changed: 24 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -15,9 +15,14 @@
1515
#include "../pci.h"
1616

1717
/* Device IDs */
18-
#define DEV_PCIE_PORT_0 0x7a09
19-
#define DEV_PCIE_PORT_1 0x7a19
20-
#define DEV_PCIE_PORT_2 0x7a29
18+
#define DEV_LS2K_PCIE_PORT0 0x1a05
19+
#define DEV_LS7A_PCIE_PORT0 0x7a09
20+
#define DEV_LS7A_PCIE_PORT1 0x7a19
21+
#define DEV_LS7A_PCIE_PORT2 0x7a29
22+
#define DEV_LS7A_PCIE_PORT3 0x7a39
23+
#define DEV_LS7A_PCIE_PORT4 0x7a49
24+
#define DEV_LS7A_PCIE_PORT5 0x7a59
25+
#define DEV_LS7A_PCIE_PORT6 0x7a69
2126

2227
#define DEV_LS2K_APB 0x7a02
2328
#define DEV_LS7A_GMAC 0x7a03
@@ -53,11 +58,11 @@ static void bridge_class_quirk(struct pci_dev *dev)
5358
dev->class = PCI_CLASS_BRIDGE_PCI_NORMAL;
5459
}
5560
DECLARE_PCI_FIXUP_EARLY(PCI_VENDOR_ID_LOONGSON,
56-
DEV_PCIE_PORT_0, bridge_class_quirk);
61+
DEV_LS7A_PCIE_PORT0, bridge_class_quirk);
5762
DECLARE_PCI_FIXUP_EARLY(PCI_VENDOR_ID_LOONGSON,
58-
DEV_PCIE_PORT_1, bridge_class_quirk);
63+
DEV_LS7A_PCIE_PORT1, bridge_class_quirk);
5964
DECLARE_PCI_FIXUP_EARLY(PCI_VENDOR_ID_LOONGSON,
60-
DEV_PCIE_PORT_2, bridge_class_quirk);
65+
DEV_LS7A_PCIE_PORT2, bridge_class_quirk);
6166

6267
static void system_bus_quirk(struct pci_dev *pdev)
6368
{
@@ -87,11 +92,21 @@ static void loongson_mrrs_quirk(struct pci_dev *pdev)
8792
bridge->no_inc_mrrs = 1;
8893
}
8994
DECLARE_PCI_FIXUP_EARLY(PCI_VENDOR_ID_LOONGSON,
90-
DEV_PCIE_PORT_0, loongson_mrrs_quirk);
95+
DEV_LS2K_PCIE_PORT0, loongson_mrrs_quirk);
9196
DECLARE_PCI_FIXUP_EARLY(PCI_VENDOR_ID_LOONGSON,
92-
DEV_PCIE_PORT_1, loongson_mrrs_quirk);
97+
DEV_LS7A_PCIE_PORT0, loongson_mrrs_quirk);
9398
DECLARE_PCI_FIXUP_EARLY(PCI_VENDOR_ID_LOONGSON,
94-
DEV_PCIE_PORT_2, loongson_mrrs_quirk);
99+
DEV_LS7A_PCIE_PORT1, loongson_mrrs_quirk);
100+
DECLARE_PCI_FIXUP_EARLY(PCI_VENDOR_ID_LOONGSON,
101+
DEV_LS7A_PCIE_PORT2, loongson_mrrs_quirk);
102+
DECLARE_PCI_FIXUP_EARLY(PCI_VENDOR_ID_LOONGSON,
103+
DEV_LS7A_PCIE_PORT3, loongson_mrrs_quirk);
104+
DECLARE_PCI_FIXUP_EARLY(PCI_VENDOR_ID_LOONGSON,
105+
DEV_LS7A_PCIE_PORT4, loongson_mrrs_quirk);
106+
DECLARE_PCI_FIXUP_EARLY(PCI_VENDOR_ID_LOONGSON,
107+
DEV_LS7A_PCIE_PORT5, loongson_mrrs_quirk);
108+
DECLARE_PCI_FIXUP_EARLY(PCI_VENDOR_ID_LOONGSON,
109+
DEV_LS7A_PCIE_PORT6, loongson_mrrs_quirk);
95110

96111
static void loongson_pci_pin_quirk(struct pci_dev *pdev)
97112
{

0 commit comments

Comments
 (0)