aboutsummaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorGavin Shan <gwshan@linux.vnet.ibm.com>2016-08-11 12:12:36 +1000
committerStewart Smith <stewart@linux.vnet.ibm.com>2016-09-02 15:27:39 +1000
commitb9801047a12c27d1d205ba5c250a9c399a9f8fd1 (patch)
treed932946f2daaba8a0f4b3f893206146f1e828f60 /include
parentac83440c8241902d2c32410050a2fd1e96b20fcf (diff)
downloadskiboot-b9801047a12c27d1d205ba5c250a9c399a9f8fd1.zip
skiboot-b9801047a12c27d1d205ba5c250a9c399a9f8fd1.tar.gz
skiboot-b9801047a12c27d1d205ba5c250a9c399a9f8fd1.tar.bz2
core/pci: Improve PCI config register filter
This improves PCI config register filter so that it can be reused by PCI virtual device in subsequent patch: * First argument to pci_cfg_reg_func() is changed to "void *". It allows to accept variable data types including PCI virtual device in future. * Return value from pci_cfg_reg_func() to be used by PCI virtual device in future. * Shortened name of function phb3_pcicfg_filter_rc_pref_window(). Signed-off-by: Gavin Shan <gwshan@linux.vnet.ibm.com> Reviewed-by: Russell Currey <ruscur@russell.cc> Signed-off-by: Stewart Smith <stewart@linux.vnet.ibm.com>
Diffstat (limited to 'include')
-rw-r--r--include/pci.h8
1 files changed, 4 insertions, 4 deletions
diff --git a/include/pci.h b/include/pci.h
index 61ece8f..dfc1b49 100644
--- a/include/pci.h
+++ b/include/pci.h
@@ -25,10 +25,10 @@
struct pci_device;
struct pci_cfg_reg_filter;
-typedef void (*pci_cfg_reg_func)(struct pci_device *pd,
- struct pci_cfg_reg_filter *pcrf,
- uint32_t offset, uint32_t len,
- uint32_t *data, bool write);
+typedef int64_t (*pci_cfg_reg_func)(void *dev,
+ struct pci_cfg_reg_filter *pcrf,
+ uint32_t offset, uint32_t len,
+ uint32_t *data, bool write);
struct pci_cfg_reg_filter {
uint32_t flags;
#define PCI_REG_FLAG_READ 0x1