summaryrefslogtreecommitdiff
path: root/src/lg_driver.c
diff options
context:
space:
mode:
authorDave Airlie <airlied@redhat.com>2008-01-08 15:06:33 +1000
committerDave Airlie <airlied@redhat.com>2008-01-08 15:15:37 +1000
commit46e982ec0208bf7a32d47cd7cf7b1895e7bbfe1d (patch)
tree980ba568e2d94a67a14628d2c8978d259ebb960a /src/lg_driver.c
parent6d114041dc22763aa89ef6a4f4af3246de3e3b1b (diff)
cirrus initial pci access support
Diffstat (limited to 'src/lg_driver.c')
-rw-r--r--src/lg_driver.c16
1 files changed, 8 insertions, 8 deletions
diff --git a/src/lg_driver.c b/src/lg_driver.c
index 7dab5e8..c731f61 100644
--- a/src/lg_driver.c
+++ b/src/lg_driver.c
@@ -457,9 +457,9 @@ LgPreInit(ScrnInfoPtr pScrn, int flags)
/* Find the PCI info for this screen */
pCir->PciInfo = xf86GetPciInfoForEntity(pCir->pEnt->index);
- pCir->PciTag = pciTag(pCir->PciInfo->bus,
- pCir->PciInfo->device,
- pCir->PciInfo->func);
+ pCir->PciTag = pciTag(PCI_DEV_BUS(pCir->PciInfo),
+ PCI_DEV_DEV(pCir->PciInfo),
+ PCI_DEV_FUNC(pCir->PciInfo));
if (xf86LoadSubModule(pScrn, "int10")) {
xf86Int10InfoPtr int10InfoPtr;
@@ -560,7 +560,7 @@ LgPreInit(ScrnInfoPtr pScrn, int flags)
xf86DrvMsg(pScrn->scrnIndex, X_CONFIG, "ChipRev override: %d\n",
pCir->ChipRev);
} else {
- pCir->ChipRev = pCir->PciInfo->chipRev;
+ pCir->ChipRev = PCI_DEV_REVISION(pCir->PciInfo);
}
/* Cirrus swapped the FB and IO registers in the 5465 (by design). */
@@ -584,8 +584,8 @@ LgPreInit(ScrnInfoPtr pScrn, int flags)
pCir->FbAddress = pCir->pEnt->device->MemBase;
from = X_CONFIG;
} else {
- if (pCir->PciInfo->memBase[fbPCIReg] != 0) {
- pCir->FbAddress = pCir->PciInfo->memBase[fbPCIReg] & 0xff000000;
+ if (PCI_REGION_BASE(pCir->PciInfo, fbPCIReg, REGION_MEM) != 0) {
+ pCir->FbAddress = PCI_REGION_BASE(pCir->PciInfo, fbPCIReg, REGION_MEM) & 0xff000000;
from = X_PROBED;
} else {
xf86DrvMsg(pScrn->scrnIndex, X_ERROR,
@@ -609,8 +609,8 @@ LgPreInit(ScrnInfoPtr pScrn, int flags)
pCir->IOAddress = pCir->pEnt->device->IOBase;
from = X_CONFIG;
} else {
- if (pCir->PciInfo->memBase[ioPCIReg] != 0) {
- pCir->IOAddress = pCir->PciInfo->memBase[ioPCIReg] & 0xfffff000;
+ if (PCI_REGION_BASE(pCir->PciInfo, ioPCIReg, REGION_MEM) != 0) {
+ pCir->IOAddress = PCI_REGION_BASE(pCir->PciInfo, ioPCIReg, REGION_MEM) & 0xfffff000;
from = X_PROBED;
} else {
xf86DrvMsg(pScrn->scrnIndex, X_ERROR,