Skip to content

Commit

Permalink
DEEPIN: pci: limit CFG0/1 mode detection to CONFIG_LOONGARCH
Browse files Browse the repository at this point in the history
Commit 620c10b ("PCI: Check if the pci controller can use both CFG0
and CFG1 mode to access configuration space") broke PCIe resource probing
on Loongson 3A4000. Limit the CFG0 mode detection to CONFIG_LOONGARCH to
make sure that MIPS platforms are not affected.

Fixes: 620c10b ("PCI: Check if the pci controller can use both CFG0 and CFG1 mode to access configuration space")
Signed-off-by: Mingcong Bai <[email protected]>
  • Loading branch information
MingcongBai committed Dec 23, 2024
1 parent e64cae8 commit 4582422
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions drivers/pci/controller/pci-loongson.c
Original file line number Diff line number Diff line change
Expand Up @@ -484,7 +484,9 @@ static int loongson_pci_probe(struct platform_device *pdev)
}

if (priv->data->flags & FLAG_CFG1) {
#ifdef CONFIG_LOONGARCH
if (priv->cfg0_base)
#endif
num = 1;
regs = platform_get_resource(pdev, IORESOURCE_MEM, num);
if (!regs)
Expand Down

0 comments on commit 4582422

Please sign in to comment.