summaryrefslogtreecommitdiff
path: root/src/include/device
diff options
context:
space:
mode:
Diffstat (limited to 'src/include/device')
-rw-r--r--src/include/device/pci_mmio_cfg.h42
1 files changed, 42 insertions, 0 deletions
diff --git a/src/include/device/pci_mmio_cfg.h b/src/include/device/pci_mmio_cfg.h
index 2e2c19af48..0545001102 100644
--- a/src/include/device/pci_mmio_cfg.h
+++ b/src/include/device/pci_mmio_cfg.h
@@ -70,4 +70,46 @@ void pci_mmio_write_config32(pci_devfn_t dev, unsigned int where, u32 value)
write32(addr, value);
}
+#if IS_ENABLED(CONFIG_MMCONF_SUPPORT)
+
+#ifdef __SIMPLE_DEVICE__
+static __always_inline
+uint8_t pci_read_config8(pci_devfn_t dev, unsigned int where)
+{
+ return pci_mmio_read_config8(dev, where);
+}
+
+static __always_inline
+uint16_t pci_read_config16(pci_devfn_t dev, unsigned int where)
+{
+ return pci_mmio_read_config16(dev, where);
+}
+
+static __always_inline
+uint32_t pci_read_config32(pci_devfn_t dev, unsigned int where)
+{
+ return pci_mmio_read_config32(dev, where);
+}
+
+static __always_inline
+void pci_write_config8(pci_devfn_t dev, unsigned int where, uint8_t value)
+{
+ pci_mmio_write_config8(dev, where, value);
+}
+
+static __always_inline
+void pci_write_config16(pci_devfn_t dev, unsigned int where, uint16_t value)
+{
+ pci_mmio_write_config16(dev, where, value);
+}
+
+static __always_inline
+void pci_write_config32(pci_devfn_t dev, unsigned int where, uint32_t value)
+{
+ pci_mmio_write_config32(dev, where, value);
+}
+#endif /* __SIMPLE_DEVICE__ */
+
+#endif
+
#endif /* _PCI_MMIO_CFG_H */