static void nbio_v7_4_init_registers(struct amdgpu_device *adev) { uint32_t def, data; def = data = RREG32_PCIE(smnPCIE_CI_CNTL); data = REG_SET_FIELD(data, PCIE_CI_CNTL, CI_SLV_ORDERING_DIS, 1); if (def != data) WREG32_PCIE(smnPCIE_CI_CNTL, data); }
static void rv770_enable_pll_sleep_in_l1(struct radeon_device *rdev) { u32 tmp; tmp = RREG32_PCIE_PORT(PCIE_LC_CNTL) & ~LC_L1_INACTIVITY_MASK; tmp |= LC_L1_INACTIVITY(8); WREG32_PCIE_PORT(PCIE_LC_CNTL, tmp); /* NOTE, this is a PCIE indirect reg, not PCIE PORT */ tmp = RREG32_PCIE(PCIE_P_CNTL); tmp |= P_PLL_PWRDN_IN_L1L23; tmp &= ~P_PLL_BUF_PDNB; tmp &= ~P_PLL_PDNB; tmp |= P_ALLOW_PRX_FRONTEND_SHUTOFF; WREG32_PCIE(PCIE_P_CNTL, tmp); }
static void nbio_v7_4_update_medium_grain_light_sleep(struct amdgpu_device *adev, bool enable) { uint32_t def, data; def = data = RREG32_PCIE(smnPCIE_CNTL2); if (enable && (adev->cg_flags & AMD_CG_SUPPORT_BIF_LS)) { data |= (PCIE_CNTL2__SLV_MEM_LS_EN_MASK | PCIE_CNTL2__MST_MEM_LS_EN_MASK | PCIE_CNTL2__REPLAY_MEM_LS_EN_MASK); } else { data &= ~(PCIE_CNTL2__SLV_MEM_LS_EN_MASK | PCIE_CNTL2__MST_MEM_LS_EN_MASK | PCIE_CNTL2__REPLAY_MEM_LS_EN_MASK); } if (def != data) WREG32_PCIE(smnPCIE_CNTL2, data); }