Loading Documentation/devicetree/bindings/media/video/msm-cam-cpas.txt +5 −0 Original line number Diff line number Diff line Loading @@ -71,6 +71,11 @@ First Level Node - CAM CPAS device Value type: <u32> Definition: CAM HW Version information. - camnoc-axi-min-ib-bw Usage: optional Value type: <u64> Definition: Min camnoc axi bw for the given target. - regulator-names Usage: required Value type: <string> Loading drivers/media/platform/msm/camera/cam_cpas/cam_cpas_hw.c +3 −7 Original line number Diff line number Diff line Loading @@ -22,11 +22,6 @@ #include "cam_cpas_hw_intf.h" #include "cam_cpas_soc.h" #define CAM_CPAS_AXI_MIN_MNOC_AB_BW (2048 * 1024) #define CAM_CPAS_AXI_MIN_MNOC_IB_BW (2048 * 1024) #define CAM_CPAS_AXI_MIN_CAMNOC_AB_BW (2048 * 1024) #define CAM_CPAS_AXI_MIN_CAMNOC_IB_BW (3000000000L) static uint cam_min_camnoc_ib_bw; module_param(cam_min_camnoc_ib_bw, uint, 0644); Loading Loading @@ -584,8 +579,9 @@ static int cam_cpas_util_set_camnoc_axi_clk_rate( soc_private->camnoc_axi_clk_bw_margin) / 100; if ((required_camnoc_bw > 0) && (required_camnoc_bw < CAM_CPAS_AXI_MIN_CAMNOC_IB_BW)) required_camnoc_bw = CAM_CPAS_AXI_MIN_CAMNOC_IB_BW; (required_camnoc_bw < soc_private->camnoc_axi_min_ib_bw)) required_camnoc_bw = soc_private->camnoc_axi_min_ib_bw; clk_rate = required_camnoc_bw / soc_private->camnoc_bus_width; Loading drivers/media/platform/msm/camera/cam_cpas/cam_cpas_hw.h +5 −0 Original line number Diff line number Diff line Loading @@ -20,6 +20,11 @@ #define CAM_CPAS_MAX_CLIENTS 30 #define CAM_CPAS_INFLIGHT_WORKS 5 #define CAM_CPAS_AXI_MIN_MNOC_AB_BW (2048 * 1024) #define CAM_CPAS_AXI_MIN_MNOC_IB_BW (2048 * 1024) #define CAM_CPAS_AXI_MIN_CAMNOC_AB_BW (2048 * 1024) #define CAM_CPAS_AXI_MIN_CAMNOC_IB_BW (3000000000L) #define CAM_CPAS_GET_CLIENT_IDX(handle) (handle) #define CAM_CPAS_GET_CLIENT_HANDLE(indx) (indx) Loading drivers/media/platform/msm/camera/cam_cpas/cam_cpas_soc.c +21 −0 Original line number Diff line number Diff line Loading @@ -68,6 +68,27 @@ int cam_cpas_get_custom_dt_info(struct platform_device *pdev, CAM_DBG(CAM_CPAS, "CPAS HW VERSION %x", soc_private->hw_version); soc_private->camnoc_axi_min_ib_bw = 0; rc = of_property_read_u64(of_node, "camnoc-axi-min-ib-bw", &soc_private->camnoc_axi_min_ib_bw); if (rc == -EOVERFLOW) { soc_private->camnoc_axi_min_ib_bw = 0; rc = of_property_read_u32(of_node, "camnoc-axi-min-ib-bw", (u32 *)&soc_private->camnoc_axi_min_ib_bw); } if (rc) { CAM_DBG(CAM_CPAS, "failed to read camnoc-axi-min-ib-bw rc:%d", rc); soc_private->camnoc_axi_min_ib_bw = CAM_CPAS_AXI_MIN_CAMNOC_IB_BW; } CAM_DBG(CAM_CPAS, "camnoc-axi-min-ib-bw = %llu", soc_private->camnoc_axi_min_ib_bw); soc_private->client_id_based = of_property_read_bool(of_node, "client-id-based"); Loading drivers/media/platform/msm/camera/cam_cpas/cam_cpas_soc.h +2 −0 Original line number Diff line number Diff line Loading @@ -47,6 +47,7 @@ struct cam_cpas_vdd_ahb_mapping { * @camnoc_bus_width : CAMNOC Bus width * @camnoc_axi_clk_bw_margin : BW Margin in percentage to add while calculating * camnoc axi clock * @camnoc_axi_min_ib_bw: Min camnoc BW which varies based on target * */ struct cam_cpas_private_soc { Loading @@ -63,6 +64,7 @@ struct cam_cpas_private_soc { bool control_camnoc_axi_clk; uint32_t camnoc_bus_width; uint32_t camnoc_axi_clk_bw_margin; uint64_t camnoc_axi_min_ib_bw; }; int cam_cpas_soc_init_resources(struct cam_hw_soc_info *soc_info, Loading Loading
Documentation/devicetree/bindings/media/video/msm-cam-cpas.txt +5 −0 Original line number Diff line number Diff line Loading @@ -71,6 +71,11 @@ First Level Node - CAM CPAS device Value type: <u32> Definition: CAM HW Version information. - camnoc-axi-min-ib-bw Usage: optional Value type: <u64> Definition: Min camnoc axi bw for the given target. - regulator-names Usage: required Value type: <string> Loading
drivers/media/platform/msm/camera/cam_cpas/cam_cpas_hw.c +3 −7 Original line number Diff line number Diff line Loading @@ -22,11 +22,6 @@ #include "cam_cpas_hw_intf.h" #include "cam_cpas_soc.h" #define CAM_CPAS_AXI_MIN_MNOC_AB_BW (2048 * 1024) #define CAM_CPAS_AXI_MIN_MNOC_IB_BW (2048 * 1024) #define CAM_CPAS_AXI_MIN_CAMNOC_AB_BW (2048 * 1024) #define CAM_CPAS_AXI_MIN_CAMNOC_IB_BW (3000000000L) static uint cam_min_camnoc_ib_bw; module_param(cam_min_camnoc_ib_bw, uint, 0644); Loading Loading @@ -584,8 +579,9 @@ static int cam_cpas_util_set_camnoc_axi_clk_rate( soc_private->camnoc_axi_clk_bw_margin) / 100; if ((required_camnoc_bw > 0) && (required_camnoc_bw < CAM_CPAS_AXI_MIN_CAMNOC_IB_BW)) required_camnoc_bw = CAM_CPAS_AXI_MIN_CAMNOC_IB_BW; (required_camnoc_bw < soc_private->camnoc_axi_min_ib_bw)) required_camnoc_bw = soc_private->camnoc_axi_min_ib_bw; clk_rate = required_camnoc_bw / soc_private->camnoc_bus_width; Loading
drivers/media/platform/msm/camera/cam_cpas/cam_cpas_hw.h +5 −0 Original line number Diff line number Diff line Loading @@ -20,6 +20,11 @@ #define CAM_CPAS_MAX_CLIENTS 30 #define CAM_CPAS_INFLIGHT_WORKS 5 #define CAM_CPAS_AXI_MIN_MNOC_AB_BW (2048 * 1024) #define CAM_CPAS_AXI_MIN_MNOC_IB_BW (2048 * 1024) #define CAM_CPAS_AXI_MIN_CAMNOC_AB_BW (2048 * 1024) #define CAM_CPAS_AXI_MIN_CAMNOC_IB_BW (3000000000L) #define CAM_CPAS_GET_CLIENT_IDX(handle) (handle) #define CAM_CPAS_GET_CLIENT_HANDLE(indx) (indx) Loading
drivers/media/platform/msm/camera/cam_cpas/cam_cpas_soc.c +21 −0 Original line number Diff line number Diff line Loading @@ -68,6 +68,27 @@ int cam_cpas_get_custom_dt_info(struct platform_device *pdev, CAM_DBG(CAM_CPAS, "CPAS HW VERSION %x", soc_private->hw_version); soc_private->camnoc_axi_min_ib_bw = 0; rc = of_property_read_u64(of_node, "camnoc-axi-min-ib-bw", &soc_private->camnoc_axi_min_ib_bw); if (rc == -EOVERFLOW) { soc_private->camnoc_axi_min_ib_bw = 0; rc = of_property_read_u32(of_node, "camnoc-axi-min-ib-bw", (u32 *)&soc_private->camnoc_axi_min_ib_bw); } if (rc) { CAM_DBG(CAM_CPAS, "failed to read camnoc-axi-min-ib-bw rc:%d", rc); soc_private->camnoc_axi_min_ib_bw = CAM_CPAS_AXI_MIN_CAMNOC_IB_BW; } CAM_DBG(CAM_CPAS, "camnoc-axi-min-ib-bw = %llu", soc_private->camnoc_axi_min_ib_bw); soc_private->client_id_based = of_property_read_bool(of_node, "client-id-based"); Loading
drivers/media/platform/msm/camera/cam_cpas/cam_cpas_soc.h +2 −0 Original line number Diff line number Diff line Loading @@ -47,6 +47,7 @@ struct cam_cpas_vdd_ahb_mapping { * @camnoc_bus_width : CAMNOC Bus width * @camnoc_axi_clk_bw_margin : BW Margin in percentage to add while calculating * camnoc axi clock * @camnoc_axi_min_ib_bw: Min camnoc BW which varies based on target * */ struct cam_cpas_private_soc { Loading @@ -63,6 +64,7 @@ struct cam_cpas_private_soc { bool control_camnoc_axi_clk; uint32_t camnoc_bus_width; uint32_t camnoc_axi_clk_bw_margin; uint64_t camnoc_axi_min_ib_bw; }; int cam_cpas_soc_init_resources(struct cam_hw_soc_info *soc_info, Loading