summaryrefslogtreecommitdiff
path: root/overlay/igfx.h
diff options
context:
space:
mode:
Diffstat (limited to 'overlay/igfx.h')
-rw-r--r--overlay/igfx.h15
1 files changed, 15 insertions, 0 deletions
diff --git a/overlay/igfx.h b/overlay/igfx.h
new file mode 100644
index 00000000..36e971ba
--- /dev/null
+++ b/overlay/igfx.h
@@ -0,0 +1,15 @@
+struct igfx_info {
+ int gen;
+};
+
+struct pci_device;
+
+struct pci_device *igfx_get(void);
+const struct igfx_info *igfx_get_info(struct pci_device *pci_dev);
+void *igfx_get_mmio(struct pci_device *pci_dev);
+
+static inline uint32_t
+igfx_read(void *mmio, uint32_t reg)
+{
+ return *(volatile uint32_t *)((volatile char *)mmio + reg);
+}