diff options
author | Michel Dänzer <michel@tungstengraphics.com> | 2007-10-04 11:32:48 +0200 |
---|---|---|
committer | Michel Dänzer <michel@tungstengraphics.com> | 2007-10-04 11:32:48 +0200 |
commit | 1110957ba703475847b8e72023c6edcbd1068aef (patch) | |
tree | d07cfa64a7d9899a1057dd15c8a2293c51245a94 /src/atipcirename.h | |
parent | 7addf41885ec5658f531624a9c24ea5bd7d22d19 (diff) |
radeon: Fix for pci-rework.
Surprisingly easy, thanks to George's pci-rework changes.
Diffstat (limited to 'src/atipcirename.h')
-rw-r--r-- | src/atipcirename.h | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/src/atipcirename.h b/src/atipcirename.h index e30d10c2..5aa6b808 100644 --- a/src/atipcirename.h +++ b/src/atipcirename.h @@ -41,6 +41,9 @@ enum region_type { #define PCI_DEV_DEVICE_ID(_pcidev) ((_pcidev)->chipType) #define PCI_DEV_REVISION(_pcidev) ((_pcidev)->chipRev) +#define PCI_SUB_VENDOR_ID(_pcidev) ((_pcidev)->subsysVendor) +#define PCI_SUB_DEVICE_ID(_pcidev) ((_pcidev)->subsysCard) + #define PCI_DEV_TAG(_pcidev) pciTag((_pcidev)->bus, \ (_pcidev)->device, \ (_pcidev)->func) @@ -65,6 +68,9 @@ enum region_type { (((_pcidev)->size[(_b)] > 0) ? (1 << (_pcidev)->size[(_b)]) : 0) /* read/write PCI configuration space */ +#define PCI_READ_BYTE(_pcidev, _value_ptr, _offset) \ + *(_value_ptr) = pciReadByte(PCI_CFG_TAG(_pcidev), (_offset)) + #define PCI_READ_LONG(_pcidev, _value_ptr, _offset) \ *(_value_ptr) = pciReadLong(PCI_CFG_TAG(_pcidev), (_offset)) @@ -79,6 +85,9 @@ typedef struct pci_device *pciVideoPtr; #define PCI_DEV_DEVICE_ID(_pcidev) ((_pcidev)->device_id) #define PCI_DEV_REVISION(_pcidev) ((_pcidev)->revision) +#define PCI_SUB_VENDOR_ID(_pcidev) ((_pcidev)->subvendor_id) +#define PCI_SUB_DEVICE_ID(_pcidev) ((_pcidev)->subdevice_id) + /* pci-rework functions take a 'pci_device' parameter instead of a tag */ #define PCI_DEV_TAG(_pcidev) (_pcidev) @@ -99,6 +108,9 @@ typedef struct pci_device *pciVideoPtr; #define PCI_REGION_BASE(_pcidev, _b, _type) ((_pcidev)->regions[(_b)].base_addr) #define PCI_REGION_SIZE(_pcidev, _b) ((_pcidev)->regions[(_b)].size) +#define PCI_READ_BYTE(_pcidev, _value_ptr, _offset) \ + pci_device_cfg_read_u8((_pcidev), (_value_ptr), (_offset)) + #define PCI_READ_LONG(_pcidev, _value_ptr, _offset) \ pci_device_cfg_read_u32((_pcidev), (_value_ptr), (_offset)) |