|
@@ -1040,59 +1040,72 @@ static int cam_cpastop_print_poweron_settings(struct cam_hw_info *cpas_hw)
|
|
|
|
|
|
static int cam_cpastop_poweron(struct cam_hw_info *cpas_hw)
|
|
|
{
|
|
|
- int i, j;
|
|
|
+ int i, j, rc = 0;
|
|
|
struct cam_cpas_hw_errata_wa_list *errata_wa_list;
|
|
|
struct cam_cpas_hw_errata_wa *errata_wa;
|
|
|
struct cam_cpas *cpas_core = cpas_hw->core_info;
|
|
|
+ struct cam_cpas_private_soc *soc_private =
|
|
|
+ (struct cam_cpas_private_soc *) cpas_hw->soc_info.soc_private;
|
|
|
bool errata_enabled = false;
|
|
|
|
|
|
for (i = 0; i < cpas_core->num_valid_camnoc; i++)
|
|
|
cam_cpastop_reset_irq(0x0, cpas_hw, i);
|
|
|
|
|
|
- for (i = 0; i < cpas_core->num_valid_camnoc; i++) {
|
|
|
- CAM_DBG(CAM_CPAS, "QOS settings for %s :",
|
|
|
- camnoc_info[i]->camnoc_name);
|
|
|
- for (j = 0; j < camnoc_info[i]->specific_size; j++) {
|
|
|
- if (camnoc_info[i]->specific[j].enable) {
|
|
|
- CAM_DBG(CAM_CPAS,
|
|
|
- "Updating QoS settings port: %d prot name: %s",
|
|
|
- camnoc_info[i]->specific[j].port_type,
|
|
|
- camnoc_info[i]->specific[j].port_name);
|
|
|
- cam_cpas_util_reg_update(cpas_hw, camnoc_info[i]->reg_base,
|
|
|
- &camnoc_info[i]->specific[j].priority_lut_low);
|
|
|
- cam_cpas_util_reg_update(cpas_hw, camnoc_info[i]->reg_base,
|
|
|
- &camnoc_info[i]->specific[j].priority_lut_high);
|
|
|
- cam_cpas_util_reg_update(cpas_hw, camnoc_info[i]->reg_base,
|
|
|
- &camnoc_info[i]->specific[j].urgency);
|
|
|
- cam_cpas_util_reg_update(cpas_hw, camnoc_info[i]->reg_base,
|
|
|
- &camnoc_info[i]->specific[j].danger_lut);
|
|
|
- cam_cpas_util_reg_update(cpas_hw, camnoc_info[i]->reg_base,
|
|
|
- &camnoc_info[i]->specific[j].safe_lut);
|
|
|
- cam_cpas_util_reg_update(cpas_hw, camnoc_info[i]->reg_base,
|
|
|
- &camnoc_info[i]->specific[j].ubwc_ctl);
|
|
|
- cam_cpas_util_reg_update(cpas_hw, camnoc_info[i]->reg_base,
|
|
|
- &camnoc_info[i]->specific[j].flag_out_set0_low);
|
|
|
- cam_cpas_util_reg_update(cpas_hw, camnoc_info[i]->reg_base,
|
|
|
- &camnoc_info[i]->specific[j].dynattr_mainctl);
|
|
|
- cam_cpas_util_reg_update(cpas_hw, camnoc_info[i]->reg_base,
|
|
|
- &camnoc_info[i]->specific[j].qosgen_mainctl);
|
|
|
- cam_cpas_util_reg_update(cpas_hw, camnoc_info[i]->reg_base,
|
|
|
- &camnoc_info[i]->specific[j].qosgen_shaping_low);
|
|
|
- cam_cpas_util_reg_update(cpas_hw, camnoc_info[i]->reg_base,
|
|
|
- &camnoc_info[i]->specific[j].qosgen_shaping_high);
|
|
|
+ if (!soc_private->enable_secure_qos_update) {
|
|
|
+ for (i = 0; i < cpas_core->num_valid_camnoc; i++) {
|
|
|
+ CAM_DBG(CAM_CPAS, "QOS settings for %s :",
|
|
|
+ camnoc_info[i]->camnoc_name);
|
|
|
+ for (j = 0; j < camnoc_info[i]->specific_size; j++) {
|
|
|
+ if (camnoc_info[i]->specific[j].enable) {
|
|
|
+ CAM_DBG(CAM_CPAS,
|
|
|
+ "Updating QoS settings port: %d prot name: %s",
|
|
|
+ camnoc_info[i]->specific[j].port_type,
|
|
|
+ camnoc_info[i]->specific[j].port_name);
|
|
|
+
|
|
|
+ cam_cpas_util_reg_update(cpas_hw, camnoc_info[i]->reg_base,
|
|
|
+ &camnoc_info[i]->specific[j].priority_lut_low);
|
|
|
+ cam_cpas_util_reg_update(cpas_hw, camnoc_info[i]->reg_base,
|
|
|
+ &camnoc_info[i]->specific[j].priority_lut_high);
|
|
|
+ cam_cpas_util_reg_update(cpas_hw, camnoc_info[i]->reg_base,
|
|
|
+ &camnoc_info[i]->specific[j].urgency);
|
|
|
+ cam_cpas_util_reg_update(cpas_hw, camnoc_info[i]->reg_base,
|
|
|
+ &camnoc_info[i]->specific[j].danger_lut);
|
|
|
+ cam_cpas_util_reg_update(cpas_hw, camnoc_info[i]->reg_base,
|
|
|
+ &camnoc_info[i]->specific[j].safe_lut);
|
|
|
+ cam_cpas_util_reg_update(cpas_hw, camnoc_info[i]->reg_base,
|
|
|
+ &camnoc_info[i]->specific[j].ubwc_ctl);
|
|
|
+ cam_cpas_util_reg_update(cpas_hw, camnoc_info[i]->reg_base,
|
|
|
+ &camnoc_info[i]->specific[j].flag_out_set0_low);
|
|
|
+ cam_cpas_util_reg_update(cpas_hw, camnoc_info[i]->reg_base,
|
|
|
+ &camnoc_info[i]->specific[j].dynattr_mainctl);
|
|
|
+ cam_cpas_util_reg_update(cpas_hw, camnoc_info[i]->reg_base,
|
|
|
+ &camnoc_info[i]->specific[j].qosgen_mainctl);
|
|
|
+ cam_cpas_util_reg_update(cpas_hw, camnoc_info[i]->reg_base,
|
|
|
+ &camnoc_info[i]->specific[j].qosgen_shaping_low);
|
|
|
+ cam_cpas_util_reg_update(cpas_hw, camnoc_info[i]->reg_base,
|
|
|
+ &camnoc_info[i]->specific[j].qosgen_shaping_high);
|
|
|
+ }
|
|
|
}
|
|
|
- }
|
|
|
|
|
|
- if (!errata_enabled) {
|
|
|
- errata_wa_list = camnoc_info[i]->errata_wa_list;
|
|
|
- if (errata_wa_list) {
|
|
|
- errata_wa = &errata_wa_list->tcsr_camera_hf_sf_ares_glitch;
|
|
|
- if (errata_wa->enable) {
|
|
|
- cam_cpastop_scm_write(errata_wa);
|
|
|
- errata_enabled = true;
|
|
|
+ if (!errata_enabled) {
|
|
|
+ errata_wa_list = camnoc_info[i]->errata_wa_list;
|
|
|
+ if (errata_wa_list) {
|
|
|
+ errata_wa = &errata_wa_list->tcsr_camera_hf_sf_ares_glitch;
|
|
|
+ if (errata_wa->enable) {
|
|
|
+ cam_cpastop_scm_write(errata_wa);
|
|
|
+ errata_enabled = true;
|
|
|
+ }
|
|
|
}
|
|
|
}
|
|
|
}
|
|
|
+ } else {
|
|
|
+ CAM_DBG(CAM_CPAS, "Updating secure camera static QoS settings");
|
|
|
+ rc = cam_update_camnoc_qos_settings(CAM_QOS_UPDATE_TYPE_STATIC, 0, NULL);
|
|
|
+ if (rc) {
|
|
|
+ CAM_ERR(CAM_CPAS, "Secure camera static OoS update failed: %d", rc);
|
|
|
+ return rc;
|
|
|
+ }
|
|
|
+ CAM_DBG(CAM_CPAS, "Updated secure camera static QoS settings");
|
|
|
}
|
|
|
|
|
|
return 0;
|