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

Commit 6c21f0c7 authored by Gaurav Jindal's avatar Gaurav Jindal
Browse files

msm: camera: tfe: Disable clock if tfe2 is not supported



Depending upon the variant, tfe2 may be fused. If tfe2 is fused,
disable the CSID SOC resources.

CRs-Fixed: 2618848
Change-Id: I55ed323db269b3e3c6e2a1c2690ee14f28d5ad3c
Signed-off-by: default avatarGaurav Jindal <gjindal@codeaurora.org>
parent 6d2eb031
Loading
Loading
Loading
Loading
+10 −2
Original line number Diff line number Diff line
// SPDX-License-Identifier: GPL-2.0-only
/*
 * Copyright (c) 2019, The Linux Foundation. All rights reserved.
 * Copyright (c) 2019-2020, The Linux Foundation. All rights reserved.
 */

#include <linux/iopoll.h>
@@ -2744,6 +2744,14 @@ int cam_tfe_csid_hw_probe_init(struct cam_hw_intf *csid_hw_intf,
			csid_reg->cmn_reg->top_tfe2_fuse_reg);
		if (val) {
			CAM_INFO(CAM_ISP, "TFE 2 is not supported by hardware");

			rc = cam_tfe_csid_disable_soc_resources(
				&tfe_csid_hw->hw_info->soc_info);
			if (rc)
				CAM_ERR(CAM_ISP,
					"CSID:%d Disable CSID SOC failed",
					tfe_csid_hw->hw_intf->hw_idx);
			else
				rc = -EINVAL;
			goto err;
		}