Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 27bb083f authored by Camera Software Integration's avatar Camera Software Integration Committed by Gerrit - the friendly Code Review server
Browse files

Merge "msm: camera: csiphy: reset the secure bits on provider exit" into camera-kernel.lnx.3.1

parents f76c2819 f0a73a6c
Loading
Loading
Loading
Loading
+21 −13
Original line number Diff line number Diff line
@@ -589,17 +589,10 @@ int32_t cam_csiphy_config_dev(struct csiphy_device *csiphy_dev)
	return rc;
}

void cam_csiphy_shutdown(struct csiphy_device *csiphy_dev)
void cam_csiphy_clear_secbits(struct csiphy_device *csiphy_dev)
{
	struct cam_hw_soc_info *soc_info;
	int32_t i = 0;

	if (csiphy_dev->csiphy_state == CAM_CSIPHY_INIT)
		return;

	if (csiphy_dev->csiphy_state == CAM_CSIPHY_START) {
		soc_info = &csiphy_dev->soc_info;

	for (i = 0; i < csiphy_dev->acquire_count; i++) {
		if (csiphy_dev->csiphy_info.secure_mode[i])
			cam_csiphy_notify_secure_mode(
@@ -611,6 +604,21 @@ void cam_csiphy_shutdown(struct csiphy_device *csiphy_dev)

		csiphy_dev->csiphy_cpas_cp_reg_mask[i] = 0;
	}
}

void cam_csiphy_shutdown(struct csiphy_device *csiphy_dev)
{
	struct cam_hw_soc_info *soc_info;

	if (csiphy_dev->csiphy_state == CAM_CSIPHY_INIT)
		return;

	/*
	 * clear the secure bits if the provider crashed
	 */
	cam_csiphy_clear_secbits(csiphy_dev);
	if (csiphy_dev->csiphy_state == CAM_CSIPHY_START) {
		soc_info = &csiphy_dev->soc_info;

		cam_csiphy_reset(csiphy_dev);
		cam_soc_util_disable_platform_resource(soc_info, true, true);