diff options
author | George Sapountzis <gsap7@yahoo.gr> | 2007-03-18 16:15:20 +0200 |
---|---|---|
committer | George Sapountzis <gsap7@yahoo.gr> | 2007-03-21 20:18:54 +0200 |
commit | 321db6d87c9110654ab386e5ec270116eca1e04f (patch) | |
tree | cc8b1e8ba11d0bef543567c448754de3076d1e38 /src/atividmem.c | |
parent | dfd07b6e99020d1db43d7ce0cae4423d8c6b1f05 (diff) |
[mach64] Add macros for pci-rework source-code compatibilty.
Diffstat (limited to 'src/atividmem.c')
-rw-r--r-- | src/atividmem.c | 11 |
1 files changed, 5 insertions, 6 deletions
diff --git a/src/atividmem.c b/src/atividmem.c index 01b0099..947f265 100644 --- a/src/atividmem.c +++ b/src/atividmem.c @@ -164,7 +164,6 @@ ATIMapApertures ) { pciVideoPtr pVideo = pATI->PCIInfo; - PCITAG Tag = ((pciConfigPtr)(pVideo->thisCard))->tag; int mode; if (pATI->Mapped) @@ -180,7 +179,7 @@ ATIMapApertures * aperture is supported. Hence, the hard-coded values here... */ pATI->pBank = xf86MapDomainMemory(iScreen, VIDMEM_MMIO_32BIT, - Tag, 0x000A0000U, 0x00010000U); + PCI_CFG_TAG(pVideo), 0x000A0000U, 0x00010000U); if (!pATI->pBank) return FALSE; @@ -201,7 +200,7 @@ ATIMapApertures if (pATI->MMIOInLinear) mode = VIDMEM_MMIO; - pATI->pMemoryLE = xf86MapPciMem(iScreen, mode, Tag, + pATI->pMemoryLE = xf86MapPciMem(iScreen, mode, PCI_CFG_TAG(pVideo), pVideo->memBase[0], (1U << pVideo->size[0])); @@ -242,7 +241,7 @@ ATIMapApertures if (pATI->Block0Base && !pATI->MMIOInLinear) { mode = VIDMEM_MMIO; - pATI->pMMIO = xf86MapPciMem(iScreen, mode, Tag, + pATI->pMMIO = xf86MapPciMem(iScreen, mode, PCI_CFG_TAG(pVideo), pVideo->memBase[2], getpagesize()); @@ -271,9 +270,9 @@ ATIMapApertures { unsigned long mmio_offset, linear_size; - mmio_offset = pATI->Block0Base - pVideo->memBase[0]; + mmio_offset = pATI->Block0Base - PCI_REGION_BASE(pVideo, 0, REGION_MEM); - linear_size = (1 << pVideo->size[0]); + linear_size = PCI_REGION_SIZE(pVideo, 0); pATI->pMMIO = NULL; |