From patchwork Tue Jul 11 12:18:16 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Konrad Dybcio X-Patchwork-Id: 118454 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:a6b2:0:b0:3e4:2afc:c1 with SMTP id c18csp439631vqm; Tue, 11 Jul 2023 05:29:45 -0700 (PDT) X-Google-Smtp-Source: APBJJlFzVRNP0imdFyAVb5THdxYhBu0QJ5GMNL1dqMxjKFhF7dn9McD4A9t2IdRDb4gSXILjN7CT X-Received: by 2002:a05:6870:4292:b0:1b0:657f:5047 with SMTP id y18-20020a056870429200b001b0657f5047mr16918709oah.46.1689078585593; Tue, 11 Jul 2023 05:29:45 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1689078585; cv=none; d=google.com; s=arc-20160816; b=UHsdolXhP0fHig7s4KJi2/rniAllsja0VrkVwZIa82ilPJrop83baMi5poGdrQZ67r tikiw0yGrYFPLilsUSeYK/U64O0C5Zbu9r5UTU2m4xHuopUa9kTywD0lF0/fvC0WQ/Iq wMjLaNwbdOcyZ39IVUrnVdZOYVt9I7ueUjHvfT6/9AELBj7xTpahA7JJq2+1Yqkzq8Ib HAaXVX/6kAuHaJOmfkQ1NvSmka87ajsgGdr0b7+VLDHlnukzCM2Zm8d8v0ZJ/u0oV4tD WSeLHNqMCOnvVx0dyEasCpxT/T/z5orUOPVIynNb29JWwLFAtLd+DaqLKdszMOoXdItm M+PA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:cc:to:in-reply-to:references:message-id :content-transfer-encoding:mime-version:subject:date:from :dkim-signature; bh=Io8dXc44iGm5mZMmhm/3k3zRVuClB8P/2rKlOSrEa2I=; fh=JoAcrgft0uy82XIp94lSiB7rWiE0KfkQABjXnED6+RA=; b=V+ibEgw4dDO7WSg8WBp7/NNNrdlu5nKEn9wZy9XtfVh8ycE6r1Qb8YJJzVDIc37gB8 6NvCz7WgzqkQ1/TlKX/fw6etAB6rNnA9V0sb4s7Grexky0/MTwl6fs4QZiPtrMc0LPWr ksa7yX2xFANiXlnvvI95OJNxpZ0tx9mZw39NmBfWwM8cRC96Atd0Z/2wsgBKW4J8jRlf SL93+vJctw5Bv1zXJQTunG/WcZELHvQgkVrw2rBiVY3RYow347Y3FZxnwySEcnA8gtMk N6xmyQ7YN4IseyIn/IgRGKjP5FadyfEw94dvUE8VkndLruUH2wvS0KSg5iJ//fT9baN4 6w4w== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=v4vm7rFI; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id j12-20020a17090a94cc00b00263fa42fdcbsi8609132pjw.107.2023.07.11.05.29.33; Tue, 11 Jul 2023 05:29:45 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=v4vm7rFI; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231651AbjGKMUF (ORCPT + 99 others); Tue, 11 Jul 2023 08:20:05 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:52984 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231917AbjGKMT2 (ORCPT ); Tue, 11 Jul 2023 08:19:28 -0400 Received: from mail-lj1-x22e.google.com (mail-lj1-x22e.google.com [IPv6:2a00:1450:4864:20::22e]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 1B41E19BA for ; Tue, 11 Jul 2023 05:18:51 -0700 (PDT) Received: by mail-lj1-x22e.google.com with SMTP id 38308e7fff4ca-2b717e9d423so32614721fa.1 for ; Tue, 11 Jul 2023 05:18:51 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1689077929; x=1691669929; h=cc:to:in-reply-to:references:message-id:content-transfer-encoding :mime-version:subject:date:from:from:to:cc:subject:date:message-id :reply-to; bh=Io8dXc44iGm5mZMmhm/3k3zRVuClB8P/2rKlOSrEa2I=; b=v4vm7rFIgaSeofaLwdblOVjDpfU+rPz/zqLoO/5nLKQ4w59t6x7O4Mq76AGnKaDXPi J9HlYHCG8EXfUnu0sZxCBZ1NL0ERlWmaeNw8T6Rt6SD8bRA+BdCeA6GTu0TlE4osxZ2W Qse9zPPgqlDETdxtlIGbc49reVK+1FZiC1bB0wKNnK4UvHDh4lBNNfZlENq9vo8O4zCT iHm26tYqVQ3BOHTrYbi/4fsbEWJZDIP0967phk9U2Zh3SNu+Rq5aFv019Ks/M1qqlAeA 4ZRRkXAoQkeBVsu6oLXmIPLQ9WU6/NjQ7S1cxitxdC8znUtssJz++UTuqXdjcIm6oWQ6 4Cwg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1689077929; x=1691669929; 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=Io8dXc44iGm5mZMmhm/3k3zRVuClB8P/2rKlOSrEa2I=; b=SGyhMKzAzJzbiUisQu4n7Tm1NkBQ3byS+pRt3Uoiy4MXsryQRZuE77lULjWTd+lTwl NFZfBj9GNzo3hbZXVC3UsJTTPV9cczcUqJaIGcDzsTNmnxwnsGvbqgAc9PSFDARNhKpl ohx6wc038fKcUxlohyzHfU1j41/c/HM5Zh0YE/YzCN2fQJX74zresdn/x9oTfiY+D35G IHxfdB4c75Hzxx8to/YPsn+qiATTqQzFZECxjX6Pz+gehTrPlPJ4PpPewcdV6Wlc/VOF 2BcucVp708cPbUueSePz51LOeTdNcgFypIpkA/7CZFJsx+wUW86aM+VeP59sokQDUGUX m9kQ== X-Gm-Message-State: ABy/qLY4IdqoW4IoIjG1DS9Ujh+4POaP86z4q3wFplGt+a5ymSjDN1Z9 1dGkhtRDn4pcJuSSku/qN2xljg== X-Received: by 2002:a05:651c:119c:b0:2b6:fdae:903a with SMTP id w28-20020a05651c119c00b002b6fdae903amr6516697ljo.5.1689077929779; Tue, 11 Jul 2023 05:18:49 -0700 (PDT) Received: from [192.168.1.101] (abyl96.neoplus.adsl.tpnet.pl. [83.9.31.96]) by smtp.gmail.com with ESMTPSA id d18-20020a2e96d2000000b002b708450951sm435563ljj.88.2023.07.11.05.18.48 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 11 Jul 2023 05:18:49 -0700 (PDT) From: Konrad Dybcio Date: Tue, 11 Jul 2023 14:18:16 +0200 Subject: [PATCH 17/53] interconnect: qcom: sdm670: Retire DEFINE_QBCM MIME-Version: 1.0 Message-Id: <20230708-topic-rpmh_icc_rsc-v1-17-b223bd2ac8dd@linaro.org> References: <20230708-topic-rpmh_icc_rsc-v1-0-b223bd2ac8dd@linaro.org> In-Reply-To: <20230708-topic-rpmh_icc_rsc-v1-0-b223bd2ac8dd@linaro.org> To: Andy Gross , Bjorn Andersson , Georgi Djakov , Rob Herring , Krzysztof Kozlowski , Conor Dooley , cros-qcom-dts-watchers@chromium.org Cc: Marijn Suijten , linux-arm-msm@vger.kernel.org, linux-pm@vger.kernel.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, Konrad Dybcio X-Mailer: b4 0.12.2 X-Developer-Signature: v=1; a=ed25519-sha256; t=1689077904; l=8074; i=konrad.dybcio@linaro.org; s=20230215; h=from:subject:message-id; bh=8HeC5O9fAYtInntL0QiwX8CnifnzRAUfXIiKtq/eVkU=; b=R15de6emMH6T9UWZlbP6B9fTaKRaPR57Wh7xfaJn8rdLlWXHZ+fKMxLOhd1dJt8jJEERDH5bZ kyZukWSgye7AYuhvFzz+y7gZlwGtSJCKb+S+5WtZesmHdmpTRH8scb4 X-Developer-Key: i=konrad.dybcio@linaro.org; a=ed25519; pk=iclgkYvtl2w05SSXO5EjjSYlhFKsJ+5OSZBjOkQuEms= X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_BLOCKED, SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE,URIBL_BLOCKED autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: 1771127266879758961 X-GMAIL-MSGID: 1771127266879758961 The struct definition macros are hard to read and comapre, expand them. Signed-off-by: Konrad Dybcio --- drivers/interconnect/qcom/sdm670.c | 263 +++++++++++++++++++++++++++++++++---- 1 file changed, 239 insertions(+), 24 deletions(-) diff --git a/drivers/interconnect/qcom/sdm670.c b/drivers/interconnect/qcom/sdm670.c index 2c2cbe1b5197..c13ccdd5841d 100644 --- a/drivers/interconnect/qcom/sdm670.c +++ b/drivers/interconnect/qcom/sdm670.c @@ -1044,30 +1044,245 @@ static struct qcom_icc_node xs_sys_tcu_cfg = { .buswidth = 8, }; -DEFINE_QBCM(bcm_acv, "ACV", false, &ebi); -DEFINE_QBCM(bcm_mc0, "MC0", true, &ebi); -DEFINE_QBCM(bcm_sh0, "SH0", true, &qns_llcc); -DEFINE_QBCM(bcm_mm0, "MM0", true, &qns_mem_noc_hf); -DEFINE_QBCM(bcm_sh1, "SH1", false, &qns_apps_io); -DEFINE_QBCM(bcm_mm1, "MM1", true, &qxm_camnoc_hf0_uncomp, &qxm_camnoc_hf1_uncomp, &qxm_camnoc_sf_uncomp, &qxm_camnoc_hf0, &qxm_camnoc_hf1, &qxm_mdp0, &qxm_mdp1); -DEFINE_QBCM(bcm_sh2, "SH2", false, &qns_memnoc_snoc); -DEFINE_QBCM(bcm_mm2, "MM2", false, &qns2_mem_noc); -DEFINE_QBCM(bcm_sh3, "SH3", false, &acm_tcu); -DEFINE_QBCM(bcm_mm3, "MM3", false, &qxm_camnoc_sf, &qxm_rot, &qxm_venus0, &qxm_venus1, &qxm_venus_arm9); -DEFINE_QBCM(bcm_sh5, "SH5", false, &qnm_apps); -DEFINE_QBCM(bcm_sn0, "SN0", true, &qns_memnoc_sf); -DEFINE_QBCM(bcm_ce0, "CE0", false, &qxm_crypto); -DEFINE_QBCM(bcm_cn0, "CN0", true, &qhm_spdm, &qnm_snoc, &qhs_a1_noc_cfg, &qhs_a2_noc_cfg, &qhs_aop, &qhs_aoss, &qhs_camera_cfg, &qhs_clk_ctl, &qhs_compute_dsp_cfg, &qhs_cpr_cx, &qhs_crypto0_cfg, &qhs_dcc_cfg, &qhs_ddrss_cfg, &qhs_display_cfg, &qhs_emmc_cfg, &qhs_glm, &qhs_gpuss_cfg, &qhs_imem_cfg, &qhs_ipa, &qhs_mnoc_cfg, &qhs_pdm, &qhs_phy_refgen_south, &qhs_pimem_cfg, &qhs_prng, &qhs_qdss_cfg, &qhs_qupv3_north, &qhs_qupv3_south, &qhs_sdc2, &qhs_sdc4, &qhs_snoc_cfg, &qhs_spdm, &qhs_tcsr, &qhs_tlmm_north, &qhs_tlmm_south, &qhs_tsif, &qhs_ufs_mem_cfg, &qhs_usb3_0, &qhs_venus_cfg, &qhs_vsense_ctrl_cfg, &qns_cnoc_a2noc, &srvc_cnoc); -DEFINE_QBCM(bcm_qup0, "QUP0", false, &qhm_qup1, &qhm_qup2); -DEFINE_QBCM(bcm_sn1, "SN1", false, &qxs_imem); -DEFINE_QBCM(bcm_sn2, "SN2", false, &qns_memnoc_gc); -DEFINE_QBCM(bcm_sn3, "SN3", false, &qns_cnoc); -DEFINE_QBCM(bcm_sn4, "SN4", false, &qxm_pimem, &qxs_pimem); -DEFINE_QBCM(bcm_sn5, "SN5", false, &xs_qdss_stm); -DEFINE_QBCM(bcm_sn8, "SN8", false, &qnm_aggre1_noc, &srvc_aggre1_noc); -DEFINE_QBCM(bcm_sn10, "SN10", false, &qnm_aggre2_noc, &srvc_aggre2_noc); -DEFINE_QBCM(bcm_sn11, "SN11", false, &qnm_gladiator_sodv, &xm_gic); -DEFINE_QBCM(bcm_sn13, "SN13", false, &qnm_memnoc); +static struct qcom_icc_bcm bcm_acv = { + .name = "ACV", + .keepalive = false, + .voter_idx = ICC_BCM_VOTER_APPS, + .num_nodes = 1, + .nodes = { &ebi }, +}; + +static struct qcom_icc_bcm bcm_mc0 = { + .name = "MC0", + .keepalive = true, + .voter_idx = ICC_BCM_VOTER_APPS, + .num_nodes = 1, + .nodes = { &ebi }, +}; + +static struct qcom_icc_bcm bcm_sh0 = { + .name = "SH0", + .keepalive = true, + .voter_idx = ICC_BCM_VOTER_APPS, + .num_nodes = 1, + .nodes = { &qns_llcc }, +}; + +static struct qcom_icc_bcm bcm_mm0 = { + .name = "MM0", + .keepalive = true, + .voter_idx = ICC_BCM_VOTER_APPS, + .num_nodes = 1, + .nodes = { &qns_mem_noc_hf }, +}; + +static struct qcom_icc_bcm bcm_sh1 = { + .name = "SH1", + .keepalive = false, + .voter_idx = ICC_BCM_VOTER_APPS, + .num_nodes = 1, + .nodes = { &qns_apps_io }, +}; + +static struct qcom_icc_bcm bcm_mm1 = { + .name = "MM1", + .keepalive = true, + .voter_idx = ICC_BCM_VOTER_APPS, + .num_nodes = 7, + .nodes = { &qxm_camnoc_hf0_uncomp, + &qxm_camnoc_hf1_uncomp, + &qxm_camnoc_sf_uncomp, + &qxm_camnoc_hf0, + &qxm_camnoc_hf1, + &qxm_mdp0, + &qxm_mdp1 + }, +}; + +static struct qcom_icc_bcm bcm_sh2 = { + .name = "SH2", + .keepalive = false, + .voter_idx = ICC_BCM_VOTER_APPS, + .num_nodes = 1, + .nodes = { &qns_memnoc_snoc }, +}; + +static struct qcom_icc_bcm bcm_mm2 = { + .name = "MM2", + .keepalive = false, + .voter_idx = ICC_BCM_VOTER_APPS, + .num_nodes = 1, + .nodes = { &qns2_mem_noc }, +}; + +static struct qcom_icc_bcm bcm_sh3 = { + .name = "SH3", + .keepalive = false, + .voter_idx = ICC_BCM_VOTER_APPS, + .num_nodes = 1, + .nodes = { &acm_tcu }, +}; + +static struct qcom_icc_bcm bcm_mm3 = { + .name = "MM3", + .keepalive = false, + .voter_idx = ICC_BCM_VOTER_APPS, + .num_nodes = 5, + .nodes = { &qxm_camnoc_sf, &qxm_rot, &qxm_venus0, &qxm_venus1, &qxm_venus_arm9 }, +}; + +static struct qcom_icc_bcm bcm_sh5 = { + .name = "SH5", + .keepalive = false, + .voter_idx = ICC_BCM_VOTER_APPS, + .num_nodes = 1, + .nodes = { &qnm_apps }, +}; + +static struct qcom_icc_bcm bcm_sn0 = { + .name = "SN0", + .keepalive = true, + .voter_idx = ICC_BCM_VOTER_APPS, + .num_nodes = 1, + .nodes = { &qns_memnoc_sf }, +}; + +static struct qcom_icc_bcm bcm_ce0 = { + .name = "CE0", + .keepalive = false, + .voter_idx = ICC_BCM_VOTER_APPS, + .num_nodes = 1, + .nodes = { &qxm_crypto }, +}; + +static struct qcom_icc_bcm bcm_cn0 = { + .name = "CN0", + .keepalive = true, + .voter_idx = ICC_BCM_VOTER_APPS, + .num_nodes = 41, + .nodes = { &qhm_spdm, + &qnm_snoc, + &qhs_a1_noc_cfg, + &qhs_a2_noc_cfg, + &qhs_aop, + &qhs_aoss, + &qhs_camera_cfg, + &qhs_clk_ctl, + &qhs_compute_dsp_cfg, + &qhs_cpr_cx, + &qhs_crypto0_cfg, + &qhs_dcc_cfg, + &qhs_ddrss_cfg, + &qhs_display_cfg, + &qhs_emmc_cfg, + &qhs_glm, + &qhs_gpuss_cfg, + &qhs_imem_cfg, + &qhs_ipa, + &qhs_mnoc_cfg, + &qhs_pdm, + &qhs_phy_refgen_south, + &qhs_pimem_cfg, + &qhs_prng, + &qhs_qdss_cfg, + &qhs_qupv3_north, + &qhs_qupv3_south, + &qhs_sdc2, + &qhs_sdc4, + &qhs_snoc_cfg, + &qhs_spdm, + &qhs_tcsr, + &qhs_tlmm_north, + &qhs_tlmm_south, + &qhs_tsif, + &qhs_ufs_mem_cfg, + &qhs_usb3_0, + &qhs_venus_cfg, + &qhs_vsense_ctrl_cfg, + &qns_cnoc_a2noc, + &srvc_cnoc + }, +}; + +static struct qcom_icc_bcm bcm_qup0 = { + .name = "QUP0", + .keepalive = false, + .voter_idx = ICC_BCM_VOTER_APPS, + .num_nodes = 2, + .nodes = { &qhm_qup1, &qhm_qup2 }, +}; + +static struct qcom_icc_bcm bcm_sn1 = { + .name = "SN1", + .keepalive = false, + .voter_idx = ICC_BCM_VOTER_APPS, + .num_nodes = 1, + .nodes = { &qxs_imem }, +}; + +static struct qcom_icc_bcm bcm_sn2 = { + .name = "SN2", + .keepalive = false, + .voter_idx = ICC_BCM_VOTER_APPS, + .num_nodes = 1, + .nodes = { &qns_memnoc_gc }, +}; + +static struct qcom_icc_bcm bcm_sn3 = { + .name = "SN3", + .keepalive = false, + .voter_idx = ICC_BCM_VOTER_APPS, + .num_nodes = 1, + .nodes = { &qns_cnoc }, +}; + +static struct qcom_icc_bcm bcm_sn4 = { + .name = "SN4", + .keepalive = false, + .voter_idx = ICC_BCM_VOTER_APPS, + .num_nodes = 2, + .nodes = { &qxm_pimem, &qxs_pimem }, +}; + +static struct qcom_icc_bcm bcm_sn5 = { + .name = "SN5", + .keepalive = false, + .voter_idx = ICC_BCM_VOTER_APPS, + .num_nodes = 1, + .nodes = { &xs_qdss_stm }, +}; + +static struct qcom_icc_bcm bcm_sn8 = { + .name = "SN8", + .keepalive = false, + .voter_idx = ICC_BCM_VOTER_APPS, + .num_nodes = 2, + .nodes = { &qnm_aggre1_noc, &srvc_aggre1_noc }, +}; + +static struct qcom_icc_bcm bcm_sn10 = { + .name = "SN10", + .keepalive = false, + .voter_idx = ICC_BCM_VOTER_APPS, + .num_nodes = 2, + .nodes = { &qnm_aggre2_noc, &srvc_aggre2_noc }, +}; + +static struct qcom_icc_bcm bcm_sn11 = { + .name = "SN11", + .keepalive = false, + .voter_idx = ICC_BCM_VOTER_APPS, + .num_nodes = 2, + .nodes = { &qnm_gladiator_sodv, &xm_gic }, +}; + +static struct qcom_icc_bcm bcm_sn13 = { + .name = "SN13", + .keepalive = false, + .voter_idx = ICC_BCM_VOTER_APPS, + .num_nodes = 1, + .nodes = { &qnm_memnoc }, +}; static struct qcom_icc_bcm * const aggre1_noc_bcms[] = { &bcm_qup0,