summaryrefslogtreecommitdiff
path: root/src/mga_dac3026.c
diff options
context:
space:
mode:
authorIan Romanick <idr@us.ibm.com>2007-08-22 10:43:39 -0700
committerIan Romanick <idr@us.ibm.com>2007-08-22 10:43:39 -0700
commit55d219394ad6af8e25ff604bcbb49d5a551bd348 (patch)
tree0a6c6e83a297e049d7a55abbeaaad61c61d9b53b /src/mga_dac3026.c
parentf4ef39d53d5a67942707507814fef4ad466dc909 (diff)
Merge PCI-rework support and "classic" PCI interface support into one tree
First pass at merging both trees. So far, this has only been tested on the PCI-rework build on a PCI G450.
Diffstat (limited to 'src/mga_dac3026.c')
-rw-r--r--src/mga_dac3026.c9
1 files changed, 9 insertions, 0 deletions
diff --git a/src/mga_dac3026.c b/src/mga_dac3026.c
index 9926017..254f6e2 100644
--- a/src/mga_dac3026.c
+++ b/src/mga_dac3026.c
@@ -746,8 +746,13 @@ MGA3026Restore(ScrnInfoPtr pScrn, vgaRegPtr vgaReg, MGARegPtr mgaReg,
for (i = 0; i < 6; i++)
OUTREG16(0x1FDE, (mgaReg->ExtVga[i] << 8) | i);
+#ifdef PCIACCESS
pci_device_cfg_write_bits(pMga->PciInfo, OPTION_MASK, mgaReg->Option,
PCI_OPTION_REG);
+#else
+ pciSetBitsLong(pMga->PciTag, PCI_OPTION_REG, OPTION_MASK,
+ mgaReg->Option);
+#endif
MGA_NOT_HAL(
/* select pixel clock PLL as clock source */
@@ -866,8 +871,12 @@ MGA3026Save(ScrnInfoPtr pScrn, vgaRegPtr vgaReg, MGARegPtr mgaReg,
for (i = 0; i < DACREGSIZE; i++)
mgaReg->DacRegs[i] = inTi3026(MGADACregs[i]);
+#ifdef PCIACCESS
pci_device_cfg_read_u32(pMga->PciInfo, & mgaReg->Option,
PCI_OPTION_REG);
+#else
+ mgaReg->Option = pciReadLong(pMga->PciTag, PCI_OPTION_REG);
+#endif
#ifdef DEBUG
ErrorF("read: %02X %02X %02X %02X %02X %02X %08lX\n",