pci-v5.17-fixes-2

-----BEGIN PGP SIGNATURE-----
 
 iQJIBAABCgAyFiEEgMe7l+5h9hnxdsnuWYigwDrT+vwFAmH1YNoUHGJoZWxnYWFz
 QGdvb2dsZS5jb20ACgkQWYigwDrT+vwvqxAAmQTT836BntTKZdsXzFeDoA5yHmFk
 NAZ9f2Szf10DZCPXBTP8DVVj5PxXSdg/2/zO04w+gER/DPbybprN/HmCUkfRxIMD
 Bqy3DqQGJfAqaBV0sPs00SGcLP9fXci+GAbVZxlwnbDZ144NDteKYQjVgQXpu0pl
 HU4N5cm+xpI3jWV2X5wgDBqEPH3zG5eZSJAq9xD1LBKdWES8IhTsFBdPU4XaNnEp
 VbxgIKziTQ6Z8r1Vow3TFtYW4GlvemIhZ50uw83cL/X5Anh14g5kjSccESholn46
 MYyaB+8xD5zI6d4W8Rd3ZcjdLwdOf0vgYerzbjPXD3RBrWJ0ZXScjYL8QUG4kFcW
 20erDKA+gjMM4Y7sVdW57tSlFGmxD8zK2mD4unJWUJXiioLUCd8rsSreaEsfu1mL
 Hw/EjLzP6nCK3nG7eBIwCVpP/hkOvwRN+w+0os9/lLjVTfmjRvhGIobuy7U9uwVI
 vUR7+RdDiySKJkrdWTY1MdcFPzo7OhQI62IRrPqM3kfziM6Omim32Shv/2xmAO9O
 jP2gQL8e/811BRnfN0KX9UvOfZRKgsmFJtpH/AvjJeOv+VKNrceBeBbX85f/6Dnf
 Pv7HFfTsHzk0n1TS1iOU7KyeYLJHahpqAg2kVZNsr5Gv4iAyYZhsaOWFQl2K5S+0
 AoRa3v0DtVO5wmA=
 =f9cu
 -----END PGP SIGNATURE-----

Merge tag 'pci-v5.17-fixes-2' of git://git.kernel.org/pub/scm/linux/kernel/git/helgaas/pci

Pull pci fixes from Bjorn Helgaas:

 - Fix compilation warnings in new mt7621 driver (Sergio Paracuellos)

 - Restore the sysfs "rom" file for VGA shadow ROMs, which was broken
   when converting "rom" to be a static attribute (Bjorn Helgaas)

* tag 'pci-v5.17-fixes-2' of git://git.kernel.org/pub/scm/linux/kernel/git/helgaas/pci:
  PCI/sysfs: Find shadow ROM before static attribute initialization
  PCI: mt7621: Remove unused function pcie_rmw()
  PCI: mt7621: Drop of_match_ptr() to avoid unused variable
This commit is contained in:
Linus Torvalds 2022-01-29 19:05:47 +02:00
commit f8c7e4ede4
4 changed files with 9 additions and 19 deletions

View File

@ -76,5 +76,5 @@ static void pci_fixup_video(struct pci_dev *pdev)
}
}
}
DECLARE_PCI_FIXUP_CLASS_FINAL(PCI_ANY_ID, PCI_ANY_ID,
PCI_CLASS_DISPLAY_VGA, 8, pci_fixup_video);
DECLARE_PCI_FIXUP_CLASS_HEADER(PCI_ANY_ID, PCI_ANY_ID,
PCI_CLASS_DISPLAY_VGA, 8, pci_fixup_video);

View File

@ -3,7 +3,7 @@
#include <linux/pci.h>
#include <loongson.h>
static void pci_fixup_radeon(struct pci_dev *pdev)
static void pci_fixup_video(struct pci_dev *pdev)
{
struct resource *res = &pdev->resource[PCI_ROM_RESOURCE];
@ -22,8 +22,7 @@ static void pci_fixup_radeon(struct pci_dev *pdev)
res->flags = IORESOURCE_MEM | IORESOURCE_ROM_SHADOW |
IORESOURCE_PCI_FIXED;
dev_info(&pdev->dev, "BAR %d: assigned %pR for Radeon ROM\n",
PCI_ROM_RESOURCE, res);
dev_info(&pdev->dev, "Video device with shadowed ROM at %pR\n", res);
}
DECLARE_PCI_FIXUP_CLASS_FINAL(PCI_VENDOR_ID_ATI, 0x9615,
PCI_CLASS_DISPLAY_VGA, 8, pci_fixup_radeon);
DECLARE_PCI_FIXUP_CLASS_HEADER(PCI_VENDOR_ID_ATI, 0x9615,
PCI_CLASS_DISPLAY_VGA, 8, pci_fixup_video);

View File

@ -353,8 +353,8 @@ static void pci_fixup_video(struct pci_dev *pdev)
}
}
}
DECLARE_PCI_FIXUP_CLASS_FINAL(PCI_ANY_ID, PCI_ANY_ID,
PCI_CLASS_DISPLAY_VGA, 8, pci_fixup_video);
DECLARE_PCI_FIXUP_CLASS_HEADER(PCI_ANY_ID, PCI_ANY_ID,
PCI_CLASS_DISPLAY_VGA, 8, pci_fixup_video);
static const struct dmi_system_id msi_k8t_dmi_table[] = {

View File

@ -109,15 +109,6 @@ static inline void pcie_write(struct mt7621_pcie *pcie, u32 val, u32 reg)
writel_relaxed(val, pcie->base + reg);
}
static inline void pcie_rmw(struct mt7621_pcie *pcie, u32 reg, u32 clr, u32 set)
{
u32 val = readl_relaxed(pcie->base + reg);
val &= ~clr;
val |= set;
writel_relaxed(val, pcie->base + reg);
}
static inline u32 pcie_port_read(struct mt7621_pcie_port *port, u32 reg)
{
return readl_relaxed(port->base + reg);
@ -557,7 +548,7 @@ static struct platform_driver mt7621_pcie_driver = {
.remove = mt7621_pcie_remove,
.driver = {
.name = "mt7621-pci",
.of_match_table = of_match_ptr(mt7621_pcie_ids),
.of_match_table = mt7621_pcie_ids,
},
};
builtin_platform_driver(mt7621_pcie_driver);