FreeBSD/sys/dev/drm2/radeon/radeon_asic.c
/**
 * radeon_register_accessor_init - sets up the register accessor callbacks
 *
 * @rdev: radeon device pointer
 *
 * Sets up the register accessor callbacks for various register
 * apertures.  Not all asics have all apertures (all asics).
 */
sets up the register accessor callbacks
@rdev: radeon device pointer

Sets up the register accessor callbacks for various register
apertures.
sets up the register accessor callbacks @rdev : radeon device pointer Sets up the register accessor callbacks for various register apertures .
static void radeon_register_accessor_init(struct radeon_device *rdev)
{
	rdev->mc_rreg = &radeon_invalid_rreg;
	rdev->mc_wreg = &radeon_invalid_wreg;
	rdev->pll_rreg = &radeon_invalid_rreg;
	rdev->pll_wreg = &radeon_invalid_wreg;
	rdev->pciep_rreg = &radeon_invalid_rreg;
	rdev->pciep_wreg = &radeon_invalid_wreg;
	if (rdev->family < CHIP_RV515) {
		rdev->pcie_reg_mask = 0xff;
	} else {
		rdev->pcie_reg_mask = 0x7ff;
	}
	if (rdev->family <= CHIP_R580) {
		rdev->pll_rreg = &r100_pll_rreg;
		rdev->pll_wreg = &r100_pll_wreg;
	}
	if (rdev->family >= CHIP_R420) {
		rdev->mc_rreg = &r420_mc_rreg;
		rdev->mc_wreg = &r420_mc_wreg;
	}
	if (rdev->family >= CHIP_RV515) {
		rdev->mc_rreg = &rv515_mc_rreg;
		rdev->mc_wreg = &rv515_mc_wreg;
	}
	if (rdev->family == CHIP_RS400 || rdev->family == CHIP_RS480) {
		rdev->mc_rreg = &rs400_mc_rreg;
		rdev->mc_wreg = &rs400_mc_wreg;
	}
	if (rdev->family == CHIP_RS690 || rdev->family == CHIP_RS740) {
		rdev->mc_rreg = &rs690_mc_rreg;
		rdev->mc_wreg = &rs690_mc_wreg;
	}
	if (rdev->family == CHIP_RS600) {
		rdev->mc_rreg = &rs600_mc_rreg;
		rdev->mc_wreg = &rs600_mc_wreg;
	}
	if (rdev->family >= CHIP_R600) {
		rdev->pciep_rreg = &r600_pciep_rreg;
		rdev->pciep_wreg = &r600_pciep_wreg;
	}
}
static void radeon_register_accessor_init ( struct radeon_device * rdev ) { rdev -> mc_rreg = & radeon_invalid_rreg ; rdev -> mc_wreg = & radeon_invalid_wreg ; rdev -> pll_rreg = & radeon_invalid_rreg ; rdev -> pll_wreg = & radeon_invalid_wreg ; rdev -> pciep_rreg = & radeon_invalid_rreg ; rdev -> pciep_wreg = & radeon_invalid_wreg ; if ( rdev -> family < CHIP_RV515 ) { rdev -> pcie_reg_mask = 0xff ; } else { rdev -> pcie_reg_mask = 0x7ff ; } if ( rdev -> family <= CHIP_R580 ) { rdev -> pll_rreg = & r100_pll_rreg ; rdev -> pll_wreg = & r100_pll_wreg ; } if ( rdev -> family >= CHIP_R420 ) { rdev -> mc_rreg = & r420_mc_rreg ; rdev -> mc_wreg = & r420_mc_wreg ; } if ( rdev -> family >= CHIP_RV515 ) { rdev -> mc_rreg = & rv515_mc_rreg ; rdev -> mc_wreg = & rv515_mc_wreg ; } if ( rdev -> family == CHIP_RS400 || rdev -> family == CHIP_RS480 ) { rdev -> mc_rreg = & rs400_mc_rreg ; rdev -> mc_wreg = & rs400_mc_wreg ; } if ( rdev -> family == CHIP_RS690 || rdev -> family == CHIP_RS740 ) { rdev -> mc_rreg = & rs690_mc_rreg ; rdev -> mc_wreg = & rs690_mc_wreg ; } if ( rdev -> family == CHIP_RS600 ) { rdev -> mc_rreg = & rs600_mc_rreg ; rdev -> mc_wreg = & rs600_mc_wreg ; } if ( rdev -> family >= CHIP_R600 ) { rdev -> pciep_rreg = & r600_pciep_rreg ; rdev -> pciep_wreg = & r600_pciep_wreg ; } }
radeon_register_accessor_init - sets up the register accessor callbacks
 @rdev: radeon device pointer
radeon_register_accessor_init - sets up the register accessor callbacks @rdev : radeon device pointer
/* Don't change order as we are overridding accessor. */ /* FIXME: not sure here */