Loading drivers/media/platform/msm/camera_v2/sensor/csiphy/msm_csiphy.c +30 −15 Original line number Diff line number Diff line Loading @@ -295,6 +295,11 @@ static int msm_csiphy_2phase_lane_config( csiphybase = csiphy_dev->base; lane_mask = csiphy_params->lane_mask & 0x1f; lane_enable = msm_camera_io_r(csiphybase + csiphy_dev->ctrl_reg->csiphy_3ph_reg. mipi_csiphy_3ph_cmn_ctrl5.addr); for (i = 0; i < MAX_LANES; i++) { if (mask == 0x2) { if (lane_mask & mask) Loading Loading @@ -332,7 +337,11 @@ static int msm_csiphy_2phase_lane_config( clk_lane = 0; } if (csiphy_params->combo_mode == 1) { /* In combo mode setting the 4th lane * as clk_lane for 1 lane sensor, checking * the lane_mask == 0x18 for one lane sensor */ if ((csiphy_params->combo_mode == 1) && (lane_mask == 0x18)) { val |= 0xA; if (mask == csiphy_dev->ctrl_reg-> csiphy_reg.combo_clk_mask) { Loading Loading @@ -378,6 +387,12 @@ static int msm_csiphy_2phase_lane_config( mipi_csiphy_2ph_lnn_cfg4.data, csiphybase + csiphy_dev->ctrl_reg->csiphy_3ph_reg. mipi_csiphy_2ph_lnn_cfg4.addr + offset); if (lane_mask == 0x18) msm_camera_io_w(0x80, csiphybase + csiphy_dev->ctrl_reg->csiphy_3ph_reg. mipi_csiphy_2ph_lnn_cfg1.addr + offset); } else { msm_camera_io_w(csiphy_dev->ctrl_reg->csiphy_3ph_reg. mipi_csiphy_2ph_lnn_cfg1.data, Loading @@ -399,7 +414,7 @@ static int msm_csiphy_2phase_lane_config( csiphy_dev->ctrl_reg->csiphy_3ph_reg. mipi_csiphy_2ph_lnn_cfg5.addr + offset); } if (clk_lane == 1 && if (clk_lane == 1 && lane_mask != 0x18 && (csiphy_dev->hw_version == CSIPHY_VERSION_V342 || csiphy_dev->hw_version == CSIPHY_VERSION_V342_1)) { msm_camera_io_w(0x1f, Loading Loading @@ -742,17 +757,17 @@ static int msm_csiphy_init(struct csiphy_device *csiphy_dev) } CDBG("%s:%d called\n", __func__, __LINE__); if (csiphy_dev->csiphy_state == CSIPHY_POWER_UP) { pr_err("%s: csiphy invalid state %d\n", __func__, csiphy_dev->csiphy_state); rc = -EINVAL; if (csiphy_dev->ref_count++) { CDBG("%s csiphy refcount = %d\n", __func__, csiphy_dev->ref_count); return rc; } CDBG("%s:%d called\n", __func__, __LINE__); if (csiphy_dev->ref_count++) { CDBG("%s csiphy refcount = %d\n", __func__, csiphy_dev->ref_count); if (csiphy_dev->csiphy_state == CSIPHY_POWER_UP) { pr_err("%s: csiphy invalid state %d\n", __func__, csiphy_dev->csiphy_state); rc = -EINVAL; return rc; } CDBG("%s:%d called\n", __func__, __LINE__); Loading Loading @@ -820,6 +835,12 @@ static int msm_csiphy_init(struct csiphy_device *csiphy_dev) } csiphy_dev->csiphy_sof_debug_count = 0; CDBG("%s:%d called\n", __func__, __LINE__); if (csiphy_dev->ref_count++) { CDBG("%s csiphy refcount = %d\n", __func__, csiphy_dev->ref_count); return rc; } CDBG("%s:%d called\n", __func__, __LINE__); if (csiphy_dev->csiphy_state == CSIPHY_POWER_UP) { pr_err("%s: csiphy invalid state %d\n", __func__, csiphy_dev->csiphy_state); Loading @@ -828,12 +849,6 @@ static int msm_csiphy_init(struct csiphy_device *csiphy_dev) } CDBG("%s:%d called\n", __func__, __LINE__); if (csiphy_dev->ref_count++) { CDBG("%s csiphy refcount = %d\n", __func__, csiphy_dev->ref_count); return rc; } CDBG("%s:%d called\n", __func__, __LINE__); rc = cam_config_ahb_clk(NULL, 0, CAM_AHB_CLIENT_CSIPHY, CAM_AHB_SVS_VOTE); if (rc < 0) { Loading Loading
drivers/media/platform/msm/camera_v2/sensor/csiphy/msm_csiphy.c +30 −15 Original line number Diff line number Diff line Loading @@ -295,6 +295,11 @@ static int msm_csiphy_2phase_lane_config( csiphybase = csiphy_dev->base; lane_mask = csiphy_params->lane_mask & 0x1f; lane_enable = msm_camera_io_r(csiphybase + csiphy_dev->ctrl_reg->csiphy_3ph_reg. mipi_csiphy_3ph_cmn_ctrl5.addr); for (i = 0; i < MAX_LANES; i++) { if (mask == 0x2) { if (lane_mask & mask) Loading Loading @@ -332,7 +337,11 @@ static int msm_csiphy_2phase_lane_config( clk_lane = 0; } if (csiphy_params->combo_mode == 1) { /* In combo mode setting the 4th lane * as clk_lane for 1 lane sensor, checking * the lane_mask == 0x18 for one lane sensor */ if ((csiphy_params->combo_mode == 1) && (lane_mask == 0x18)) { val |= 0xA; if (mask == csiphy_dev->ctrl_reg-> csiphy_reg.combo_clk_mask) { Loading Loading @@ -378,6 +387,12 @@ static int msm_csiphy_2phase_lane_config( mipi_csiphy_2ph_lnn_cfg4.data, csiphybase + csiphy_dev->ctrl_reg->csiphy_3ph_reg. mipi_csiphy_2ph_lnn_cfg4.addr + offset); if (lane_mask == 0x18) msm_camera_io_w(0x80, csiphybase + csiphy_dev->ctrl_reg->csiphy_3ph_reg. mipi_csiphy_2ph_lnn_cfg1.addr + offset); } else { msm_camera_io_w(csiphy_dev->ctrl_reg->csiphy_3ph_reg. mipi_csiphy_2ph_lnn_cfg1.data, Loading @@ -399,7 +414,7 @@ static int msm_csiphy_2phase_lane_config( csiphy_dev->ctrl_reg->csiphy_3ph_reg. mipi_csiphy_2ph_lnn_cfg5.addr + offset); } if (clk_lane == 1 && if (clk_lane == 1 && lane_mask != 0x18 && (csiphy_dev->hw_version == CSIPHY_VERSION_V342 || csiphy_dev->hw_version == CSIPHY_VERSION_V342_1)) { msm_camera_io_w(0x1f, Loading Loading @@ -742,17 +757,17 @@ static int msm_csiphy_init(struct csiphy_device *csiphy_dev) } CDBG("%s:%d called\n", __func__, __LINE__); if (csiphy_dev->csiphy_state == CSIPHY_POWER_UP) { pr_err("%s: csiphy invalid state %d\n", __func__, csiphy_dev->csiphy_state); rc = -EINVAL; if (csiphy_dev->ref_count++) { CDBG("%s csiphy refcount = %d\n", __func__, csiphy_dev->ref_count); return rc; } CDBG("%s:%d called\n", __func__, __LINE__); if (csiphy_dev->ref_count++) { CDBG("%s csiphy refcount = %d\n", __func__, csiphy_dev->ref_count); if (csiphy_dev->csiphy_state == CSIPHY_POWER_UP) { pr_err("%s: csiphy invalid state %d\n", __func__, csiphy_dev->csiphy_state); rc = -EINVAL; return rc; } CDBG("%s:%d called\n", __func__, __LINE__); Loading Loading @@ -820,6 +835,12 @@ static int msm_csiphy_init(struct csiphy_device *csiphy_dev) } csiphy_dev->csiphy_sof_debug_count = 0; CDBG("%s:%d called\n", __func__, __LINE__); if (csiphy_dev->ref_count++) { CDBG("%s csiphy refcount = %d\n", __func__, csiphy_dev->ref_count); return rc; } CDBG("%s:%d called\n", __func__, __LINE__); if (csiphy_dev->csiphy_state == CSIPHY_POWER_UP) { pr_err("%s: csiphy invalid state %d\n", __func__, csiphy_dev->csiphy_state); Loading @@ -828,12 +849,6 @@ static int msm_csiphy_init(struct csiphy_device *csiphy_dev) } CDBG("%s:%d called\n", __func__, __LINE__); if (csiphy_dev->ref_count++) { CDBG("%s csiphy refcount = %d\n", __func__, csiphy_dev->ref_count); return rc; } CDBG("%s:%d called\n", __func__, __LINE__); rc = cam_config_ahb_clk(NULL, 0, CAM_AHB_CLIENT_CSIPHY, CAM_AHB_SVS_VOTE); if (rc < 0) { Loading