Lines Matching refs:table

293 			SMU72_Discrete_DpmTable *table)  in tonga_populate_smc_vddc_table()  argument
299 table->VddcLevelCount = data->vddc_voltage_table.count; in tonga_populate_smc_vddc_table()
300 for (count = 0; count < table->VddcLevelCount; count++) { in tonga_populate_smc_vddc_table()
301 table->VddcTable[count] = in tonga_populate_smc_vddc_table()
304 CONVERT_FROM_HOST_TO_SMC_UL(table->VddcLevelCount); in tonga_populate_smc_vddc_table()
310 SMU72_Discrete_DpmTable *table) in tonga_populate_smc_vdd_gfx_table() argument
316 table->VddGfxLevelCount = data->vddgfx_voltage_table.count; in tonga_populate_smc_vdd_gfx_table()
318 table->VddGfxTable[count] = in tonga_populate_smc_vdd_gfx_table()
321 CONVERT_FROM_HOST_TO_SMC_UL(table->VddGfxLevelCount); in tonga_populate_smc_vdd_gfx_table()
327 SMU72_Discrete_DpmTable *table) in tonga_populate_smc_vdd_ci_table() argument
332 table->VddciLevelCount = data->vddci_voltage_table.count; in tonga_populate_smc_vdd_ci_table()
333 for (count = 0; count < table->VddciLevelCount; count++) { in tonga_populate_smc_vdd_ci_table()
335 table->VddciTable[count] = in tonga_populate_smc_vdd_ci_table()
338 table->SmioTable1.Pattern[count].Voltage = in tonga_populate_smc_vdd_ci_table()
341 table->SmioTable1.Pattern[count].Smio = in tonga_populate_smc_vdd_ci_table()
343 table->Smio[count] |= in tonga_populate_smc_vdd_ci_table()
345 table->VddciTable[count] = in tonga_populate_smc_vdd_ci_table()
350 table->SmioMask1 = data->vddci_voltage_table.mask_low; in tonga_populate_smc_vdd_ci_table()
351 CONVERT_FROM_HOST_TO_SMC_UL(table->VddciLevelCount); in tonga_populate_smc_vdd_ci_table()
357 SMU72_Discrete_DpmTable *table) in tonga_populate_smc_mvdd_table() argument
363 table->MvddLevelCount = data->mvdd_voltage_table.count; in tonga_populate_smc_mvdd_table()
364 for (count = 0; count < table->MvddLevelCount; count++) { in tonga_populate_smc_mvdd_table()
365 table->SmioTable2.Pattern[count].Voltage = in tonga_populate_smc_mvdd_table()
368 table->SmioTable2.Pattern[count].Smio = in tonga_populate_smc_mvdd_table()
370 table->Smio[count] |= in tonga_populate_smc_mvdd_table()
373 table->SmioMask2 = data->mvdd_voltage_table.mask_low; in tonga_populate_smc_mvdd_table()
375 CONVERT_FROM_HOST_TO_SMC_UL(table->MvddLevelCount); in tonga_populate_smc_mvdd_table()
382 SMU72_Discrete_DpmTable *table) in tonga_populate_cac_tables() argument
397 uint32_t vddc_level_count = PP_SMC_TO_HOST_UL(table->VddcLevelCount); in tonga_populate_cac_tables()
398 uint32_t vddgfx_level_count = PP_SMC_TO_HOST_UL(table->VddGfxLevelCount); in tonga_populate_cac_tables()
404 table->BapmVddcVidLoSidd[count] = in tonga_populate_cac_tables()
406 table->BapmVddcVidHiSidd[count] = in tonga_populate_cac_tables()
408 table->BapmVddcVidHiSidd2[count] = in tonga_populate_cac_tables()
417 table->BapmVddGfxVidHiSidd2[count] = in tonga_populate_cac_tables()
424 table->BapmVddGfxVidLoSidd[count] = in tonga_populate_cac_tables()
426 table->BapmVddGfxVidHiSidd[count] = in tonga_populate_cac_tables()
428 table->BapmVddGfxVidHiSidd2[count] = in tonga_populate_cac_tables()
437 SMU72_Discrete_DpmTable *table) in tonga_populate_smc_voltage_tables() argument
441 result = tonga_populate_smc_vddc_table(hwmgr, table); in tonga_populate_smc_voltage_tables()
446 result = tonga_populate_smc_vdd_ci_table(hwmgr, table); in tonga_populate_smc_voltage_tables()
451 result = tonga_populate_smc_vdd_gfx_table(hwmgr, table); in tonga_populate_smc_voltage_tables()
456 result = tonga_populate_smc_mvdd_table(hwmgr, table); in tonga_populate_smc_voltage_tables()
461 result = tonga_populate_cac_tables(hwmgr, table); in tonga_populate_smc_voltage_tables()
492 struct SMU72_Discrete_DpmTable *table) in tonga_populate_ulv_state() argument
494 return tonga_populate_ulv_level(hwmgr, &table->Ulv); in tonga_populate_ulv_state()
497 static int tonga_populate_smc_link_level(struct pp_hwmgr *hwmgr, SMU72_Discrete_DpmTable *table) in tonga_populate_smc_link_level() argument
506 table->LinkLevel[i].PcieGenSpeed = in tonga_populate_smc_link_level()
508 table->LinkLevel[i].PcieLaneCount = in tonga_populate_smc_link_level()
510 table->LinkLevel[i].EnabledForActivity = in tonga_populate_smc_link_level()
512 table->LinkLevel[i].SPC = in tonga_populate_smc_link_level()
514 table->LinkLevel[i].DownThreshold = in tonga_populate_smc_link_level()
516 table->LinkLevel[i].UpThreshold = in tonga_populate_smc_link_level()
1164 SMU72_Discrete_DpmTable *table) in tonga_populate_smc_acpi_level() argument
1179 table->ACPILevel.Flags &= ~PPSMC_SWSTATE_FLAG_DC; in tonga_populate_smc_acpi_level()
1181 table->ACPILevel.MinVoltage = in tonga_populate_smc_acpi_level()
1185 table->ACPILevel.SclkFrequency = atomctrl_get_reference_clock(hwmgr); in tonga_populate_smc_acpi_level()
1189 table->ACPILevel.SclkFrequency, &dividers); in tonga_populate_smc_acpi_level()
1196 table->ACPILevel.SclkDid = (uint8_t)dividers.pll_post_divider; in tonga_populate_smc_acpi_level()
1197 table->ACPILevel.DisplayWatermark = PPSMC_DISPLAY_WATERMARK_LOW; in tonga_populate_smc_acpi_level()
1198 table->ACPILevel.DeepSleepDivId = 0; in tonga_populate_smc_acpi_level()
1207 table->ACPILevel.CgSpllFuncCntl = spll_func_cntl; in tonga_populate_smc_acpi_level()
1208 table->ACPILevel.CgSpllFuncCntl2 = spll_func_cntl_2; in tonga_populate_smc_acpi_level()
1209 table->ACPILevel.CgSpllFuncCntl3 = data->clock_registers.vCG_SPLL_FUNC_CNTL_3; in tonga_populate_smc_acpi_level()
1210 table->ACPILevel.CgSpllFuncCntl4 = data->clock_registers.vCG_SPLL_FUNC_CNTL_4; in tonga_populate_smc_acpi_level()
1211 table->ACPILevel.SpllSpreadSpectrum = data->clock_registers.vCG_SPLL_SPREAD_SPECTRUM; in tonga_populate_smc_acpi_level()
1212 table->ACPILevel.SpllSpreadSpectrum2 = data->clock_registers.vCG_SPLL_SPREAD_SPECTRUM_2; in tonga_populate_smc_acpi_level()
1213 table->ACPILevel.CcPwrDynRm = 0; in tonga_populate_smc_acpi_level()
1214 table->ACPILevel.CcPwrDynRm1 = 0; in tonga_populate_smc_acpi_level()
1218 CONVERT_FROM_HOST_TO_SMC_UL(table->ACPILevel.Flags); in tonga_populate_smc_acpi_level()
1220 CONVERT_FROM_HOST_TO_SMC_UL(table->ACPILevel.SclkFrequency); in tonga_populate_smc_acpi_level()
1221 CONVERT_FROM_HOST_TO_SMC_UL(table->ACPILevel.CgSpllFuncCntl); in tonga_populate_smc_acpi_level()
1222 CONVERT_FROM_HOST_TO_SMC_UL(table->ACPILevel.CgSpllFuncCntl2); in tonga_populate_smc_acpi_level()
1223 CONVERT_FROM_HOST_TO_SMC_UL(table->ACPILevel.CgSpllFuncCntl3); in tonga_populate_smc_acpi_level()
1224 CONVERT_FROM_HOST_TO_SMC_UL(table->ACPILevel.CgSpllFuncCntl4); in tonga_populate_smc_acpi_level()
1225 CONVERT_FROM_HOST_TO_SMC_UL(table->ACPILevel.SpllSpreadSpectrum); in tonga_populate_smc_acpi_level()
1226 CONVERT_FROM_HOST_TO_SMC_UL(table->ACPILevel.SpllSpreadSpectrum2); in tonga_populate_smc_acpi_level()
1227 CONVERT_FROM_HOST_TO_SMC_UL(table->ACPILevel.CcPwrDynRm); in tonga_populate_smc_acpi_level()
1228 CONVERT_FROM_HOST_TO_SMC_UL(table->ACPILevel.CcPwrDynRm1); in tonga_populate_smc_acpi_level()
1231 table->MemoryACPILevel.MinVoltage = in tonga_populate_smc_acpi_level()
1237 table->MemoryACPILevel.MinMvdd = in tonga_populate_smc_acpi_level()
1240 table->MemoryACPILevel.MinMvdd = 0; in tonga_populate_smc_acpi_level()
1260 table->MemoryACPILevel.DllCntl = in tonga_populate_smc_acpi_level()
1262 table->MemoryACPILevel.MclkPwrmgtCntl = in tonga_populate_smc_acpi_level()
1264 table->MemoryACPILevel.MpllAdFuncCntl = in tonga_populate_smc_acpi_level()
1266 table->MemoryACPILevel.MpllDqFuncCntl = in tonga_populate_smc_acpi_level()
1268 table->MemoryACPILevel.MpllFuncCntl = in tonga_populate_smc_acpi_level()
1270 table->MemoryACPILevel.MpllFuncCntl_1 = in tonga_populate_smc_acpi_level()
1272 table->MemoryACPILevel.MpllFuncCntl_2 = in tonga_populate_smc_acpi_level()
1274 table->MemoryACPILevel.MpllSs1 = in tonga_populate_smc_acpi_level()
1276 table->MemoryACPILevel.MpllSs2 = in tonga_populate_smc_acpi_level()
1279 table->MemoryACPILevel.EnabledForThrottle = 0; in tonga_populate_smc_acpi_level()
1280 table->MemoryACPILevel.EnabledForActivity = 0; in tonga_populate_smc_acpi_level()
1281 table->MemoryACPILevel.UpHyst = 0; in tonga_populate_smc_acpi_level()
1282 table->MemoryACPILevel.DownHyst = 100; in tonga_populate_smc_acpi_level()
1283 table->MemoryACPILevel.VoltageDownHyst = 0; in tonga_populate_smc_acpi_level()
1285 table->MemoryACPILevel.ActivityLevel = in tonga_populate_smc_acpi_level()
1288 table->MemoryACPILevel.StutterEnable = 0; in tonga_populate_smc_acpi_level()
1289 table->MemoryACPILevel.StrobeEnable = 0; in tonga_populate_smc_acpi_level()
1290 table->MemoryACPILevel.EdcReadEnable = 0; in tonga_populate_smc_acpi_level()
1291 table->MemoryACPILevel.EdcWriteEnable = 0; in tonga_populate_smc_acpi_level()
1292 table->MemoryACPILevel.RttEnable = 0; in tonga_populate_smc_acpi_level()
1298 SMU72_Discrete_DpmTable *table) in tonga_populate_smc_uvd_level() argument
1310 table->UvdLevelCount = (uint8_t) (mm_table->count); in tonga_populate_smc_uvd_level()
1311 table->UvdBootLevel = 0; in tonga_populate_smc_uvd_level()
1313 for (count = 0; count < table->UvdLevelCount; count++) { in tonga_populate_smc_uvd_level()
1314 table->UvdLevel[count].VclkFrequency = mm_table->entries[count].vclk; in tonga_populate_smc_uvd_level()
1315 table->UvdLevel[count].DclkFrequency = mm_table->entries[count].dclk; in tonga_populate_smc_uvd_level()
1316 table->UvdLevel[count].MinVoltage.Vddc = in tonga_populate_smc_uvd_level()
1319 table->UvdLevel[count].MinVoltage.VddGfx = in tonga_populate_smc_uvd_level()
1323 table->UvdLevel[count].MinVoltage.Vddci = in tonga_populate_smc_uvd_level()
1326 table->UvdLevel[count].MinVoltage.Phases = 1; in tonga_populate_smc_uvd_level()
1331 table->UvdLevel[count].VclkFrequency, in tonga_populate_smc_uvd_level()
1338 table->UvdLevel[count].VclkDivider = (uint8_t)dividers.pll_post_divider; in tonga_populate_smc_uvd_level()
1341 table->UvdLevel[count].DclkFrequency, &dividers); in tonga_populate_smc_uvd_level()
1346 table->UvdLevel[count].DclkDivider = in tonga_populate_smc_uvd_level()
1349 CONVERT_FROM_HOST_TO_SMC_UL(table->UvdLevel[count].VclkFrequency); in tonga_populate_smc_uvd_level()
1350 CONVERT_FROM_HOST_TO_SMC_UL(table->UvdLevel[count].DclkFrequency); in tonga_populate_smc_uvd_level()
1358 SMU72_Discrete_DpmTable *table) in tonga_populate_smc_vce_level() argument
1370 table->VceLevelCount = (uint8_t) (mm_table->count); in tonga_populate_smc_vce_level()
1371 table->VceBootLevel = 0; in tonga_populate_smc_vce_level()
1373 for (count = 0; count < table->VceLevelCount; count++) { in tonga_populate_smc_vce_level()
1374 table->VceLevel[count].Frequency = in tonga_populate_smc_vce_level()
1376 table->VceLevel[count].MinVoltage.Vddc = in tonga_populate_smc_vce_level()
1379 table->VceLevel[count].MinVoltage.VddGfx = in tonga_populate_smc_vce_level()
1383 table->VceLevel[count].MinVoltage.Vddci = in tonga_populate_smc_vce_level()
1386 table->VceLevel[count].MinVoltage.Phases = 1; in tonga_populate_smc_vce_level()
1390 table->VceLevel[count].Frequency, &dividers); in tonga_populate_smc_vce_level()
1395 table->VceLevel[count].Divider = (uint8_t)dividers.pll_post_divider; in tonga_populate_smc_vce_level()
1397 CONVERT_FROM_HOST_TO_SMC_UL(table->VceLevel[count].Frequency); in tonga_populate_smc_vce_level()
1404 SMU72_Discrete_DpmTable *table) in tonga_populate_smc_acp_level() argument
1415 table->AcpLevelCount = (uint8_t) (mm_table->count); in tonga_populate_smc_acp_level()
1416 table->AcpBootLevel = 0; in tonga_populate_smc_acp_level()
1418 for (count = 0; count < table->AcpLevelCount; count++) { in tonga_populate_smc_acp_level()
1419 table->AcpLevel[count].Frequency = in tonga_populate_smc_acp_level()
1421 table->AcpLevel[count].MinVoltage.Vddc = in tonga_populate_smc_acp_level()
1424 table->AcpLevel[count].MinVoltage.VddGfx = in tonga_populate_smc_acp_level()
1428 table->AcpLevel[count].MinVoltage.Vddci = in tonga_populate_smc_acp_level()
1431 table->AcpLevel[count].MinVoltage.Phases = 1; in tonga_populate_smc_acp_level()
1435 table->AcpLevel[count].Frequency, &dividers); in tonga_populate_smc_acp_level()
1439 table->AcpLevel[count].Divider = (uint8_t)dividers.pll_post_divider; in tonga_populate_smc_acp_level()
1441 CONVERT_FROM_HOST_TO_SMC_UL(table->AcpLevel[count].Frequency); in tonga_populate_smc_acp_level()
1513 SMU72_Discrete_DpmTable *table) in tonga_populate_smc_boot_level() argument
1519 table->GraphicsBootLevel = 0; in tonga_populate_smc_boot_level()
1520 table->MemoryBootLevel = 0; in tonga_populate_smc_boot_level()
1547 table->BootVoltage.Vddc = in tonga_populate_smc_boot_level()
1550 table->BootVoltage.VddGfx = in tonga_populate_smc_boot_level()
1553 table->BootVoltage.Vddci = in tonga_populate_smc_boot_level()
1556 table->BootMVdd = data->vbios_boot_state.mvdd_bootup_value; in tonga_populate_smc_boot_level()
1558 CONVERT_FROM_HOST_TO_SMC_US(table->BootMVdd); in tonga_populate_smc_boot_level()
1737 SMU72_Discrete_DpmTable *table) in tonga_populate_vr_config() argument
1745 table->VRConfig |= (config<<VRCONF_VDDGFX_SHIFT); in tonga_populate_vr_config()
1749 table->VRConfig |= config; in tonga_populate_vr_config()
1757 table->VRConfig |= (config<<VRCONF_VDDGFX_SHIFT); in tonga_populate_vr_config()
1762 table->VRConfig |= config; in tonga_populate_vr_config()
1772 table->VRConfig |= (config<<VRCONF_VDDCI_SHIFT); in tonga_populate_vr_config()
1775 table->VRConfig |= (config<<VRCONF_VDDCI_SHIFT); in tonga_populate_vr_config()
1781 table->VRConfig |= (config<<VRCONF_MVDD_SHIFT); in tonga_populate_vr_config()
2216 SMU72_Discrete_DpmTable *table = &(smu_data->smc_state_table); in tonga_init_smc_table() local
2229 tonga_populate_smc_voltage_tables(hwmgr, table); in tonga_init_smc_table()
2233 table->SystemFlags |= PPSMC_SYSTEMFLAG_GPIO_DC; in tonga_init_smc_table()
2238 table->SystemFlags |= PPSMC_SYSTEMFLAG_STEPVDDC; in tonga_init_smc_table()
2241 table->SystemFlags |= PPSMC_SYSTEMFLAG_GDDR5; in tonga_init_smc_table()
2246 table->SystemFlags |= 0x40; in tonga_init_smc_table()
2249 result = tonga_populate_ulv_state(hwmgr, table); in tonga_init_smc_table()
2258 result = tonga_populate_smc_link_level(hwmgr, table); in tonga_init_smc_table()
2270 result = tonga_populate_smc_acpi_level(hwmgr, table); in tonga_init_smc_table()
2274 result = tonga_populate_smc_vce_level(hwmgr, table); in tonga_init_smc_table()
2278 result = tonga_populate_smc_acp_level(hwmgr, table); in tonga_init_smc_table()
2291 result = tonga_populate_smc_uvd_level(hwmgr, table); in tonga_init_smc_table()
2295 result = tonga_populate_smc_boot_level(hwmgr, table); in tonga_init_smc_table()
2310 table->GraphicsVoltageChangeEnable = 1; in tonga_init_smc_table()
2311 table->GraphicsThermThrottleEnable = 1; in tonga_init_smc_table()
2312 table->GraphicsInterval = 1; in tonga_init_smc_table()
2313 table->VoltageInterval = 1; in tonga_init_smc_table()
2314 table->ThermalInterval = 1; in tonga_init_smc_table()
2315 table->TemperatureLimitHigh = in tonga_init_smc_table()
2318 table->TemperatureLimitLow = in tonga_init_smc_table()
2321 table->MemoryVoltageChangeEnable = 1; in tonga_init_smc_table()
2322 table->MemoryInterval = 1; in tonga_init_smc_table()
2323 table->VoltageResponseTime = 0; in tonga_init_smc_table()
2324 table->PhaseResponseTime = 0; in tonga_init_smc_table()
2325 table->MemoryThermThrottleEnable = 1; in tonga_init_smc_table()
2340 table->PCIeBootLinkLevel = (uint8_t) (data->dpm_table.pcie_speed_table.count); in tonga_init_smc_table()
2342 table->PCIeGenInterval = 1; in tonga_init_smc_table()
2344 result = tonga_populate_vr_config(hwmgr, table); in tonga_init_smc_table()
2347 data->vr_config = table->VRConfig; in tonga_init_smc_table()
2348 table->ThermGpio = 17; in tonga_init_smc_table()
2349 table->SclkStepSize = 0x4000; in tonga_init_smc_table()
2353 table->VRHotGpio = gpio_pin_assignment.uc_gpio_pin_bit_shift; in tonga_init_smc_table()
2357 table->VRHotGpio = SMU7_UNUSED_GPIO_PIN; in tonga_init_smc_table()
2364 table->AcDcGpio = gpio_pin_assignment.uc_gpio_pin_bit_shift; in tonga_init_smc_table()
2368 table->AcDcGpio = SMU7_UNUSED_GPIO_PIN; in tonga_init_smc_table()
2388 table->ThermOutGpio = gpio_pin_assignment.uc_gpio_pin_bit_shift; in tonga_init_smc_table()
2390 table->ThermOutPolarity = in tonga_init_smc_table()
2394 table->ThermOutMode = SMU7_THERM_OUT_MODE_THERM_ONLY; in tonga_init_smc_table()
2401 table->ThermOutMode = SMU7_THERM_OUT_MODE_THERM_VRHOT; in tonga_init_smc_table()
2407 table->ThermOutGpio = 17; in tonga_init_smc_table()
2408 table->ThermOutPolarity = 1; in tonga_init_smc_table()
2409 table->ThermOutMode = SMU7_THERM_OUT_MODE_DISABLE; in tonga_init_smc_table()
2413 table->Smio[i] = PP_HOST_TO_SMC_UL(table->Smio[i]); in tonga_init_smc_table()
2414 CONVERT_FROM_HOST_TO_SMC_UL(table->SystemFlags); in tonga_init_smc_table()
2415 CONVERT_FROM_HOST_TO_SMC_UL(table->VRConfig); in tonga_init_smc_table()
2416 CONVERT_FROM_HOST_TO_SMC_UL(table->SmioMask1); in tonga_init_smc_table()
2417 CONVERT_FROM_HOST_TO_SMC_UL(table->SmioMask2); in tonga_init_smc_table()
2418 CONVERT_FROM_HOST_TO_SMC_UL(table->SclkStepSize); in tonga_init_smc_table()
2419 CONVERT_FROM_HOST_TO_SMC_US(table->TemperatureLimitHigh); in tonga_init_smc_table()
2420 CONVERT_FROM_HOST_TO_SMC_US(table->TemperatureLimitLow); in tonga_init_smc_table()
2421 CONVERT_FROM_HOST_TO_SMC_US(table->VoltageResponseTime); in tonga_init_smc_table()
2422 CONVERT_FROM_HOST_TO_SMC_US(table->PhaseResponseTime); in tonga_init_smc_table()
2428 (uint8_t *)&(table->SystemFlags), in tonga_init_smc_table()
2916 static int tonga_set_s0_mc_reg_index(struct tonga_mc_reg_table *table) in tonga_set_s0_mc_reg_index() argument
2921 for (i = 0; i < table->last; i++) { in tonga_set_s0_mc_reg_index()
2922 table->mc_reg_address[i].s0 = in tonga_set_s0_mc_reg_index()
2923 tonga_check_s0_mc_reg_index(table->mc_reg_address[i].s1, in tonga_set_s0_mc_reg_index()
2926 table->mc_reg_address[i].s1; in tonga_set_s0_mc_reg_index()
2931 static int tonga_copy_vbios_smc_reg_table(const pp_atomctrl_mc_reg_table *table, in tonga_copy_vbios_smc_reg_table() argument
2936 PP_ASSERT_WITH_CODE((table->last <= SMU72_DISCRETE_MC_REGISTER_ARRAY_SIZE), in tonga_copy_vbios_smc_reg_table()
2938 PP_ASSERT_WITH_CODE((table->num_entries <= MAX_AC_TIMING_ENTRIES), in tonga_copy_vbios_smc_reg_table()
2941 for (i = 0; i < table->last; i++) in tonga_copy_vbios_smc_reg_table()
2942 ni_table->mc_reg_address[i].s1 = table->mc_reg_address[i].s1; in tonga_copy_vbios_smc_reg_table()
2944 ni_table->last = table->last; in tonga_copy_vbios_smc_reg_table()
2946 for (i = 0; i < table->num_entries; i++) { in tonga_copy_vbios_smc_reg_table()
2948 table->mc_reg_table_entry[i].mclk_max; in tonga_copy_vbios_smc_reg_table()
2949 for (j = 0; j < table->last; j++) { in tonga_copy_vbios_smc_reg_table()
2951 table->mc_reg_table_entry[i].mc_data[j]; in tonga_copy_vbios_smc_reg_table()
2955 ni_table->num_entries = table->num_entries; in tonga_copy_vbios_smc_reg_table()
2961 struct tonga_mc_reg_table *table) in tonga_set_mc_special_registers() argument
2967 for (i = 0, j = table->last; i < table->last; i++) { in tonga_set_mc_special_registers()
2971 switch (table->mc_reg_address[i].s1) { in tonga_set_mc_special_registers()
2976 table->mc_reg_address[j].s1 = mmMC_PMG_CMD_EMRS; in tonga_set_mc_special_registers()
2977 table->mc_reg_address[j].s0 = mmMC_SEQ_PMG_CMD_EMRS_LP; in tonga_set_mc_special_registers()
2978 for (k = 0; k < table->num_entries; k++) { in tonga_set_mc_special_registers()
2979 table->mc_reg_table_entry[k].mc_data[j] = in tonga_set_mc_special_registers()
2981 ((table->mc_reg_table_entry[k].mc_data[i] & 0xffff0000) >> 16); in tonga_set_mc_special_registers()
2988 table->mc_reg_address[j].s1 = mmMC_PMG_CMD_MRS; in tonga_set_mc_special_registers()
2989 table->mc_reg_address[j].s0 = mmMC_SEQ_PMG_CMD_MRS_LP; in tonga_set_mc_special_registers()
2990 for (k = 0; k < table->num_entries; k++) { in tonga_set_mc_special_registers()
2991 table->mc_reg_table_entry[k].mc_data[j] = in tonga_set_mc_special_registers()
2993 (table->mc_reg_table_entry[k].mc_data[i] & 0x0000ffff); in tonga_set_mc_special_registers()
2996 table->mc_reg_table_entry[k].mc_data[j] |= 0x100; in tonga_set_mc_special_registers()
3003 table->mc_reg_address[j].s1 = mmMC_PMG_AUTO_CMD; in tonga_set_mc_special_registers()
3004 table->mc_reg_address[j].s0 = mmMC_PMG_AUTO_CMD; in tonga_set_mc_special_registers()
3005 for (k = 0; k < table->num_entries; k++) in tonga_set_mc_special_registers()
3006 table->mc_reg_table_entry[k].mc_data[j] = in tonga_set_mc_special_registers()
3007 (table->mc_reg_table_entry[k].mc_data[i] & 0xffff0000) >> 16; in tonga_set_mc_special_registers()
3015 table->mc_reg_address[j].s1 = mmMC_PMG_CMD_MRS1; in tonga_set_mc_special_registers()
3016 table->mc_reg_address[j].s0 = mmMC_SEQ_PMG_CMD_MRS1_LP; in tonga_set_mc_special_registers()
3017 for (k = 0; k < table->num_entries; k++) { in tonga_set_mc_special_registers()
3018 table->mc_reg_table_entry[k].mc_data[j] = in tonga_set_mc_special_registers()
3020 (table->mc_reg_table_entry[k].mc_data[i] & 0x0000ffff); in tonga_set_mc_special_registers()
3031 table->last = j; in tonga_set_mc_special_registers()
3036 static int tonga_set_valid_flag(struct tonga_mc_reg_table *table) in tonga_set_valid_flag() argument
3040 for (i = 0; i < table->last; i++) { in tonga_set_valid_flag()
3041 for (j = 1; j < table->num_entries; j++) { in tonga_set_valid_flag()
3042 if (table->mc_reg_table_entry[j-1].mc_data[i] != in tonga_set_valid_flag()
3043 table->mc_reg_table_entry[j].mc_data[i]) { in tonga_set_valid_flag()
3044 table->validflag |= (1<<i); in tonga_set_valid_flag()
3057 pp_atomctrl_mc_reg_table *table; in tonga_initialize_mc_reg_table() local
3061 table = kzalloc(sizeof(pp_atomctrl_mc_reg_table), GFP_KERNEL); in tonga_initialize_mc_reg_table()
3063 if (table == NULL) in tonga_initialize_mc_reg_table()
3108 memset(table, 0x00, sizeof(pp_atomctrl_mc_reg_table)); in tonga_initialize_mc_reg_table()
3110 result = atomctrl_initialize_mc_reg_table(hwmgr, module_index, table); in tonga_initialize_mc_reg_table()
3113 result = tonga_copy_vbios_smc_reg_table(table, ni_table); in tonga_initialize_mc_reg_table()
3123 kfree(table); in tonga_initialize_mc_reg_table()