From nobody Fri Dec 19 15:18:38 2025 Received: from mx0a-0031df01.pphosted.com (mx0a-0031df01.pphosted.com [205.220.168.131]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 1265F2EC55C for ; Sun, 12 Oct 2025 16:23:55 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=205.220.168.131 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1760286247; cv=none; b=QijtITiiQ9cE+kP8GhoAn2qCpvVVBxfoiw49nxnsLUAnIL6qbYcB93XzMhp87UFUvBURSwHtzQLHdI0YxKPnyOfcxLLaPbWqMqf7go8zUg6Mqzg5rIZ4T1qsKbDAN3thfNaxdA2oTaMkndgvSyXmydIUFAHi/XNnafZ51BPuZZY= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1760286247; c=relaxed/simple; bh=2L4dIKk6ZY/FJ9FIa3pJYnA0sfqUGLbJJFlrdXMdCOU=; h=From:Date:Subject:MIME-Version:Content-Type:Message-Id:References: In-Reply-To:To:Cc; b=bCFoMQQa6Rc9wO/JvlPVv5iPgaWQGXJh0t1XwFHDJUDry4YnSKHG+thyZu4gPxy7UFzAykfbNOLO9oUnpbZ5EATg/KC5CBxD2HKJgpHrx/i96S4Udke3A608UG3Ov2cakRB5DSCbYLHUgHen1PG6t7IoyM8SMjTNRDFIrKn0+ew= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=oss.qualcomm.com; spf=pass smtp.mailfrom=oss.qualcomm.com; dkim=pass (2048-bit key) header.d=qualcomm.com header.i=@qualcomm.com header.b=GwXl+PEc; arc=none smtp.client-ip=205.220.168.131 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=oss.qualcomm.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=oss.qualcomm.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=qualcomm.com header.i=@qualcomm.com header.b="GwXl+PEc" Received: from pps.filterd (m0279864.ppops.net [127.0.0.1]) by mx0a-0031df01.pphosted.com (8.18.1.2/8.18.1.2) with ESMTP id 59CFlIMi004393 for ; Sun, 12 Oct 2025 16:23:51 GMT DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=qualcomm.com; h= cc:content-transfer-encoding:content-type:date:from:in-reply-to :message-id:mime-version:references:subject:to; s=qcppdkim1; bh= tWabY8gftkzC9JrOZ4Ek/4oJxm6WnV5RvqX/3ANhZGs=; b=GwXl+PEcEJAhO/22 6IN7Qz/2hKct4OuaVhg7qdrfuUHsyOjxtJVpp5J/QzRUorBm++8TbyhWMbio1wS0 auXhSpOJ3Y5EIGGGFu0hmyhs6ySX2Vk07jYmHgRxQwtH4Vf50sv7BQ7ZEnRmtM9q hpSAmFn+NlqbBwnBxRsxZCzNX11YvTSNmOzXiky64q/ppzZR29zR0xFl8GgGXnFZ K09guX3vKc5ivPeqzQhbHHTWJhWYZ3Z9jrV/7RCwnsSJiRZyh9LK0/Ddv1zP9jPt I28uqf+XSkUHP0mKGVLT60Z0diG/b82mAkGllcN5qRW5bwvJkopq6aVo5H5vWsSy z1Xj8g== Received: from mail-qk1-f197.google.com (mail-qk1-f197.google.com [209.85.222.197]) by mx0a-0031df01.pphosted.com (PPS) with ESMTPS id 49qgdft5m3-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128 verify=NOT) for ; Sun, 12 Oct 2025 16:23:51 +0000 (GMT) Received: by mail-qk1-f197.google.com with SMTP id af79cd13be357-857003e911fso2044368785a.3 for ; Sun, 12 Oct 2025 09:23:51 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1760286229; x=1760891029; h=cc:to:in-reply-to:references:message-id:content-transfer-encoding :mime-version:subject:date:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=tWabY8gftkzC9JrOZ4Ek/4oJxm6WnV5RvqX/3ANhZGs=; b=YS0CeIM4z4v9f0TSxR2qT7AjwPhNreMMgySIK1U/AAs2bpaA+0L846yuj4kzrwmoon M+q/xvAS30PFxaO7kgu9Exc8j44+vHy6Zu0o2T893j3zZ2/qdKYZPqtB2G8BIdCwRPCv YHAs5wjMOMYaYNQeQZJA8H1JyUcPVAsN9vzFuN9Ciyq4B2E6UbJI6ocAiGZTutoGUdvK KJLdBHX8cYDza++lKcQfDZE1MvIMbqDj92cHzM7NvgfK9/934JglMOsYGa5u35DxMeeF vnuLt/ZWEBMecMKZ1pSHB26bofrQv1YeybZZrSiPeuedX4Io42nu9zEUE+vyCeaJR8wC siqQ== X-Forwarded-Encrypted: i=1; AJvYcCWrwiX11uYTsHI5Csw/vtoEEHwTU7Tip0c9sr//wLpSitgxkNfDWRZMVVZ5BPiBDamdlFZQNmShmQTBHaE=@vger.kernel.org X-Gm-Message-State: AOJu0Ywy2eT0B7DSh6hFGHhhfiYNORfIoePcqUZMdd3hn3XWWHdTD+BO K4Euaphb5X5HSt3mNnYAXmJh2xUmwwb7Lng7LteJNz5aBVZ74ytWw4Aw8DI9CZnauj4CQEQSF9t nl4HDVK8Iiui+fMvEd2SrTLS8HM+4DRk/QN60CJqKGZkLNJxkgG65ME6cbMBB1ZLVc/I= X-Gm-Gg: ASbGncsYi6Po+A3URqg5ATc+GhcuJbaQMiQwcFfaloCudyuADArYMOlAhuH2UeDeCPr 07dlAmlyUidw81dtOxXBBNQchobPi0Mx/GRVdZfEYNooo0EwOJdjAsqVdDIUX06dlurWfB3zC8B YacgwcKz9Wx9c4CUxSYCNFTBpO+vmXKO7d6Bwxqzksj6x3+VghV8IwLDwem+OBEifcZ74uy1fX2 IutUNMyIMAvJqdpUwdpD7CoL9bbawQuwmAPH/84lrpTqrfkA1sTBZgmjii6jIJHFOig5oXwknaU IujBMp7x1sB7Xn9cTVSBrWYrGg8ERwIZyqx98Ik6bet3apDPdipZrTUMdM7KL8zahYF1YE/zBBR R22Dsiqk8aX1jRGcjQC/WgsGb5sMI65PdP74aE0Qal40cFrl3eXms X-Received: by 2002:a05:620a:f0e:b0:850:222a:817d with SMTP id af79cd13be357-88350f578camr2390384485a.37.1760286229334; Sun, 12 Oct 2025 09:23:49 -0700 (PDT) X-Google-Smtp-Source: AGHT+IFgdeRrEX0yLdgYYQ8HSehyJ8d5qNPjcgLygT+LVvxqCHcYKm3OAktK/rV05nQTDX1XGIfGnQ== X-Received: by 2002:a05:620a:f0e:b0:850:222a:817d with SMTP id af79cd13be357-88350f578camr2390380885a.37.1760286228799; Sun, 12 Oct 2025 09:23:48 -0700 (PDT) Received: from umbar.lan (2001-14ba-a0c3-3a00-264b-feff-fe8b-be8a.rev.dnainternet.fi. [2001:14ba:a0c3:3a00:264b:feff:fe8b:be8a]) by smtp.gmail.com with ESMTPSA id 2adb3069b0e04-590881fe5besm3112637e87.50.2025.10.12.09.23.47 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 12 Oct 2025 09:23:48 -0700 (PDT) From: Dmitry Baryshkov Date: Sun, 12 Oct 2025 19:23:35 +0300 Subject: [PATCH v2 8/8] media: iris: enable support for SC7280 platform Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Message-Id: <20251012-iris-sc7280-v2-8-d53a1a4056c3@oss.qualcomm.com> References: <20251012-iris-sc7280-v2-0-d53a1a4056c3@oss.qualcomm.com> In-Reply-To: <20251012-iris-sc7280-v2-0-d53a1a4056c3@oss.qualcomm.com> To: Vikash Garodia , Dikshita Agarwal , Abhinav Kumar , Bryan O'Donoghue , Mauro Carvalho Chehab , Konrad Dybcio Cc: linux-media@vger.kernel.org, linux-arm-msm@vger.kernel.org, linux-kernel@vger.kernel.org X-Mailer: b4 0.14.2 X-Developer-Signature: v=1; a=openpgp-sha256; l=10303; i=dmitry.baryshkov@oss.qualcomm.com; h=from:subject:message-id; bh=2L4dIKk6ZY/FJ9FIa3pJYnA0sfqUGLbJJFlrdXMdCOU=; b=owEBbQGS/pANAwAKAYs8ij4CKSjVAcsmYgBo69YE1I7MKbUtgytMB1QBmrtLRktoKRifhEjEB hT6H7bWLs+JATMEAAEKAB0WIQRMcISVXLJjVvC4lX+LPIo+Aiko1QUCaOvWBAAKCRCLPIo+Aiko 1cQYB/4iJ2DhE/kLf6VGQH3aW6IkH2RKhsXPvmDjbY5NFy/80lvgn/RC5hqiQVxYLI671mqxe8a fmJVubPZOEtJJEWgHgpB10EdGplr7Gtl5Jzh/Vj4VAsHqFwu/A6R6/3pmH5l/XYPOH2DyZ+B3kE Hs+DnUNL6I3d+8QJ3Yt5JQ0mLnjlijhBV45mpBu65aC/16UyVosaBE/Mq5qlhFElG5Bbk+8Rl6D /GzmgIzKTlHchVtSBmaq9URtvFVcnpbNTxg6T3D22pFsS26YrZkE86QfWeAmHX/XrLnstQybRQ/ 4tcNqz6xeOTtdt7iWFsAF5uM3KspbtEaQg4VNzmpmaAQcbRu X-Developer-Key: i=dmitry.baryshkov@oss.qualcomm.com; a=openpgp; fpr=8F88381DD5C873E4AE487DA5199BF1243632046A X-Proofpoint-Spam-Details-Enc: AW1haW4tMjUxMDExMDAyNSBTYWx0ZWRfX6onOKQaqbnp9 UjU9XeF+arYacxNRQi3rMPj1q+9qgZPkLIzKPs1HCLUWFFMoEQ8v1ynTutHY3WppalRwSWhcOTu NOlWjvSu6b/frdX5kh/GoHo16J91eQ4EHt2kochMluhFQZKoxwRG2nxkXtCbgHgQyGW4655hIsk xFYd8G8t3LWrNameMvoL8GucSX97DH7laH157uvVIxn43T5GHiBGHey9xWo7WjtpBnhCajqO+wx 94HH/GmYbx6Mwlg1wHsuZMSqdNBQ4PoWfRlLrtM2mpQibP389nj9mjxieqIqHB0kfc0+GD9UNCh qeKQs+qi6OZOFISeym3mort43uFTCncSPV0fohoI8B82EzBZjKBDMahiy//bwjddaEH1fZPXNJW GdZVc09uiv9Az99ry+KS5I6FqpK0EA== X-Proofpoint-GUID: IivFGh9GsIrLqX72SmI9blsi0CbeOD7B X-Proofpoint-ORIG-GUID: IivFGh9GsIrLqX72SmI9blsi0CbeOD7B X-Authority-Analysis: v=2.4 cv=J4ynLQnS c=1 sm=1 tr=0 ts=68ebd617 cx=c_pps a=50t2pK5VMbmlHzFWWp8p/g==:117 a=xqWC_Br6kY4A:10 a=IkcTkHD0fZMA:10 a=x6icFKpwvdMA:10 a=EUspDBNiAAAA:8 a=5iJXzg3vIJBiWc8SjKUA:9 a=QEXdDO2ut3YA:10 a=IoWCM6iH3mJn3m4BftBB:22 X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.293,Aquarius:18.0.1117,Hydra:6.1.9,FMLib:17.12.80.40 definitions=2025-10-12_06,2025-10-06_01,2025-03-28_01 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 impostorscore=0 lowpriorityscore=0 priorityscore=1501 adultscore=0 bulkscore=0 suspectscore=0 clxscore=1015 phishscore=0 spamscore=0 malwarescore=0 classifier=typeunknown authscore=0 authtc= authcc= route=outbound adjust=0 reason=mlx scancount=1 engine=8.19.0-2510020000 definitions=main-2510110025 As a part of migrating code from the old Venus driver to the new Iris one, add support for the SC7280 platform. It is very similar to SM8250, but it (currently) uses no reset controls (there is an optional GCC-generated reset, it will be added later) and no AON registers region. Extend the VPU ops to support optional clocks and skip the AON shutdown for this platform. Signed-off-by: Dmitry Baryshkov --- .../platform/qcom/iris/iris_platform_common.h | 4 ++ .../media/platform/qcom/iris/iris_platform_gen1.c | 52 ++++++++++++++++++= ++++ drivers/media/platform/qcom/iris/iris_probe.c | 4 ++ drivers/media/platform/qcom/iris/iris_resources.c | 2 +- drivers/media/platform/qcom/iris/iris_vpu2.c | 6 +++ drivers/media/platform/qcom/iris/iris_vpu_common.c | 34 ++++++++++---- 6 files changed, 92 insertions(+), 10 deletions(-) diff --git a/drivers/media/platform/qcom/iris/iris_platform_common.h b/driv= ers/media/platform/qcom/iris/iris_platform_common.h index 104ff38219e30e6d52476d44b54338c55ef2ca7b..43cd6bf94ab600e53f983c9e11b= 63dc0a572e6ad 100644 --- a/drivers/media/platform/qcom/iris/iris_platform_common.h +++ b/drivers/media/platform/qcom/iris/iris_platform_common.h @@ -42,6 +42,7 @@ enum pipe_type { }; =20 extern const struct iris_platform_data qcs8300_data; +extern const struct iris_platform_data sc7280_data; extern const struct iris_platform_data sm8250_data; extern const struct iris_platform_data sm8550_data; extern const struct iris_platform_data sm8650_data; @@ -50,7 +51,9 @@ extern const struct iris_platform_data sm8750_data; enum platform_clk_type { IRIS_AXI_CLK, /* AXI0 in case of platforms with multiple AXI clocks */ IRIS_CTRL_CLK, + IRIS_AHB_CLK, IRIS_HW_CLK, + IRIS_HW_AXI_CLK, IRIS_AXI1_CLK, IRIS_CTRL_FREERUN_CLK, IRIS_HW_FREERUN_CLK, @@ -230,6 +233,7 @@ struct iris_platform_data { u32 hw_response_timeout; struct ubwc_config_data *ubwc_config; u32 num_vpp_pipe; + bool no_aon; u32 max_session_count; /* max number of macroblocks per frame supported */ u32 max_core_mbpf; diff --git a/drivers/media/platform/qcom/iris/iris_platform_gen1.c b/driver= s/media/platform/qcom/iris/iris_platform_gen1.c index 2b3b8bd00a6096acaae928318d9231847ec89855..828864902501aef072d60935fe5= 7019a70dcb9f4 100644 --- a/drivers/media/platform/qcom/iris/iris_platform_gen1.c +++ b/drivers/media/platform/qcom/iris/iris_platform_gen1.c @@ -12,6 +12,8 @@ #include "iris_vpu_buffer.h" #include "iris_vpu_common.h" =20 +#include "iris_platform_sc7280.h" + #define BITRATE_MIN 32000 #define BITRATE_MAX 160000000 #define BITRATE_PEAK_DEFAULT (BITRATE_DEFAULT * 2) @@ -364,3 +366,53 @@ const struct iris_platform_data sm8250_data =3D { .enc_ip_int_buf_tbl =3D sm8250_enc_ip_int_buf_tbl, .enc_ip_int_buf_tbl_size =3D ARRAY_SIZE(sm8250_enc_ip_int_buf_tbl), }; + +const struct iris_platform_data sc7280_data =3D { + .get_instance =3D iris_hfi_gen1_get_instance, + .init_hfi_command_ops =3D &iris_hfi_gen1_command_ops_init, + .init_hfi_response_ops =3D iris_hfi_gen1_response_ops_init, + .get_vpu_buffer_size =3D iris_vpu_buf_size, + .vpu_ops =3D &iris_vpu2_ops, + .set_preset_registers =3D iris_set_sm8250_preset_registers, + .icc_tbl =3D sm8250_icc_table, + .icc_tbl_size =3D ARRAY_SIZE(sm8250_icc_table), + .bw_tbl_dec =3D sc7280_bw_table_dec, + .bw_tbl_dec_size =3D ARRAY_SIZE(sc7280_bw_table_dec), + .pmdomain_tbl =3D sm8250_pmdomain_table, + .pmdomain_tbl_size =3D ARRAY_SIZE(sm8250_pmdomain_table), + .opp_pd_tbl =3D sc7280_opp_pd_table, + .opp_pd_tbl_size =3D ARRAY_SIZE(sc7280_opp_pd_table), + .clk_tbl =3D sc7280_clk_table, + .clk_tbl_size =3D ARRAY_SIZE(sc7280_clk_table), + /* Upper bound of DMA address range */ + .dma_mask =3D 0xe0000000 - 1, + .fwname =3D "qcom/vpu/vpu20_p1.mbn", + .pas_id =3D IRIS_PAS_ID, + .inst_caps =3D &platform_inst_cap_sm8250, + .inst_fw_caps_dec =3D inst_fw_cap_sm8250_dec, + .inst_fw_caps_dec_size =3D ARRAY_SIZE(inst_fw_cap_sm8250_dec), + .inst_fw_caps_enc =3D inst_fw_cap_sm8250_enc, + .inst_fw_caps_enc_size =3D ARRAY_SIZE(inst_fw_cap_sm8250_enc), + .tz_cp_config_data =3D &tz_cp_config_sm8250, + .hw_response_timeout =3D HW_RESPONSE_TIMEOUT_VALUE, + .num_vpp_pipe =3D 4, + .no_aon =3D true, + .max_session_count =3D 16, + .max_core_mbpf =3D NUM_MBS_8K, + .max_core_mbps =3D ((7680 * 4320) / 256) * 60, + .dec_input_config_params_default =3D + sm8250_vdec_input_config_param_default, + .dec_input_config_params_default_size =3D + ARRAY_SIZE(sm8250_vdec_input_config_param_default), + .enc_input_config_params =3D sm8250_venc_input_config_param, + .enc_input_config_params_size =3D + ARRAY_SIZE(sm8250_venc_input_config_param), + + .dec_ip_int_buf_tbl =3D sm8250_dec_ip_int_buf_tbl, + .dec_ip_int_buf_tbl_size =3D ARRAY_SIZE(sm8250_dec_ip_int_buf_tbl), + .dec_op_int_buf_tbl =3D sm8250_dec_op_int_buf_tbl, + .dec_op_int_buf_tbl_size =3D ARRAY_SIZE(sm8250_dec_op_int_buf_tbl), + + .enc_ip_int_buf_tbl =3D sm8250_enc_ip_int_buf_tbl, + .enc_ip_int_buf_tbl_size =3D ARRAY_SIZE(sm8250_enc_ip_int_buf_tbl), +}; diff --git a/drivers/media/platform/qcom/iris/iris_probe.c b/drivers/media/= platform/qcom/iris/iris_probe.c index 00e99be16e087c4098f930151fd76cd381d721ce..9bc9b34c2576581635fa8d87eed= 1965657eb3eb3 100644 --- a/drivers/media/platform/qcom/iris/iris_probe.c +++ b/drivers/media/platform/qcom/iris/iris_probe.c @@ -357,6 +357,10 @@ static const struct of_device_id iris_dt_match[] =3D { .data =3D &qcs8300_data, }, #if (!IS_ENABLED(CONFIG_VIDEO_QCOM_VENUS)) + { + .compatible =3D "qcom,sc7280-venus", + .data =3D &sc7280_data, + }, { .compatible =3D "qcom,sm8250-venus", .data =3D &sm8250_data, diff --git a/drivers/media/platform/qcom/iris/iris_resources.c b/drivers/me= dia/platform/qcom/iris/iris_resources.c index cf32f268b703c1c042a9bcf146e444fff4f4990d..164490c49c95ee048670981fdab= 014d20436ef85 100644 --- a/drivers/media/platform/qcom/iris/iris_resources.c +++ b/drivers/media/platform/qcom/iris/iris_resources.c @@ -112,7 +112,7 @@ int iris_prepare_enable_clock(struct iris_core *core, e= num platform_clk_type clk =20 clock =3D iris_get_clk_by_type(core, clk_type); if (!clock) - return -EINVAL; + return -ENOENT; =20 return clk_prepare_enable(clock); } diff --git a/drivers/media/platform/qcom/iris/iris_vpu2.c b/drivers/media/p= latform/qcom/iris/iris_vpu2.c index de7d142316d2dc9ab0c4ad9cc8161c87ac949b4c..9c103a2e4e4eafee101a8a9b168= fdc8ca76e277d 100644 --- a/drivers/media/platform/qcom/iris/iris_vpu2.c +++ b/drivers/media/platform/qcom/iris/iris_vpu2.c @@ -3,9 +3,15 @@ * Copyright (c) 2022-2024 Qualcomm Innovation Center, Inc. All rights res= erved. */ =20 +#include +#include +#include + #include "iris_instance.h" #include "iris_vpu_common.h" =20 +#include "iris_vpu_register_defines.h" + static u64 iris_vpu2_calc_freq(struct iris_inst *inst, size_t data_size) { struct platform_inst_caps *caps =3D inst->core->iris_platform_data->inst_= caps; diff --git a/drivers/media/platform/qcom/iris/iris_vpu_common.c b/drivers/m= edia/platform/qcom/iris/iris_vpu_common.c index 2d6548e47d47967c1c110489cb8088130fb625fd..f8fd120873ccdcb5239985d0d6a= 8bbda144a98f6 100644 --- a/drivers/media/platform/qcom/iris/iris_vpu_common.c +++ b/drivers/media/platform/qcom/iris/iris_vpu_common.c @@ -179,12 +179,14 @@ int iris_vpu_power_off_controller(struct iris_core *c= ore) =20 writel(MSK_SIGNAL_FROM_TENSILICA | MSK_CORE_POWER_ON, core->reg_base + CP= U_CS_X2RPMH); =20 - writel(REQ_POWER_DOWN_PREP, core->reg_base + AON_WRAPPER_MVP_NOC_LPI_CONT= ROL); + if (!core->iris_platform_data->no_aon) { + writel(REQ_POWER_DOWN_PREP, core->reg_base + AON_WRAPPER_MVP_NOC_LPI_CON= TROL); =20 - ret =3D readl_poll_timeout(core->reg_base + AON_WRAPPER_MVP_NOC_LPI_STATU= S, - val, val & BIT(0), 200, 2000); - if (ret) - goto disable_power; + ret =3D readl_poll_timeout(core->reg_base + AON_WRAPPER_MVP_NOC_LPI_STAT= US, + val, val & BIT(0), 200, 2000); + if (ret) + goto disable_power; + } =20 writel(REQ_POWER_DOWN_PREP, core->reg_base + WRAPPER_IRIS_CPU_NOC_LPI_CON= TROL); =20 @@ -207,6 +209,7 @@ int iris_vpu_power_off_controller(struct iris_core *cor= e) writel(0x0, core->reg_base + WRAPPER_TZ_CTL_AXI_CLOCK_CONFIG); =20 disable_power: + iris_disable_unprepare_clock(core, IRIS_AHB_CLK); iris_disable_unprepare_clock(core, IRIS_CTRL_CLK); iris_disable_unprepare_clock(core, IRIS_AXI_CLK); iris_disable_power_domains(core, core->pmdomain_tbl->pd_devs[IRIS_CTRL_PO= WER_DOMAIN]); @@ -218,6 +221,7 @@ void iris_vpu_power_off_hw(struct iris_core *core) { dev_pm_genpd_set_hwmode(core->pmdomain_tbl->pd_devs[IRIS_HW_POWER_DOMAIN]= , false); iris_disable_power_domains(core, core->pmdomain_tbl->pd_devs[IRIS_HW_POWE= R_DOMAIN]); + iris_disable_unprepare_clock(core, IRIS_HW_AXI_CLK); iris_disable_unprepare_clock(core, IRIS_HW_CLK); } =20 @@ -251,11 +255,17 @@ int iris_vpu_power_on_controller(struct iris_core *co= re) =20 ret =3D iris_prepare_enable_clock(core, IRIS_CTRL_CLK); if (ret) - goto err_disable_clock; + goto err_disable_axi_clock; + + ret =3D iris_prepare_enable_clock(core, IRIS_AHB_CLK); + if (ret && ret !=3D -ENOENT) + goto err_disable_ctrl_clock; =20 return 0; =20 -err_disable_clock: +err_disable_ctrl_clock: + iris_disable_unprepare_clock(core, IRIS_CTRL_CLK); +err_disable_axi_clock: iris_disable_unprepare_clock(core, IRIS_AXI_CLK); err_disable_power: iris_disable_power_domains(core, core->pmdomain_tbl->pd_devs[IRIS_CTRL_PO= WER_DOMAIN]); @@ -275,13 +285,19 @@ int iris_vpu_power_on_hw(struct iris_core *core) if (ret) goto err_disable_power; =20 + ret =3D iris_prepare_enable_clock(core, IRIS_HW_AXI_CLK); + if (ret && ret !=3D -ENOENT) + goto err_disable_hw_clock; + ret =3D dev_pm_genpd_set_hwmode(core->pmdomain_tbl->pd_devs[IRIS_HW_POWER= _DOMAIN], true); if (ret) - goto err_disable_clock; + goto err_disable_hw_axi_clock; =20 return 0; =20 -err_disable_clock: +err_disable_hw_axi_clock: + iris_disable_unprepare_clock(core, IRIS_HW_AXI_CLK); +err_disable_hw_clock: iris_disable_unprepare_clock(core, IRIS_HW_CLK); err_disable_power: iris_disable_power_domains(core, core->pmdomain_tbl->pd_devs[IRIS_HW_POWE= R_DOMAIN]); --=20 2.47.3