[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[cdi-devel] [PATCH] Direct access to PCI configuration space

From: Max Reitz <max@xxxxxxxxxx>

+ Some drivers need direct access to the PCI configuration space

Signed-off-by: Max Reitz <max@xxxxxxxxxx>
 include/cdi/pci.h |   12 ++++++++++++
 1 files changed, 12 insertions(+), 0 deletions(-)

diff --git a/include/cdi/pci.h b/include/cdi/pci.h
index 6b1e6f0..4bf38ea 100644
--- a/include/cdi/pci.h
+++ b/include/cdi/pci.h
@@ -87,6 +87,18 @@ void cdi_pci_alloc_memory(struct cdi_pci_device* device);
 void cdi_pci_free_memory(struct cdi_pci_device* device);
+ * Signalisiert CDI-Treibern Zugriff auf den PCI-Konfigurationsraum
+ */
+uint8_t cdi_pci_config_inb(struct cdi_pci_device *device, int offset);
+uint16_t cdi_pci_config_inw(struct cdi_pci_device *device, int offset);
+uint32_t cdi_pci_config_inl(struct cdi_pci_device *device, int offset);
+void cdi_pci_config_outb(struct cdi_pci_device *device, int offset, uint8_t value);
+void cdi_pci_config_outw(struct cdi_pci_device *device, int offset, uint16_t value);
+void cdi_pci_config_outl(struct cdi_pci_device *device, int offset, uint32_t value);
 #ifdef __cplusplus
 }; // extern "C"