Merge "msm: camera: cpas: Add version map entry for 680 titan version" into camera-kernel.lnx.4.0

This commit is contained in:
Camera Software Integration 2021-01-11 23:37:26 -08:00 • committed by Gerrit - the friendly Code Review server
commit 74553e55b8
2 changed files with 30 additions and 26 deletions

View file

@ -131,6 +131,15 @@ static const uint32_t cam_cpas_hw_version_map
0,
CAM_CPAS_TITAN_570_V200,
},
/* for camera_680 */
{
CAM_CPAS_TITAN_680_V100,
0,
0,
0,
0,
0,
},
/* for camera_165 */
{
CAM_CPAS_TITAN_165_V100,

View file

@ -58,34 +58,29 @@ static int cam_vfe_get_dt_properties(struct cam_hw_soc_info *soc_info)
goto pid;
}
switch (soc_info->hw_version) {
case CAM_CPAS_TITAN_480_V100:
case CAM_CPAS_TITAN_580_V100:
case CAM_CPAS_TITAN_570_V200:
case CAM_CPAS_TITAN_165_V100:
num_ubwc_cfg = of_property_count_u32_elems(of_node,
"ubwc-static-cfg");
if (!of_property_read_bool(of_node, "ubwc-static-cfg")) {
CAM_DBG(CAM_ISP, "ubwc-static-cfg not supported");
goto pid;
}
if (num_ubwc_cfg < 0 || num_ubwc_cfg > UBWC_STATIC_CONFIG_MAX) {
CAM_ERR(CAM_ISP, "wrong num_ubwc_cfg: %d",
num_ubwc_cfg);
rc = num_ubwc_cfg;
goto pid;
}
num_ubwc_cfg = of_property_count_u32_elems(of_node,
"ubwc-static-cfg");
for (i = 0; i < num_ubwc_cfg; i++) {
rc = of_property_read_u32_index(of_node,
"ubwc-static-cfg", i,
&vfe_soc_private->ubwc_static_ctrl[i]);
if (rc < 0) {
CAM_ERR(CAM_ISP,
"unable to read ubwc static config");
break;
}
if (num_ubwc_cfg < 0 || num_ubwc_cfg > UBWC_STATIC_CONFIG_MAX) {
CAM_ERR(CAM_ISP, "wrong num_ubwc_cfg: %d",
num_ubwc_cfg);
rc = num_ubwc_cfg;
goto pid;
}
for (i = 0; i < num_ubwc_cfg; i++) {
rc = of_property_read_u32_index(of_node,
"ubwc-static-cfg", i,
&vfe_soc_private->ubwc_static_ctrl[i]);
if (rc < 0) {
CAM_ERR(CAM_ISP,
"unable to read ubwc static config");
}
break;
default:
break;
}
pid:
/* set some default values */