Lines Matching refs:smumgr
40 static int tonga_start_in_protection_mode(struct pp_smumgr *smumgr) in tonga_start_in_protection_mode() argument
45 SMUM_WRITE_VFPF_INDIRECT_FIELD(smumgr->device, CGS_IND_REG__SMC, in tonga_start_in_protection_mode()
48 result = smu7_upload_smu_firmware_image(smumgr); in tonga_start_in_protection_mode()
53 cgs_write_ind_register(smumgr->device, CGS_IND_REG__SMC, in tonga_start_in_protection_mode()
57 SMUM_WRITE_VFPF_INDIRECT_FIELD(smumgr->device, CGS_IND_REG__SMC, in tonga_start_in_protection_mode()
61 SMUM_WRITE_VFPF_INDIRECT_FIELD(smumgr->device, CGS_IND_REG__SMC, in tonga_start_in_protection_mode()
65 SMUM_WRITE_VFPF_INDIRECT_FIELD(smumgr->device, CGS_IND_REG__SMC, in tonga_start_in_protection_mode()
69 cgs_write_ind_register(smumgr->device, CGS_IND_REG__SMC, in tonga_start_in_protection_mode()
72 SMUM_WAIT_VFPF_INDIRECT_FIELD(smumgr, SMC_IND, in tonga_start_in_protection_mode()
78 smu7_send_msg_to_smc_offset(smumgr); in tonga_start_in_protection_mode()
81 SMUM_WAIT_VFPF_INDIRECT_FIELD_UNEQUAL(smumgr, SMC_IND, in tonga_start_in_protection_mode()
85 if (1 != SMUM_READ_VFPF_INDIRECT_FIELD(smumgr->device, in tonga_start_in_protection_mode()
92 SMUM_WAIT_VFPF_INDIRECT_FIELD(smumgr, SMC_IND, in tonga_start_in_protection_mode()
99 static int tonga_start_in_non_protection_mode(struct pp_smumgr *smumgr) in tonga_start_in_non_protection_mode() argument
104 SMUM_WAIT_VFPF_INDIRECT_FIELD_UNEQUAL(smumgr, SMC_IND, in tonga_start_in_non_protection_mode()
108 cgs_write_ind_register(smumgr->device, CGS_IND_REG__SMC, in tonga_start_in_non_protection_mode()
112 SMUM_WRITE_VFPF_INDIRECT_FIELD(smumgr->device, CGS_IND_REG__SMC, in tonga_start_in_non_protection_mode()
115 result = smu7_upload_smu_firmware_image(smumgr); in tonga_start_in_non_protection_mode()
121 smu7_program_jump_on_start(smumgr); in tonga_start_in_non_protection_mode()
124 SMUM_WRITE_VFPF_INDIRECT_FIELD(smumgr->device, CGS_IND_REG__SMC, in tonga_start_in_non_protection_mode()
128 SMUM_WRITE_VFPF_INDIRECT_FIELD(smumgr->device, CGS_IND_REG__SMC, in tonga_start_in_non_protection_mode()
132 SMUM_WAIT_VFPF_INDIRECT_FIELD(smumgr, SMC_IND, in tonga_start_in_non_protection_mode()
138 static int tonga_start_smu(struct pp_smumgr *smumgr) in tonga_start_smu() argument
143 if (!smu7_is_smc_ram_running(smumgr)) { in tonga_start_smu()
145 if (0 == SMUM_READ_VFPF_INDIRECT_FIELD(smumgr->device, CGS_IND_REG__SMC, in tonga_start_smu()
147 result = tonga_start_in_non_protection_mode(smumgr); in tonga_start_smu()
151 result = tonga_start_in_protection_mode(smumgr); in tonga_start_smu()
157 result = smu7_request_smu_load_fw(smumgr); in tonga_start_smu()
169 static int tonga_smu_init(struct pp_smumgr *smumgr) in tonga_smu_init() argument
171 struct tonga_smumgr *smu_data = (struct tonga_smumgr *)(smumgr->backend); in tonga_smu_init()
175 if (smu7_init(smumgr)) in tonga_smu_init()
208 int tonga_smum_init(struct pp_smumgr *smumgr) in tonga_smum_init() argument
217 smumgr->backend = tonga_smu; in tonga_smum_init()
218 smumgr->smumgr_funcs = &tonga_smu_funcs; in tonga_smum_init()