summaryrefslogtreecommitdiff
path: root/hw/xfree86/common/xf86str.h
diff options
context:
space:
mode:
Diffstat (limited to 'hw/xfree86/common/xf86str.h')
-rw-r--r--hw/xfree86/common/xf86str.h52
1 files changed, 23 insertions, 29 deletions
diff --git a/hw/xfree86/common/xf86str.h b/hw/xfree86/common/xf86str.h
index ae9d9aef4..1c78bd341 100644
--- a/hw/xfree86/common/xf86str.h
+++ b/hw/xfree86/common/xf86str.h
@@ -43,11 +43,21 @@
#include "xf86Opt.h"
#include "xf86Pci.h"
-/*
- * memType is of the size of the addressable memory (machine size)
- * usually unsigned long.
+#include <pciaccess.h>
+
+/**
+ * Integer type that is of the size of the addressable memory (machine size).
+ * On most platforms \c uintptr_t will suffice. However, on some mixed
+ * 32-bit / 64-bit platforms, such as 32-bit binaries on 64-bit PowerPC, this
+ * must be 64-bits.
*/
-typedef unsigned long memType;
+#include <inttypes.h>
+#if defined(__powerpc__)
+typedef uint64_t memType;
+#else
+typedef uintptr_t memType;
+#endif
+
/* Video mode flags */
@@ -306,6 +316,9 @@ typedef struct {
int refCount;
} DriverRec1;
+struct _SymTabRec;
+struct _PciChipsets;
+
typedef struct _DriverRec {
int driverVersion;
char * driverName;
@@ -315,6 +328,10 @@ typedef struct _DriverRec {
pointer module;
int refCount;
xorgDriverFuncProc *driverFunc;
+
+ const struct pci_id_match * supported_devices;
+ Bool (*PciProbe)( struct _DriverRec * drv, int entity_num,
+ struct pci_device * dev, intptr_t match_data );
} DriverRec, *DriverPtr;
/*
@@ -430,29 +447,6 @@ typedef struct {
} IDevRec, *IDevPtr;
typedef struct {
- int vendor;
- int chipType;
- int chipRev;
- int subsysVendor;
- int subsysCard;
- int bus;
- int device;
- int func;
- int class;
- int subclass;
- int interface;
- memType memBase[6];
- memType ioBase[6];
- int size[6];
- unsigned char type[6];
- memType biosBase;
- int biosSize;
- pointer thisCard;
- Bool validSize;
- Bool validate;
-} pciVideoRec, *pciVideoPtr;
-
-typedef struct {
int frameX0;
int frameY0;
int virtualX;
@@ -734,7 +728,7 @@ typedef struct {
resRange *resList;
} IsaChipsets;
-typedef struct {
+typedef struct _PciChipsets {
/**
* Key used to match this device with its name in an array of
* \c SymTabRec.
@@ -1063,7 +1057,7 @@ typedef struct {
);
} DGAFunctionRec, *DGAFunctionPtr;
-typedef struct {
+typedef struct _SymTabRec {
int token; /* id of the token */
const char * name; /* token name */
} SymTabRec, *SymTabPtr;