summaryrefslogtreecommitdiff
path: root/src/ast_driver.c
diff options
context:
space:
mode:
authorEgbert Eich <eich@suse.de>2014-04-22 11:41:07 +0200
committerEgbert Eich <eich@freedesktop.org>2014-04-30 17:25:05 +0200
commit0ddf408f17cee58d643f4fd2f683f6530f5027af (patch)
tree79935652ce409bc1199e8ba3d117d86bf785ddbe /src/ast_driver.c
parente855e6806ea94a2296076924ee9460b5081bd6da (diff)
Fix compiler warnings: get rid of deprecated IOADDRESS
For newer ABI versions IOADDRESS can be replaced by int which is big enough to hold an PIO offset. Signed-off-by: Egbert Eich <eich@suse.de> Acked-by: Y.C. Chen <yc_chen@aspeedtech.com>
Diffstat (limited to 'src/ast_driver.c')
-rw-r--r--src/ast_driver.c18
1 files changed, 8 insertions, 10 deletions
diff --git a/src/ast_driver.c b/src/ast_driver.c
index c2ba129..639562d 100644
--- a/src/ast_driver.c
+++ b/src/ast_driver.c
@@ -570,23 +570,21 @@ ASTPreInit(ScrnInfoPtr pScrn, int flags)
xf86DrvMsg(pScrn->scrnIndex, from, "Chipset: \"%s\"\n",
(pScrn->chipset != NULL) ? pScrn->chipset : "Unknown ast");
- /* Resource Allocation */
+
#if GET_ABI_MAJOR(ABI_VIDEODRV_VERSION) < 12
- pAST->IODBase = pScrn->domainIOBase;
-#else
- pAST->IODBase = 0;
-#endif
/* "Patch" the PIOOffset inside vgaHW in order to force
* the vgaHW module to use our relocated i/o ports.
*/
+ VGAHWPTR(pScrn)->PIOOffset =
+ pScrn->domainIOBase + PCI_REGION_BASE(pAST->PciInfo, 2, REGION_IO) - 0x380;
+
+ pAST->RelocateIO = pScrn->domainIOBase +
+ PCI_REGION_BASE(pAST->PciInfo, 2, REGION_IO);
+#else
+ pAST->RelocateIO = (PCI_REGION_BASE(pAST->PciInfo, 2, REGION_IO));
-#if GET_ABI_MAJOR(ABI_VIDEODRV_VERSION) < 12
- VGAHWPTR(pScrn)->PIOOffset = /* ... */
#endif
- pAST->PIOOffset =
- pAST->IODBase + PCI_REGION_BASE(pAST->PciInfo, 2, REGION_IO) - 0x380;
- pAST->RelocateIO = (IOADDRESS)(PCI_REGION_BASE(pAST->PciInfo, 2, REGION_IO) + pAST->IODBase);
if (pAST->pEnt->device->MemBase != 0) {
pAST->FBPhysAddr = pAST->pEnt->device->MemBase;