From cce99f8e4f8fcc798f13e8f51267ced24a799369 Mon Sep 17 00:00:00 2001 From: Ayush Kumar Date: Thu, 24 Dec 2020 14:43:26 +0530 Subject: [PATCH] msm: camera: cpas: Add version map entry for 680 titan version This change add cpas hw version map entry for 680 titan version. And remove cpas version check for ubwc support. CRs-Fixed: 2825675 Change-Id: I858838a5a774c964a1a09d96114442f69058670a Signed-off-by: Ayush Kumar --- drivers/cam_cpas/cpas_top/cam_cpastop_hw.c | 9 ++++ .../isp_hw_mgr/isp_hw/vfe_hw/cam_vfe_soc.c | 45 +++++++++---------- 2 files changed, 29 insertions(+), 25 deletions(-) diff --git a/drivers/cam_cpas/cpas_top/cam_cpastop_hw.c b/drivers/cam_cpas/cpas_top/cam_cpastop_hw.c index 67faa3443260..d8cb87978ffd 100644 --- a/drivers/cam_cpas/cpas_top/cam_cpastop_hw.c +++ b/drivers/cam_cpas/cpas_top/cam_cpastop_hw.c @@ -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, diff --git a/drivers/cam_isp/isp_hw_mgr/isp_hw/vfe_hw/cam_vfe_soc.c b/drivers/cam_isp/isp_hw_mgr/isp_hw/vfe_hw/cam_vfe_soc.c index 0445ebf378d5..d684f27f3989 100644 --- a/drivers/cam_isp/isp_hw_mgr/isp_hw/vfe_hw/cam_vfe_soc.c +++ b/drivers/cam_isp/isp_hw_mgr/isp_hw/vfe_hw/cam_vfe_soc.c @@ -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 */