diff options
Diffstat (limited to 'src/radeon_driver.c')
-rw-r--r-- | src/radeon_driver.c | 23 |
1 files changed, 23 insertions, 0 deletions
diff --git a/src/radeon_driver.c b/src/radeon_driver.c index b0b2e77b..8673f5e1 100644 --- a/src/radeon_driver.c +++ b/src/radeon_driver.c @@ -668,6 +668,29 @@ void RADEONOUTMC(ScrnInfoPtr pScrn, int addr, uint32_t data) } } +/* Read PCIE register */ +unsigned RADEONINPCIE(ScrnInfoPtr pScrn, int addr) +{ + RADEONInfoPtr info = RADEONPTR(pScrn); + unsigned char *RADEONMMIO = info->MMIO; + CARD32 data; + + OUTREG(RADEON_PCIE_INDEX, addr & 0xff); + data = INREG(RADEON_PCIE_DATA); + + return data; +} + +/* Write PCIE register */ +void RADEONOUTPCIE(ScrnInfoPtr pScrn, int addr, uint32_t data) +{ + RADEONInfoPtr info = RADEONPTR(pScrn); + unsigned char *RADEONMMIO = info->MMIO; + + OUTREG(RADEON_PCIE_INDEX, ((addr) & 0xff)); + OUTREG(RADEON_PCIE_DATA, data); +} + static Bool radeon_get_mc_idle(ScrnInfoPtr pScrn) { RADEONInfoPtr info = RADEONPTR(pScrn); |