summaryrefslogtreecommitdiff
path: root/hw/xfree86/scanpci/xf86PciData.h
diff options
context:
space:
mode:
Diffstat (limited to 'hw/xfree86/scanpci/xf86PciData.h')
-rw-r--r--hw/xfree86/scanpci/xf86PciData.h51
1 files changed, 51 insertions, 0 deletions
diff --git a/hw/xfree86/scanpci/xf86PciData.h b/hw/xfree86/scanpci/xf86PciData.h
new file mode 100644
index 000000000..0fa21b6db
--- /dev/null
+++ b/hw/xfree86/scanpci/xf86PciData.h
@@ -0,0 +1,51 @@
+/* $XFree86: xc/programs/Xserver/hw/xfree86/scanpci/xf86PciData.h,v 1.2 2002/07/15 20:46:02 dawes Exp $ */
+
+
+
+#ifndef PCI_DATA_H_
+#define PCI_DATA_H_
+
+#define NOVENDOR 0xFFFF
+#define NODEVICE 0xFFFF
+#define NOSUBSYS 0xFFFF
+
+typedef Bool (*ScanPciSetupProcPtr)(void);
+typedef void (*ScanPciCloseProcPtr)(void);
+typedef int (*ScanPciFindByDeviceProcPtr)(
+ unsigned short vendor, unsigned short device,
+ unsigned short svendor, unsigned short subsys,
+ const char **vname, const char **dname,
+ const char **svname, const char **sname);
+typedef int (*ScanPciFindBySubsysProcPtr)(
+ unsigned short svendor, unsigned short subsys,
+ const char **svname, const char **sname);
+typedef CARD32 (*ScanPciFindClassBySubsysProcPtr)(
+ unsigned short vendor, unsigned short subsystem);
+typedef CARD32 (*ScanPciFindClassByDeviceProcPtr)(
+ unsigned short vendor, unsigned short device);
+
+/*
+ * Whoever loads this module needs to define these and initialise them
+ * after loading.
+ */
+extern ScanPciSetupProcPtr xf86SetupPciIds;
+extern ScanPciCloseProcPtr xf86ClosePciIds;
+extern ScanPciFindByDeviceProcPtr xf86FindPciNamesByDevice;
+extern ScanPciFindBySubsysProcPtr xf86FindPciNamesBySubsys;
+extern ScanPciFindClassBySubsysProcPtr xf86FindPciClassBySubsys;
+extern ScanPciFindClassByDeviceProcPtr xf86FindPciClassByDevice;
+
+Bool ScanPciSetupPciIds(void);
+void ScanPciClosePciIds(void);
+int ScanPciFindPciNamesByDevice(unsigned short vendor, unsigned short device,
+ unsigned short svendor, unsigned short subsys,
+ const char **vname, const char **dname,
+ const char **svname, const char **sname);
+int ScanPciFindPciNamesBySubsys(unsigned short svendor, unsigned short subsys,
+ const char **svname, const char **sname);
+CARD32 ScanPciFindPciClassBySubsys(unsigned short vendor,
+ unsigned short subsystem);
+CARD32 ScanPciFindPciClassByDevice(unsigned short vendor,
+ unsigned short device);
+
+#endif