diff options
author | Alex Deucher <alex@cube.(none)> | 2008-05-12 09:00:40 -0400 |
---|---|---|
committer | Alex Deucher <alex@cube.(none)> | 2008-05-12 09:00:40 -0400 |
commit | 68b7f550ba140d275c6f9bb26c2186069354be24 (patch) | |
tree | 7f780cb873adf026eb521c533007ec6756259412 /shared-core/radeon_drv.h | |
parent | a34025ce227e8755505b483b1a77c4cf5d7fece5 (diff) |
Radeon IGP: wrap MCIND access
first step in merging rs4xx/rs6xx gart setup
Diffstat (limited to 'shared-core/radeon_drv.h')
-rw-r--r-- | shared-core/radeon_drv.h | 36 |
1 files changed, 22 insertions, 14 deletions
diff --git a/shared-core/radeon_drv.h b/shared-core/radeon_drv.h index 639a1398..452583ef 100644 --- a/shared-core/radeon_drv.h +++ b/shared-core/radeon_drv.h @@ -1145,14 +1145,6 @@ do { \ RADEON_WRITE( RADEON_CLOCK_CNTL_DATA, (val) ); \ } while (0) -#define RADEON_WRITE_IGPGART( addr, val ) \ -do { \ - RADEON_WRITE( RS400_NB_MC_INDEX, \ - ((addr) & 0x7f) | RS400_NB_MC_IND_WR_EN); \ - RADEON_WRITE( RS400_NB_MC_DATA, (val) ); \ - RADEON_WRITE( RS400_NB_MC_INDEX, 0x7f ); \ -} while (0) - #define RADEON_WRITE_PCIE( addr, val ) \ do { \ RADEON_WRITE8( RADEON_PCIE_INDEX, \ @@ -1160,12 +1152,20 @@ do { \ RADEON_WRITE( RADEON_PCIE_DATA, (val) ); \ } while (0) -#define RADEON_WRITE_MCIND( addr, val ) \ - do { \ - RADEON_WRITE(R520_MC_IND_INDEX, 0xff0000 | ((addr) & 0xff)); \ - RADEON_WRITE(R520_MC_IND_DATA, (val)); \ - RADEON_WRITE(R520_MC_IND_INDEX, 0); \ - } while (0) +#define R500_WRITE_MCIND( addr, val ) \ +do { \ + RADEON_WRITE(R520_MC_IND_INDEX, 0xff0000 | ((addr) & 0xff)); \ + RADEON_WRITE(R520_MC_IND_DATA, (val)); \ + RADEON_WRITE(R520_MC_IND_INDEX, 0); \ +} while (0) + +#define RS400_WRITE_MCIND( addr, val ) \ +do { \ + RADEON_WRITE( RS400_NB_MC_INDEX, \ + ((addr) & 0x7f) | RS400_NB_MC_IND_WR_EN); \ + RADEON_WRITE( RS400_NB_MC_DATA, (val) ); \ + RADEON_WRITE( RS400_NB_MC_INDEX, 0x7f ); \ +} while (0) #define RS690_WRITE_MCIND( addr, val ) \ do { \ @@ -1174,6 +1174,14 @@ do { \ RADEON_WRITE(RS690_MC_INDEX, RS690_MC_INDEX_WR_ACK); \ } while (0) +#define IGP_WRITE_MCIND( addr, val ) \ +do { \ + if ((dev_priv->flags & RADEON_FAMILY_MASK) == CHIP_RS690) \ + RS690_WRITE_MCIND( addr, val ); \ + else \ + RS400_WRITE_MCIND( addr, val ); \ +} while (0) + #define CP_PACKET0( reg, n ) \ (RADEON_CP_PACKET0 | ((n) << 16) | ((reg) >> 2)) #define CP_PACKET0_TABLE( reg, n ) \ |