diff options
author | Russell King <rmk+kernel@armlinux.org.uk> | 2022-02-22 16:50:20 +0100 |
---|---|---|
committer | Lorenzo Pieralisi <lorenzo.pieralisi@arm.com> | 2022-02-22 17:04:19 +0100 |
commit | c0bd419732945b38268d56d2e924995fc53c8f7c (patch) | |
tree | bd5d59bf45412bec4774e77a0bcc34ca82fc00df /drivers/pci/pci-bridge-emul.h | |
parent | PCI: pci-bridge-emul: Re-arrange register tests (diff) | |
download | linux-c0bd419732945b38268d56d2e924995fc53c8f7c.tar.xz linux-c0bd419732945b38268d56d2e924995fc53c8f7c.zip |
PCI: pci-bridge-emul: Add support for PCIe extended capabilities
Add support for PCIe extended capabilities, which we just redirect to the
emulating driver.
[pali: Fix writing new value with W1C bits]
Link: https://lore.kernel.org/r/20220222155030.988-3-pali@kernel.org
Signed-off-by: Russell King <rmk+kernel@armlinux.org.uk>
Signed-off-by: Pali Rohár <pali@kernel.org>
Signed-off-by: Marek Behún <kabel@kernel.org>
Signed-off-by: Lorenzo Pieralisi <lorenzo.pieralisi@arm.com>
Diffstat (limited to 'drivers/pci/pci-bridge-emul.h')
-rw-r--r-- | drivers/pci/pci-bridge-emul.h | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/drivers/pci/pci-bridge-emul.h b/drivers/pci/pci-bridge-emul.h index 4953274cac18..6b5f75b2ad02 100644 --- a/drivers/pci/pci-bridge-emul.h +++ b/drivers/pci/pci-bridge-emul.h @@ -90,6 +90,14 @@ struct pci_bridge_emul_ops { */ pci_bridge_emul_read_status_t (*read_pcie)(struct pci_bridge_emul *bridge, int reg, u32 *value); + + /* + * Same as ->read_base(), except it is for reading from the + * PCIe extended capability configuration space. + */ + pci_bridge_emul_read_status_t (*read_ext)(struct pci_bridge_emul *bridge, + int reg, u32 *value); + /* * Called when writing to the regular PCI bridge configuration * space. old is the current value, new is the new value being @@ -105,6 +113,13 @@ struct pci_bridge_emul_ops { */ void (*write_pcie)(struct pci_bridge_emul *bridge, int reg, u32 old, u32 new, u32 mask); + + /* + * Same as ->write_base(), except it is for writing from the + * PCIe extended capability configuration space. + */ + void (*write_ext)(struct pci_bridge_emul *bridge, int reg, + u32 old, u32 new, u32 mask); }; struct pci_bridge_reg_behavior; |