summaryrefslogtreecommitdiff
path: root/include/sys/pci.h
diff options
context:
space:
mode:
Diffstat (limited to 'include/sys/pci.h')
-rw-r--r--include/sys/pci.h16
1 files changed, 16 insertions, 0 deletions
diff --git a/include/sys/pci.h b/include/sys/pci.h
new file mode 100644
index 0000000..1451434
--- /dev/null
+++ b/include/sys/pci.h
@@ -0,0 +1,16 @@
+#pragma once
+
+#ifndef PCI_INTERNAL
+ #error "do not include <sys/pci.h>, only use <pci.h>"
+#endif
+
+#include <stdint.h>
+#include <pci.h>
+
+uint32_t pci_sys_rcfg_d(struct pci_device dev, uint8_t offset);
+uint16_t pci_sys_rcfg_w(struct pci_device dev, uint8_t offset);
+uint8_t pci_sys_rcfg_b(struct pci_device dev, uint8_t offset);
+
+void pci_sys_wcfg_d(struct pci_device dev, uint8_t offset, uint32_t dword);
+void pci_sys_wcfg_w(struct pci_device dev, uint8_t offset, uint16_t word);
+void pci_sys_wcfg_b(struct pci_device dev, uint8_t offset, uint8_t byte);