From nobody Thu Sep 11 16:05:30 2025 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 20C2FC636D4 for ; Fri, 17 Feb 2023 10:46:43 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229925AbjBQKql (ORCPT ); Fri, 17 Feb 2023 05:46:41 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:54190 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229848AbjBQKqh (ORCPT ); Fri, 17 Feb 2023 05:46:37 -0500 Received: from mail-lf1-x12f.google.com (mail-lf1-x12f.google.com [IPv6:2a00:1450:4864:20::12f]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 890AD6359A for ; Fri, 17 Feb 2023 02:46:35 -0800 (PST) Received: by mail-lf1-x12f.google.com with SMTP id z18so1329086lfd.0 for ; Fri, 17 Feb 2023 02:46:35 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; 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=x2YOWjcFWDSCJRKhThoreWlOz8b57o2c2Tr6FolnlTU=; b=AM4e3DmweDpeDr8ruXbKbiVj8XWXKpU5flwVYy/YhpnO000xRVs6X6yK7AbbNwlioF St5R9Iy4zjrCjw6bxBCfIiWIHg0NDzDZdWbXcPAQ1mL/gOSXLo8rme4RA9OvfW6j831f LGeuUtipI1WM9uQ/Y+PRLfAke37IDkyxg6Avukc3W+yFy5NUmtadfRmXwRT0iUHXl8Wc +ZapnwvGshKcIueUz9LVEB+xOZ9hwA1CLCcKMSqfuFudkNHcSzgxf3RP7R8EHH7rtUW2 02UvvznH78j9EIFatZSkV9lpII0vRNJeWimgYi3HctuVCZVYzm3nMnnJViL6MiQcpSyG PvBQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; 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=x2YOWjcFWDSCJRKhThoreWlOz8b57o2c2Tr6FolnlTU=; b=jH+xVMHOwDs2d26D97UPGL+5iXils2on0h04WTXRvSA1pMwe14pQehExlsILnD8F3K Skwbj14DWrh8nPY9RQAbtA53HEQG1wC/uWrAiSijdcbrxF8y8/47dEZkM052BWVzTBkH yYNGnFmX35Rx1ppwwTWpdGzdskr83wumGFublbnyxRO4NQti9UK8hfm9HHqUfDbczUHh bHomj3ucW8d5Fk4rxVh9R+zykGz1B+pJXOiwh4PdhJ4Q/j9d6U19s8QZtGhta5R+dleF eQAEoF2psa5iAgzaIh1pxRNPAbXv/27iuVjfDELCxHCFk8sMjmlwzLBvj4IP3mteM02S 3meA== X-Gm-Message-State: AO0yUKVgukG0rASTzu0t4Yf7cJTrKUhZwxcWGG7Yh+XOOmBIkIACYNxz 8YX0Vhffp2sw1EsFrhu/Uyp0LQ== X-Google-Smtp-Source: AK7set9CFybII5DzWno5W84GW/eIYkkvmlI9Pc5UoP4WoeAp2y/z9KTGNal3UcfDdXwOMDoqW8CSHQ== X-Received: by 2002:ac2:551c:0:b0:4d8:6255:265f with SMTP id j28-20020ac2551c000000b004d86255265fmr273340lfk.20.1676630793936; Fri, 17 Feb 2023 02:46:33 -0800 (PST) Received: from [192.168.1.101] (abxh117.neoplus.adsl.tpnet.pl. [83.9.1.117]) by smtp.gmail.com with ESMTPSA id c13-20020a05651221ad00b004b53eb60e3csm645940lft.256.2023.02.17.02.46.32 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 17 Feb 2023 02:46:33 -0800 (PST) From: Konrad Dybcio Date: Fri, 17 Feb 2023 11:46:22 +0100 Subject: [PATCH v5 01/10] interconnect: qcom: rpm: make QoS INVALID default, separate out driver data MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Message-Id: <20230217-topic-icc-fixes-v5-v5-1-c9a550f9fdb9@linaro.org> References: <20230217-topic-icc-fixes-v5-v5-0-c9a550f9fdb9@linaro.org> In-Reply-To: <20230217-topic-icc-fixes-v5-v5-0-c9a550f9fdb9@linaro.org> To: Andy Gross , Bjorn Andersson , Georgi Djakov , Evan Green , Jun Nie , Greg Kroah-Hartman , Brian Masney , Dmitry Baryshkov , Yassine Oudjana Cc: Georgi Djakov , Bryan O'Donoghue , linux-arm-msm@vger.kernel.org, linux-pm@vger.kernel.org, linux-kernel@vger.kernel.org, Konrad Dybcio X-Mailer: b4 0.12.1 X-Developer-Signature: v=1; a=ed25519-sha256; t=1676630791; l=4821; i=konrad.dybcio@linaro.org; s=20230215; h=from:subject:message-id; bh=fW0/q7Y4jn5JjCXEuz/icnbq3YzHFaKCGchWxIjH/5g=; b=bt6O8yFpjiliV9Zv1OUdqyf7xnDMzvo5ML+awQqSYLp1ox69/UDILp79tKZRQVLGLIksa1r0umto SjEjjpxyDZS6Im456TbIQ+6OXQE3YaiYsKwBfon71vp8nK9cdXwR X-Developer-Key: i=konrad.dybcio@linaro.org; a=ed25519; pk=iclgkYvtl2w05SSXO5EjjSYlhFKsJ+5OSZBjOkQuEms= Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Currently, NOC_QOS_MODE_FIXED is defined as 0x0, which makes it the "default" option (as that's what uninitialized members of partially initialized structs are set to), which should really have been NOC_QOS_MODE_INVALID, and that's what people (wrongly) assumed was the case when .qos.qos_mode was not defined and what really makes the most sense.. That resulted in {port 0, prio 0, areq_prio 0, urg_fwd =3D false, rpm-voted} QoS being always voted for, because the code flow assumed "hey, it's fixed QoS, so let's just roll with whatever parameters are set" [again, set by partial struct initialization, as these fields were left unfilled by the developers]. That is of course incorrect, and on many of these platforms port 0 is MAS_APPS_PROC, which 9/10 times is supposed to be handled by the ap_owned path, not to mention the rest of the parameters may differ. Arguably, the APPS node is the most important one, next to EBI0.. The modes are defined as preprocessor constants. They are not used anywhere outside the driver or sent to any remote processor outside qcom_icc_set_noc_qos(), which is easily worked around. Separate the type specified in driver data from the value sent to msmbus. Make the former an enum for better mainainability. This is an implicit fix for every SMD RPM ICC driver that didn't explicitly specify NOC_QOS_MODE_INVALID on non-AP_owned nodes that don't have QoS settings. Fixes: 30c8fa3ec61a ("interconnect: qcom: Add MSM8916 interconnect provider= driver") Fixes: 6c6fe5d3dc5e ("interconnect: qcom: Add MSM8939 interconnect provider= driver") Fixes: 4e60a9568dc6 ("interconnect: qcom: add msm8974 driver") Fixes: 7add937f5222 ("interconnect: qcom: Add MSM8996 interconnect provider= driver") Signed-off-by: Konrad Dybcio --- drivers/interconnect/qcom/icc-rpm.c | 24 +++++++++++++----------- drivers/interconnect/qcom/icc-rpm.h | 10 ++++++---- 2 files changed, 19 insertions(+), 15 deletions(-) diff --git a/drivers/interconnect/qcom/icc-rpm.c b/drivers/interconnect/qco= m/icc-rpm.c index df3196f72536..ffbeeca8c2b0 100644 --- a/drivers/interconnect/qcom/icc-rpm.c +++ b/drivers/interconnect/qcom/icc-rpm.c @@ -48,6 +48,9 @@ #define NOC_QOS_MODEn_ADDR(n) (0xc + (n * 0x1000)) #define NOC_QOS_MODEn_MASK 0x3 =20 +#define NOC_QOS_MODE_FIXED_VAL 0x0 +#define NOC_QOS_MODE_BYPASS_VAL 0x2 + static int qcom_icc_set_qnoc_qos(struct icc_node *src, u64 max_bw) { struct icc_provider *provider =3D src->provider; @@ -153,7 +156,7 @@ static int qcom_icc_set_noc_qos(struct icc_node *src, u= 64 max_bw) struct qcom_icc_provider *qp; struct qcom_icc_node *qn; struct icc_provider *provider; - u32 mode =3D NOC_QOS_MODE_BYPASS; + u32 mode =3D NOC_QOS_MODE_BYPASS_VAL; int rc =3D 0; =20 qn =3D src->data; @@ -167,18 +170,17 @@ static int qcom_icc_set_noc_qos(struct icc_node *src,= u64 max_bw) return 0; } =20 - if (qn->qos.qos_mode !=3D NOC_QOS_MODE_INVALID) - mode =3D qn->qos.qos_mode; - - if (mode =3D=3D NOC_QOS_MODE_FIXED) { - dev_dbg(src->provider->dev, "NoC QoS: %s: Set Fixed mode\n", - qn->name); + if (qn->qos.qos_mode =3D=3D NOC_QOS_MODE_FIXED) { + dev_dbg(src->provider->dev, "NoC QoS: %s: Set Fixed mode\n", qn->name); + mode =3D NOC_QOS_MODE_FIXED_VAL; rc =3D qcom_icc_noc_set_qos_priority(qp, &qn->qos); if (rc) return rc; - } else if (mode =3D=3D NOC_QOS_MODE_BYPASS) { - dev_dbg(src->provider->dev, "NoC QoS: %s: Set Bypass mode\n", - qn->name); + } else if (qn->qos.qos_mode =3D=3D NOC_QOS_MODE_BYPASS) { + dev_dbg(src->provider->dev, "NoC QoS: %s: Set Bypass mode\n", qn->name); + mode =3D NOC_QOS_MODE_BYPASS_VAL; + } else { + /* How did we get here? */ } =20 return regmap_update_bits(qp->regmap, @@ -244,7 +246,7 @@ static int __qcom_icc_set(struct icc_node *n, struct qc= om_icc_node *qn, ret =3D qcom_icc_rpm_set(qn->mas_rpm_id, qn->slv_rpm_id, sum_bw); if (ret) return ret; - } else if (qn->qos.qos_mode !=3D -1) { + } else if (qn->qos.qos_mode !=3D NOC_QOS_MODE_INVALID) { /* set bandwidth directly from the AP */ ret =3D qcom_icc_qos_set(n, sum_bw); if (ret) diff --git a/drivers/interconnect/qcom/icc-rpm.h b/drivers/interconnect/qco= m/icc-rpm.h index a49af844ab13..8ba1918d7997 100644 --- a/drivers/interconnect/qcom/icc-rpm.h +++ b/drivers/interconnect/qcom/icc-rpm.h @@ -97,10 +97,12 @@ struct qcom_icc_desc { unsigned int qos_offset; }; =20 -/* Valid for both NoC and BIMC */ -#define NOC_QOS_MODE_INVALID -1 -#define NOC_QOS_MODE_FIXED 0x0 -#define NOC_QOS_MODE_BYPASS 0x2 +/* Valid for all bus types */ +enum qos_mode { + NOC_QOS_MODE_INVALID =3D 0, + NOC_QOS_MODE_FIXED, + NOC_QOS_MODE_BYPASS, +}; =20 int qnoc_probe(struct platform_device *pdev); int qnoc_remove(struct platform_device *pdev); --=20 2.39.1 From nobody Thu Sep 11 16:05:30 2025 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id A31DBC636D4 for ; Fri, 17 Feb 2023 10:46:47 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229943AbjBQKqp (ORCPT ); Fri, 17 Feb 2023 05:46:45 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:54274 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229903AbjBQKqj (ORCPT ); Fri, 17 Feb 2023 05:46:39 -0500 Received: from mail-lf1-x131.google.com (mail-lf1-x131.google.com [IPv6:2a00:1450:4864:20::131]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 40443635A6 for ; Fri, 17 Feb 2023 02:46:37 -0800 (PST) Received: by mail-lf1-x131.google.com with SMTP id p19so1039507lfr.9 for ; Fri, 17 Feb 2023 02:46:37 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; 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=6rjG/3ow1ZOTG1eHHIqytTbppYsh/DRQVP8JWOKWwcE=; b=DHtsw9VBjVWeKrjyOHza14P3gG53yefORmaq1x059bl8olMt8wLzAz4KOH+bWWqpCa Hj0NjEZjaZwWwVdYWO5ffFgphidabkXcHrOROJSuHXP9YPDGBGTV8tnw6/f2250rqWKS TVzDlRL8Ogo96tZqTMPu1H40Gmv8t4ZgAozl8UWeE07ZyGMgeROznsTQYRirWDb+6bNB 83VyPK4r4RRfddzBgIIoXUD0gG/7RXK1JK12AHhtiCq4HDTD2oIvYrKoVGEX1YJinleN nBJrvSmNv/yb0rVQb2cbh1qHkRwZEikEcPO7/PzaIx+qptIqtG3+f5YxGvWejVjCvWVP ADow== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; 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=6rjG/3ow1ZOTG1eHHIqytTbppYsh/DRQVP8JWOKWwcE=; b=pszt0etTAZVDZ7Npg4Q4KdMo8xHtzaaGcH1605m9M0uRzFzQIybp6T9zj+4zKHNVtS pa7GH2FY1oUWs29llL11vIGkHk0vRjUxw1AyrA01w2a938i2yxzKOHhtuqi2eoJhuZZi C7g264xpoe6e9fME0AqxwiWLw5SNOKZ38eIBsYLnXE7UGBzpOhPhjDqoaRK17DlOs6Te /gNn2yGS2/WDrewgzpSFcYDMDWLWPuSvkLOUolgAs3oQKB0PVqy5sVFoFQqZtOSeTfei 4NUHRBosI1EzYN0uhko+Sw6kPI81GP8tDMAUkKmhpJZQtWGOSKloLvdwRxZFGhjOSjrU 4xVA== X-Gm-Message-State: AO0yUKVaJQTiGmspDD4HfQEBqKYlJV3W10n01JFx2DTTlseuNL9OLXsZ DEtn54+Fu5e9Bv3eYEwuD6HvtA== X-Google-Smtp-Source: AK7set+Y1pfHXR2h3/1ZVtNtlCLzVk2iFx+zdkUyTFwRjXOQwQOHlAXlV6oxvtd7meL6IULWLyylwA== X-Received: by 2002:ac2:4474:0:b0:4db:25f0:a159 with SMTP id y20-20020ac24474000000b004db25f0a159mr94874lfl.51.1676630795521; Fri, 17 Feb 2023 02:46:35 -0800 (PST) Received: from [192.168.1.101] (abxh117.neoplus.adsl.tpnet.pl. [83.9.1.117]) by smtp.gmail.com with ESMTPSA id c13-20020a05651221ad00b004b53eb60e3csm645940lft.256.2023.02.17.02.46.34 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 17 Feb 2023 02:46:35 -0800 (PST) From: Konrad Dybcio Date: Fri, 17 Feb 2023 11:46:23 +0100 Subject: [PATCH v5 02/10] interconnect: qcom: rpm: Add support for specifying channel num MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Message-Id: <20230217-topic-icc-fixes-v5-v5-2-c9a550f9fdb9@linaro.org> References: <20230217-topic-icc-fixes-v5-v5-0-c9a550f9fdb9@linaro.org> In-Reply-To: <20230217-topic-icc-fixes-v5-v5-0-c9a550f9fdb9@linaro.org> To: Andy Gross , Bjorn Andersson , Georgi Djakov , Evan Green , Jun Nie , Greg Kroah-Hartman , Brian Masney , Dmitry Baryshkov , Yassine Oudjana Cc: Georgi Djakov , Bryan O'Donoghue , linux-arm-msm@vger.kernel.org, linux-pm@vger.kernel.org, linux-kernel@vger.kernel.org, Konrad Dybcio X-Mailer: b4 0.12.1 X-Developer-Signature: v=1; a=ed25519-sha256; t=1676630791; l=2390; i=konrad.dybcio@linaro.org; s=20230215; h=from:subject:message-id; bh=owy+HTbDiqD53bbeRzW7lMPyKDJvsQwv0VsM/tqOHBQ=; b=0wO3Kb2K2bNGrwgjHl+MB1VQsq1MjB8wGaF78Q/vMoe0wPvHb6brtdYreCFZmdJJzbIiqktjBaHP 0gnspTheC6/VF6pZ1rKlrLh+NcxWRKpNnF8d8gldzkL3cbKQXlZr X-Developer-Key: i=konrad.dybcio@linaro.org; a=ed25519; pk=iclgkYvtl2w05SSXO5EjjSYlhFKsJ+5OSZBjOkQuEms= Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Some nodes, like EBI0 (DDR) or L3/LLCC, may be connected over more than one channel. This should be taken into account in bandwidth calcualtion, as we're supposed to feed msmbus with the per-channel bandwidth. Add support for specifying that and use it during bandwidth aggregation. Reviewed-by: Bryan O'Donoghue Signed-off-by: Konrad Dybcio --- drivers/interconnect/qcom/icc-rpm.c | 7 ++++++- drivers/interconnect/qcom/icc-rpm.h | 2 ++ 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/drivers/interconnect/qcom/icc-rpm.c b/drivers/interconnect/qco= m/icc-rpm.c index ffbeeca8c2b0..6bd20f62f8ed 100644 --- a/drivers/interconnect/qcom/icc-rpm.c +++ b/drivers/interconnect/qcom/icc-rpm.c @@ -317,6 +317,7 @@ static void qcom_icc_bus_aggregate(struct icc_provider = *provider, { struct icc_node *node; struct qcom_icc_node *qn; + u64 sum_avg[QCOM_ICC_NUM_BUCKETS]; int i; =20 /* Initialise aggregate values */ @@ -334,7 +335,11 @@ static void qcom_icc_bus_aggregate(struct icc_provider= *provider, list_for_each_entry(node, &provider->nodes, node_list) { qn =3D node->data; for (i =3D 0; i < QCOM_ICC_NUM_BUCKETS; i++) { - agg_avg[i] +=3D qn->sum_avg[i]; + if (qn->channels) + sum_avg[i] =3D div_u64(qn->sum_avg[i], qn->channels); + else + sum_avg[i] =3D qn->sum_avg[i]; + agg_avg[i] +=3D sum_avg[i]; agg_peak[i] =3D max_t(u64, agg_peak[i], qn->max_peak[i]); } } diff --git a/drivers/interconnect/qcom/icc-rpm.h b/drivers/interconnect/qco= m/icc-rpm.h index 8ba1918d7997..8aed5400afda 100644 --- a/drivers/interconnect/qcom/icc-rpm.h +++ b/drivers/interconnect/qcom/icc-rpm.h @@ -66,6 +66,7 @@ struct qcom_icc_qos { * @id: a unique node identifier * @links: an array of nodes where we can go next while traversing * @num_links: the total number of @links + * @channels: number of channels at this node (e.g. DDR channels) * @buswidth: width of the interconnect between a node and the bus (bytes) * @sum_avg: current sum aggregate value of all avg bw requests * @max_peak: current max aggregate value of all peak bw requests @@ -78,6 +79,7 @@ struct qcom_icc_node { u16 id; const u16 *links; u16 num_links; + u16 channels; u16 buswidth; u64 sum_avg[QCOM_ICC_NUM_BUCKETS]; u64 max_peak[QCOM_ICC_NUM_BUCKETS]; --=20 2.39.1 From nobody Thu Sep 11 16:05:30 2025 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id EF208C64EC4 for ; Fri, 17 Feb 2023 10:46:50 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229958AbjBQKqt (ORCPT ); Fri, 17 Feb 2023 05:46:49 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:54278 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229904AbjBQKqj (ORCPT ); Fri, 17 Feb 2023 05:46:39 -0500 Received: from mail-lf1-x132.google.com (mail-lf1-x132.google.com [IPv6:2a00:1450:4864:20::132]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 5AA12635AF for ; Fri, 17 Feb 2023 02:46:38 -0800 (PST) Received: by mail-lf1-x132.google.com with SMTP id g16so1203106lfv.4 for ; Fri, 17 Feb 2023 02:46:38 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; 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=M1ChaGpjQwwb81za9r3ksbVLIpw4MoGpa0RPeBLjHFc=; b=gMeQQgAnk1atn0rL6BryiTB78nsooMdcYRikoqKGpBVATtiJr7yjwgWFR7EX5DpTL1 WJ4S3MNL1wQCeAUPLq5qQm/SlT1RIvj37WwqHQ+zbBAQyX71vSAKhQk6lalqAWyVXhrH QGEI4imlsDcq8aeTsyI6hKolSzSZSYIrQ/746SZLZuLlaqXPNjprKEO/0ceUkaZffZXZ yPmKRJ+S4PEX354pZ50X6cZQ+QI666njircV8ZyinGuCelgABPO3t9AYAJKxF3mSJstA ksAeuDE+CkCgkc2Gl7Ws/yJGWK1yjs1hkWXL6tQdvSXfTakhtfyQDhRsVA6gu2F5JFXK CBhQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; 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=M1ChaGpjQwwb81za9r3ksbVLIpw4MoGpa0RPeBLjHFc=; b=L3b2pPQ9KCJxoSfLdW9/fHP/0EKbBXPfc1eYMBqvq0Q0D5TpHeEM9PpPP0y0xrsfqz +nBBd32jLbFOwWokjtlYNcQYn/cKbxdsvWjmMWRVKG3N0YRVwuN7MDmVB/XNtESP+ksx O4ejLRSaTRVN4RhrZH9gTG1OMcdiB6jQ3hfkDSxO9LywPb0tRMRUzCvmaChRpwOq5fEw p0mbOdg0zPYVjjxl1T4fezk5KB6BbPhEYSwjKilEYJM1LrzQHzdhll7LUFeeEqqMBGoX +w9yk65b5GvlUbVx1zck4HMfShQ3YYyW0Kx0QGAz8y6/pieEbn1nIXsmVtzuNaTLmRNL AdZA== X-Gm-Message-State: AO0yUKU+7eLWMblLX2sN47sBqsrwk2WLs7mZ/Tf+7uf+A3XP5R3gbefK d/WXjUJuE4SkcO5XFXoQO7zh3w== X-Google-Smtp-Source: AK7set8HxLN5QJZa7aXty06Alvq62w3MD6azAVgwNNTZIUqZXOdEw6NoxZlKAGqi1S3qqDQg8/zbNw== X-Received: by 2002:ac2:4352:0:b0:4b6:eaed:f18f with SMTP id o18-20020ac24352000000b004b6eaedf18fmr2875944lfl.38.1676630796758; Fri, 17 Feb 2023 02:46:36 -0800 (PST) Received: from [192.168.1.101] (abxh117.neoplus.adsl.tpnet.pl. [83.9.1.117]) by smtp.gmail.com with ESMTPSA id c13-20020a05651221ad00b004b53eb60e3csm645940lft.256.2023.02.17.02.46.35 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 17 Feb 2023 02:46:36 -0800 (PST) From: Konrad Dybcio Date: Fri, 17 Feb 2023 11:46:24 +0100 Subject: [PATCH v5 03/10] interconnect: qcom: Sort kerneldoc entries MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Message-Id: <20230217-topic-icc-fixes-v5-v5-3-c9a550f9fdb9@linaro.org> References: <20230217-topic-icc-fixes-v5-v5-0-c9a550f9fdb9@linaro.org> In-Reply-To: <20230217-topic-icc-fixes-v5-v5-0-c9a550f9fdb9@linaro.org> To: Andy Gross , Bjorn Andersson , Georgi Djakov , Evan Green , Jun Nie , Greg Kroah-Hartman , Brian Masney , Dmitry Baryshkov , Yassine Oudjana Cc: Georgi Djakov , Bryan O'Donoghue , linux-arm-msm@vger.kernel.org, linux-pm@vger.kernel.org, linux-kernel@vger.kernel.org, Konrad Dybcio X-Mailer: b4 0.12.1 X-Developer-Signature: v=1; a=ed25519-sha256; t=1676630791; l=1082; i=konrad.dybcio@linaro.org; s=20230215; h=from:subject:message-id; bh=XFgUKc3AlZgnfCuw55xIk05sTMPQPjx7/I9LSefm9vw=; b=YKLLA28lh4MPb/UwnFbrn6LQ6RglPbnUhRasB1hdlK+lzAcmpZ+MsXq7QEMrAmDAY4HOFa7h1sB2 HRIZ6fvHCJ/wVt375KFfUx9Qr+AfjjVXWiVvZkxjC8jHOIynMTUn X-Developer-Key: i=konrad.dybcio@linaro.org; a=ed25519; pk=iclgkYvtl2w05SSXO5EjjSYlhFKsJ+5OSZBjOkQuEms= Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Sort the kerneldoc entries the same way the struct members are sorted. Signed-off-by: Konrad Dybcio --- drivers/interconnect/qcom/icc-rpm.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/interconnect/qcom/icc-rpm.h b/drivers/interconnect/qco= m/icc-rpm.h index 8aed5400afda..21f440beda86 100644 --- a/drivers/interconnect/qcom/icc-rpm.h +++ b/drivers/interconnect/qcom/icc-rpm.h @@ -23,12 +23,12 @@ enum qcom_icc_type { /** * struct qcom_icc_provider - Qualcomm specific interconnect provider * @provider: generic interconnect provider - * @bus_clks: the clk_bulk_data table of bus clocks * @num_clks: the total number of clk_bulk_data entries * @type: the ICC provider type - * @qos_offset: offset to QoS registers * @regmap: regmap for QoS registers read/write access + * @qos_offset: offset to QoS registers * @bus_clk_rate: bus clock rate in Hz + * @bus_clks: the clk_bulk_data table of bus clocks */ struct qcom_icc_provider { struct icc_provider provider; --=20 2.39.1 From nobody Thu Sep 11 16:05:30 2025 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 2D52AC05027 for ; Fri, 17 Feb 2023 10:46:53 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229935AbjBQKqv (ORCPT ); Fri, 17 Feb 2023 05:46:51 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:54424 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229929AbjBQKqm (ORCPT ); Fri, 17 Feb 2023 05:46:42 -0500 Received: from mail-lf1-x12c.google.com (mail-lf1-x12c.google.com [IPv6:2a00:1450:4864:20::12c]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id AB4486359A for ; Fri, 17 Feb 2023 02:46:39 -0800 (PST) Received: by mail-lf1-x12c.google.com with SMTP id p19so1039609lfr.9 for ; Fri, 17 Feb 2023 02:46:39 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; 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=qLCSgPlEFjgrnaf1o9B10/qV2Xw5+RkSuETRk3unQ/4=; b=MCExyxiSG1gl8HJjQzXoEPvnAfJ94qEGQp6fwb0a/6rl9f2QbBulvO3OJLcnmHN7hl 5Q1MU0gAOX/D2rJdFzYlEm4kDFLmblFKUMt9GpjCeeap7LnV7DiAfpiJhxKg8DuX8rZk 7Q+IT2AYH7J1c8/gG1JS5DgNAEzFnlr6gErMEiqXpcPdXnKQ+TH0jn78MSgRhHNJ7hNd zvKO/aSxj0pwrrGl6ETaF2NSBuRtyo2pMe/VfBLuvxcSfsOqFMoKFHb3XTWJgKu9vQsB 7ysvEIM3fnXZzVsnfEmO5iB9HNq5HzO8FoZt2dogXtS/nr5VzSTKnAmPWJ5gzd+VwkGW Zqcw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; 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=qLCSgPlEFjgrnaf1o9B10/qV2Xw5+RkSuETRk3unQ/4=; b=BVpAOp5KV8ulW+oX/na8f7BKBaWVtsHF3ghqAOnup0vXvK0QwDQBTmssVFgQCvrdcN RT2nBlniwSxx2QQOKwnZQ0UoyOEQlbzhRwa7pQ5TgKFwndwdrx9gwEuYHyTi/quzaBJp TxXJ9kAtNvZlp+/JePk+qts8fQIAA5MN0yqa9WUjivJeL2BDslvJ2/83P91XUr7/aB05 yj8JVzQrN52p8tlhHjpP0Up4U2UTLkdITuChmFQJze9NjJatWDfoEEqcDK7nf/2HgoWR 374gzfQ7rzcYkxswK+B5UtHc/OXoS3YVJt2pg+9Vaw6y88dnhdA0sUbg2RefjjD4IDUR rIww== X-Gm-Message-State: AO0yUKUwFho9cclNQwhFtMCvEvK1oAgbU6P3ntKNy2CUi0qQAvq2oXH2 16vK6TJRSejIxGo5ULL9Y4fklw== X-Google-Smtp-Source: AK7set+nJuq+kwi6hiqL0KohFCGNjPzeCl6bdtgwTdgYx/CTBpeV0/OrjhQyGyhkNOrRa9++oJMmVQ== X-Received: by 2002:ac2:5a08:0:b0:4cd:47e:47a8 with SMTP id q8-20020ac25a08000000b004cd047e47a8mr2446726lfn.54.1676630798088; Fri, 17 Feb 2023 02:46:38 -0800 (PST) Received: from [192.168.1.101] (abxh117.neoplus.adsl.tpnet.pl. [83.9.1.117]) by smtp.gmail.com with ESMTPSA id c13-20020a05651221ad00b004b53eb60e3csm645940lft.256.2023.02.17.02.46.36 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 17 Feb 2023 02:46:37 -0800 (PST) From: Konrad Dybcio Date: Fri, 17 Feb 2023 11:46:25 +0100 Subject: [PATCH v5 04/10] interconnect: qcom: rpm: Rename icc desc clocks to bus_blocks MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Message-Id: <20230217-topic-icc-fixes-v5-v5-4-c9a550f9fdb9@linaro.org> References: <20230217-topic-icc-fixes-v5-v5-0-c9a550f9fdb9@linaro.org> In-Reply-To: <20230217-topic-icc-fixes-v5-v5-0-c9a550f9fdb9@linaro.org> To: Andy Gross , Bjorn Andersson , Georgi Djakov , Evan Green , Jun Nie , Greg Kroah-Hartman , Brian Masney , Dmitry Baryshkov , Yassine Oudjana Cc: Georgi Djakov , Bryan O'Donoghue , linux-arm-msm@vger.kernel.org, linux-pm@vger.kernel.org, linux-kernel@vger.kernel.org, Konrad Dybcio X-Mailer: b4 0.12.1 X-Developer-Signature: v=1; a=ed25519-sha256; t=1676630791; l=4029; i=konrad.dybcio@linaro.org; s=20230215; h=from:subject:message-id; bh=W+rSE1tUqQ1jgJBwxZdgMZwUhzhi1tVhw5LTiCFdq1A=; b=cP57bevX69D3xJcTCI6REx2841cKvWgloLCGHxzurRCsAzYiLn9wKB3EOQF62O8xE6KHGN7yFA2L gdX/+YZ1Dk/jgw3XCPSK+s9aRxda3flgzGuzPv83+7vQBLHTEE5r X-Developer-Key: i=konrad.dybcio@linaro.org; a=ed25519; pk=iclgkYvtl2w05SSXO5EjjSYlhFKsJ+5OSZBjOkQuEms= Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Rename the "clocks" (and _names) fields of qcom_icc_desc to "bus_clocks" in preparation for introducing handling of clocks that need to be enabled but not voted on with aggregate frequency. Signed-off-by: Konrad Dybcio --- drivers/interconnect/qcom/icc-rpm.c | 6 +++--- drivers/interconnect/qcom/icc-rpm.h | 4 ++-- drivers/interconnect/qcom/msm8996.c | 12 ++++++------ drivers/interconnect/qcom/sdm660.c | 8 ++++---- 4 files changed, 15 insertions(+), 15 deletions(-) diff --git a/drivers/interconnect/qcom/icc-rpm.c b/drivers/interconnect/qco= m/icc-rpm.c index 6bd20f62f8ed..7a54fe4ccadd 100644 --- a/drivers/interconnect/qcom/icc-rpm.c +++ b/drivers/interconnect/qcom/icc-rpm.c @@ -441,9 +441,9 @@ int qnoc_probe(struct platform_device *pdev) qnodes =3D desc->nodes; num_nodes =3D desc->num_nodes; =20 - if (desc->num_clocks) { - cds =3D desc->clocks; - cd_num =3D desc->num_clocks; + if (desc->num_bus_clocks) { + cds =3D desc->bus_clocks; + cd_num =3D desc->num_bus_clocks; } else { cds =3D bus_clocks; cd_num =3D ARRAY_SIZE(bus_clocks); diff --git a/drivers/interconnect/qcom/icc-rpm.h b/drivers/interconnect/qco= m/icc-rpm.h index 21f440beda86..d6b4c56bf02c 100644 --- a/drivers/interconnect/qcom/icc-rpm.h +++ b/drivers/interconnect/qcom/icc-rpm.h @@ -91,8 +91,8 @@ struct qcom_icc_node { struct qcom_icc_desc { struct qcom_icc_node * const *nodes; size_t num_nodes; - const char * const *clocks; - size_t num_clocks; + const char * const *bus_clocks; + size_t num_bus_clocks; bool has_bus_pd; enum qcom_icc_type type; const struct regmap_config *regmap_cfg; diff --git a/drivers/interconnect/qcom/msm8996.c b/drivers/interconnect/qco= m/msm8996.c index 25a1a32bc611..69fc50a6fa5c 100644 --- a/drivers/interconnect/qcom/msm8996.c +++ b/drivers/interconnect/qcom/msm8996.c @@ -1821,8 +1821,8 @@ static const struct qcom_icc_desc msm8996_a0noc =3D { .type =3D QCOM_ICC_NOC, .nodes =3D a0noc_nodes, .num_nodes =3D ARRAY_SIZE(a0noc_nodes), - .clocks =3D bus_a0noc_clocks, - .num_clocks =3D ARRAY_SIZE(bus_a0noc_clocks), + .bus_clocks =3D bus_a0noc_clocks, + .num_bus_clocks =3D ARRAY_SIZE(bus_a0noc_clocks), .has_bus_pd =3D true, .regmap_cfg =3D &msm8996_a0noc_regmap_config }; @@ -1866,8 +1866,8 @@ static const struct qcom_icc_desc msm8996_a2noc =3D { .type =3D QCOM_ICC_NOC, .nodes =3D a2noc_nodes, .num_nodes =3D ARRAY_SIZE(a2noc_nodes), - .clocks =3D bus_a2noc_clocks, - .num_clocks =3D ARRAY_SIZE(bus_a2noc_clocks), + .bus_clocks =3D bus_a2noc_clocks, + .num_bus_clocks =3D ARRAY_SIZE(bus_a2noc_clocks), .regmap_cfg =3D &msm8996_a2noc_regmap_config }; =20 @@ -2005,8 +2005,8 @@ static const struct qcom_icc_desc msm8996_mnoc =3D { .type =3D QCOM_ICC_NOC, .nodes =3D mnoc_nodes, .num_nodes =3D ARRAY_SIZE(mnoc_nodes), - .clocks =3D bus_mm_clocks, - .num_clocks =3D ARRAY_SIZE(bus_mm_clocks), + .bus_clocks =3D bus_mm_clocks, + .num_bus_clocks =3D ARRAY_SIZE(bus_mm_clocks), .regmap_cfg =3D &msm8996_mnoc_regmap_config }; =20 diff --git a/drivers/interconnect/qcom/sdm660.c b/drivers/interconnect/qcom= /sdm660.c index 8d879b0bcabc..a22ba821efbf 100644 --- a/drivers/interconnect/qcom/sdm660.c +++ b/drivers/interconnect/qcom/sdm660.c @@ -1516,8 +1516,8 @@ static const struct qcom_icc_desc sdm660_a2noc =3D { .type =3D QCOM_ICC_NOC, .nodes =3D sdm660_a2noc_nodes, .num_nodes =3D ARRAY_SIZE(sdm660_a2noc_nodes), - .clocks =3D bus_a2noc_clocks, - .num_clocks =3D ARRAY_SIZE(bus_a2noc_clocks), + .bus_clocks =3D bus_a2noc_clocks, + .num_bus_clocks =3D ARRAY_SIZE(bus_a2noc_clocks), .regmap_cfg =3D &sdm660_a2noc_regmap_config, }; =20 @@ -1659,8 +1659,8 @@ static const struct qcom_icc_desc sdm660_mnoc =3D { .type =3D QCOM_ICC_NOC, .nodes =3D sdm660_mnoc_nodes, .num_nodes =3D ARRAY_SIZE(sdm660_mnoc_nodes), - .clocks =3D bus_mm_clocks, - .num_clocks =3D ARRAY_SIZE(bus_mm_clocks), + .bus_clocks =3D bus_mm_clocks, + .num_bus_clocks =3D ARRAY_SIZE(bus_mm_clocks), .regmap_cfg =3D &sdm660_mnoc_regmap_config, }; =20 --=20 2.39.1 From nobody Thu Sep 11 16:05:30 2025 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 27FAEC64EC4 for ; Fri, 17 Feb 2023 10:46:56 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229982AbjBQKqy (ORCPT ); Fri, 17 Feb 2023 05:46:54 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:54554 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229908AbjBQKqo (ORCPT ); Fri, 17 Feb 2023 05:46:44 -0500 Received: from mail-lf1-x12c.google.com (mail-lf1-x12c.google.com [IPv6:2a00:1450:4864:20::12c]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 527AD635B1 for ; Fri, 17 Feb 2023 02:46:41 -0800 (PST) Received: by mail-lf1-x12c.google.com with SMTP id x4so911163lfq.2 for ; Fri, 17 Feb 2023 02:46:41 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; 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=2MZKW1luAupXiDdvhAWR5OgDUlxdbyScvUfNLPjc4eQ=; b=Kmd5DPUwzulEC48gA6ic9WdlkQ/hNGjg4WdrrToQ29CqDM4JGKxmh49g9WlEAbrhDj Wz94fjSyHw5Qhh+6Y7nG4gV5wUCg6qjls8ZBzHJwBvsNMs5tsLeWN3oAl8juIGoC649a 0t1ncEVnlsoOYPP3J3F8gJAbA0kwYixnTWxX/U1tv16W7HKqHZsamgOsCcRRqGkzYwRb tiz17l6G05COkM+GKA3kTut+glzFqh2jwGx4z8jHpOYmG1Ng8QyzyPLiTr9mXWK+CcVL bJQag8Wbp9gwppXpUMEzWAdG3rVgfFxyJr8cHMNTbgibfsrAlRiZLdprjCHfe78HyWZ5 XQRQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; 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=2MZKW1luAupXiDdvhAWR5OgDUlxdbyScvUfNLPjc4eQ=; b=o3DqOxfOBKuH2hjVLeMzgbELRjPySBCu/gCclyylAP4PTtuzDLiOjMfKRZuAiEL3ps n2FflRw39I8iWIuflK9OjVlg/xnakK9z9jqjZ9nI35/XXxf+eBT0MsBWCjDAkb0FR98D EHd00TkYeSJAvy3NDPTKTeA2xMDNo2+kNS4/StHYEZ0Rdxs/12H6HKY+qsKqNP+pS0bo zX2yEcU9Y92nLSmAQ3RXPJRbxgCysd3n87gBa6/KF7WPbyb+b3efgS1yigUphbN9dBVx /hDtEha/3RhqNuH6zuwayFu3VpYbxUCAVdoifs58zCSBZcTeCNOP3BwENE0rUh0Y12RH iH4w== X-Gm-Message-State: AO0yUKVuhsEEq1C4iBxIDFhS9f7I7fjp5gufAF1C/v7nJKd2Jbs8KRNv ZdmijpUXLz0XqaUkT68SyWjEQA== X-Google-Smtp-Source: AK7set8kMF6hq8uzp/ZoeOSDX6mSYEz6U4PUe8eC1poZ5jXbjITjJsgsSG1fcRpGoyNQf9hMEw37ww== X-Received: by 2002:ac2:5490:0:b0:4d8:7502:990b with SMTP id t16-20020ac25490000000b004d87502990bmr2392639lfk.64.1676630799341; Fri, 17 Feb 2023 02:46:39 -0800 (PST) Received: from [192.168.1.101] (abxh117.neoplus.adsl.tpnet.pl. [83.9.1.117]) by smtp.gmail.com with ESMTPSA id c13-20020a05651221ad00b004b53eb60e3csm645940lft.256.2023.02.17.02.46.38 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 17 Feb 2023 02:46:39 -0800 (PST) From: Konrad Dybcio Date: Fri, 17 Feb 2023 11:46:26 +0100 Subject: [PATCH v5 05/10] interconnect: qcom: rpm: Rename icc provider num_clocks to num_bus_clocks MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Message-Id: <20230217-topic-icc-fixes-v5-v5-5-c9a550f9fdb9@linaro.org> References: <20230217-topic-icc-fixes-v5-v5-0-c9a550f9fdb9@linaro.org> In-Reply-To: <20230217-topic-icc-fixes-v5-v5-0-c9a550f9fdb9@linaro.org> To: Andy Gross , Bjorn Andersson , Georgi Djakov , Evan Green , Jun Nie , Greg Kroah-Hartman , Brian Masney , Dmitry Baryshkov , Yassine Oudjana Cc: Georgi Djakov , Bryan O'Donoghue , linux-arm-msm@vger.kernel.org, linux-pm@vger.kernel.org, linux-kernel@vger.kernel.org, Konrad Dybcio X-Mailer: b4 0.12.1 X-Developer-Signature: v=1; a=ed25519-sha256; t=1676630791; l=3438; i=konrad.dybcio@linaro.org; s=20230215; h=from:subject:message-id; bh=aiMG32ahJtopvSpAYtuicAveB020UtGpy7a97D0jQ6M=; b=bWToGfiDHGkY4wV++Fm8DJyFVJXVAqKTWMe4CRzPQiX0tbrooaFBNY90Md8IuQT1y38MLHRAasdo Teug8/NwDZ62faBCvlpyzJf6IxVIB4gsXbqNztewiYUvXpF9HxE8 X-Developer-Key: i=konrad.dybcio@linaro.org; a=ed25519; pk=iclgkYvtl2w05SSXO5EjjSYlhFKsJ+5OSZBjOkQuEms= Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org In preparation for handling non-scaling clocks that we still have to enable, rename num_clocks to more descriptive num_bus_clocks. Signed-off-by: Konrad Dybcio --- drivers/interconnect/qcom/icc-rpm.c | 14 +++++++------- drivers/interconnect/qcom/icc-rpm.h | 4 ++-- 2 files changed, 9 insertions(+), 9 deletions(-) diff --git a/drivers/interconnect/qcom/icc-rpm.c b/drivers/interconnect/qco= m/icc-rpm.c index 7a54fe4ccadd..f78c13e6c5ce 100644 --- a/drivers/interconnect/qcom/icc-rpm.c +++ b/drivers/interconnect/qcom/icc-rpm.c @@ -380,7 +380,7 @@ static int qcom_icc_set(struct icc_node *src, struct ic= c_node *dst) return ret; } =20 - for (i =3D 0; i < qp->num_clks; i++) { + for (i =3D 0; i < qp->num_bus_clks; i++) { /* * Use WAKE bucket for active clock, otherwise, use SLEEP bucket * for other clocks. If a platform doesn't set interconnect @@ -465,7 +465,7 @@ int qnoc_probe(struct platform_device *pdev) =20 for (i =3D 0; i < cd_num; i++) qp->bus_clks[i].id =3D cds[i]; - qp->num_clks =3D cd_num; + qp->num_bus_clks =3D cd_num; =20 qp->type =3D desc->type; qp->qos_offset =3D desc->qos_offset; @@ -495,11 +495,11 @@ int qnoc_probe(struct platform_device *pdev) } =20 regmap_done: - ret =3D devm_clk_bulk_get_optional(dev, qp->num_clks, qp->bus_clks); + ret =3D devm_clk_bulk_get_optional(dev, qp->num_bus_clks, qp->bus_clks); if (ret) return ret; =20 - ret =3D clk_bulk_prepare_enable(qp->num_clks, qp->bus_clks); + ret =3D clk_bulk_prepare_enable(qp->num_bus_clks, qp->bus_clks); if (ret) return ret; =20 @@ -521,7 +521,7 @@ int qnoc_probe(struct platform_device *pdev) ret =3D icc_provider_add(provider); if (ret) { dev_err(dev, "error adding interconnect provider: %d\n", ret); - clk_bulk_disable_unprepare(qp->num_clks, qp->bus_clks); + clk_bulk_disable_unprepare(qp->num_bus_clks, qp->bus_clks); return ret; } =20 @@ -554,7 +554,7 @@ int qnoc_probe(struct platform_device *pdev) return 0; err: icc_nodes_remove(provider); - clk_bulk_disable_unprepare(qp->num_clks, qp->bus_clks); + clk_bulk_disable_unprepare(qp->num_bus_clks, qp->bus_clks); icc_provider_del(provider); =20 return ret; @@ -566,7 +566,7 @@ int qnoc_remove(struct platform_device *pdev) struct qcom_icc_provider *qp =3D platform_get_drvdata(pdev); =20 icc_nodes_remove(&qp->provider); - clk_bulk_disable_unprepare(qp->num_clks, qp->bus_clks); + clk_bulk_disable_unprepare(qp->num_bus_clks, qp->bus_clks); icc_provider_del(&qp->provider); =20 return 0; diff --git a/drivers/interconnect/qcom/icc-rpm.h b/drivers/interconnect/qco= m/icc-rpm.h index d6b4c56bf02c..d4401f35f6d2 100644 --- a/drivers/interconnect/qcom/icc-rpm.h +++ b/drivers/interconnect/qcom/icc-rpm.h @@ -23,7 +23,7 @@ enum qcom_icc_type { /** * struct qcom_icc_provider - Qualcomm specific interconnect provider * @provider: generic interconnect provider - * @num_clks: the total number of clk_bulk_data entries + * @num_bus_clks: the total number of bus_clks clk_bulk_data entries * @type: the ICC provider type * @regmap: regmap for QoS registers read/write access * @qos_offset: offset to QoS registers @@ -32,7 +32,7 @@ enum qcom_icc_type { */ struct qcom_icc_provider { struct icc_provider provider; - int num_clks; + int num_bus_clks; enum qcom_icc_type type; struct regmap *regmap; unsigned int qos_offset; --=20 2.39.1 From nobody Thu Sep 11 16:05:30 2025 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 8D84AC636D4 for ; Fri, 17 Feb 2023 10:46:58 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229985AbjBQKq5 (ORCPT ); Fri, 17 Feb 2023 05:46:57 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:54596 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229936AbjBQKqp (ORCPT ); Fri, 17 Feb 2023 05:46:45 -0500 Received: from mail-lj1-x22b.google.com (mail-lj1-x22b.google.com [IPv6:2a00:1450:4864:20::22b]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 673EC63BF6 for ; Fri, 17 Feb 2023 02:46:42 -0800 (PST) Received: by mail-lj1-x22b.google.com with SMTP id z10so550523ljq.2 for ; Fri, 17 Feb 2023 02:46:42 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; 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=3MHWwA73OFZ3bR5+vwT2j4l8Utx4DnHts3Akf3ykMvM=; b=fyw4+Y3eRRE5bsRDzpmxCSgFPMKgW2p91G/B1LKmextL5NeHfxtCME/byuSNUmtebq jPPAUrP+JNub257PY1pzLOS7hOujW3TnMN8P8MpyKxbnHB5sgdyDRqCjQXdtYTM8PJLh U+T34qgPfR/K0/THAPEM0n5BLlDZ0bPyxVJhbLwT3bPcx2BRBI47GnU+mDwunpibppA5 NkkvbbBKxSzsZoFFHyLDWlMK4HBDqU/e0vwVQ4n19fIAujggfgwh3nF7CchySkrnHpsV CpDruNpaSF16itos68qu47p6JWO16wTnToXWnvxFHGZlcLV6n3zrbEGnVXTo67B7GNKU o9tQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; 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=3MHWwA73OFZ3bR5+vwT2j4l8Utx4DnHts3Akf3ykMvM=; b=r+8onaFs643Mej99/4NpaklRygGibZElQ7fy+LJKoZBlKYeyHSDTSM/+15+M+DoKtE j/qsoiiEkJMuq90/xk3dERg/MKSdV9YiAL38rmPW0zjadblMlwX036CAGwrnXfmD+klz k97k/ddLX7Y4VYRzUGL7aKApJx+uxL4USiYHvMwdHuPYx4EgZz6rpvLu1l+lI4uUROU1 bxplx6C9FtWfrhklYaAe8ylXjEyJ5Ayc31fXSDMLvggMiDfDFD4JPCxeqp1EfcqfsTOT aSKn+i4N3UYmWlSBxN0aXYiMRE/OosnXdX4QOzgG27P5lV6KUFbB024Hrm5cAlAxMYm4 w0yA== X-Gm-Message-State: AO0yUKUGH6xYWtI54SVfSkH2RdfKhJB+zW2r1vUXbiz+RDvYeGc9QfFc 8CHs2JqoGIktyyvZRqU8yj8T1w== X-Google-Smtp-Source: AK7set+02k7RKsHrmItnzOi2GjS6hKY+Iwsps/Ti5tr1Oof1GkjKruE9xyi6cuhYmdQ/7Yf7o7e2aw== X-Received: by 2002:a2e:b808:0:b0:293:4ae3:a0c4 with SMTP id u8-20020a2eb808000000b002934ae3a0c4mr50038ljo.2.1676630800626; Fri, 17 Feb 2023 02:46:40 -0800 (PST) Received: from [192.168.1.101] (abxh117.neoplus.adsl.tpnet.pl. [83.9.1.117]) by smtp.gmail.com with ESMTPSA id c13-20020a05651221ad00b004b53eb60e3csm645940lft.256.2023.02.17.02.46.39 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 17 Feb 2023 02:46:40 -0800 (PST) From: Konrad Dybcio Date: Fri, 17 Feb 2023 11:46:27 +0100 Subject: [PATCH v5 06/10] interconnect: qcom: rpm: Handle interface clocks MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Message-Id: <20230217-topic-icc-fixes-v5-v5-6-c9a550f9fdb9@linaro.org> References: <20230217-topic-icc-fixes-v5-v5-0-c9a550f9fdb9@linaro.org> In-Reply-To: <20230217-topic-icc-fixes-v5-v5-0-c9a550f9fdb9@linaro.org> To: Andy Gross , Bjorn Andersson , Georgi Djakov , Evan Green , Jun Nie , Greg Kroah-Hartman , Brian Masney , Dmitry Baryshkov , Yassine Oudjana Cc: Georgi Djakov , Bryan O'Donoghue , linux-arm-msm@vger.kernel.org, linux-pm@vger.kernel.org, linux-kernel@vger.kernel.org, Konrad Dybcio X-Mailer: b4 0.12.1 X-Developer-Signature: v=1; a=ed25519-sha256; t=1676630791; l=8870; i=konrad.dybcio@linaro.org; s=20230215; h=from:subject:message-id; bh=lrK4CgyASlp1FXP4xhjPdSbXvbaRtdChuTXbzfLQdS8=; b=N33qYbmOwCd4yPi9aA4tJuN4kKdJue8femdZMV6wSx3v00aLU1IocY6drY+n3sMr7MqlANxUdZXQ kn9osv54BlaqMSTrRmaoECQxlGNQOyrKgKK2sNzRie2N4IaPdja5 X-Developer-Key: i=konrad.dybcio@linaro.org; a=ed25519; pk=iclgkYvtl2w05SSXO5EjjSYlhFKsJ+5OSZBjOkQuEms= Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Some (but not all) providers (or their specific nodes) require specific clocks to be turned on before they can be accessed. Failure to ensure that results in a seemingly random system crash (which would usually happen at boot with the interconnect driver built-in), resulting in the platform not booting up properly. Limit the number of bus_clocks to 2 (which is the maximum that SMD RPM interconnect supports anyway) and handle non-scaling clocks separately. Update MSM8996 and SDM660 drivers to make sure they do not regress with this change. This unfortunately has to be done in one patch to prevent either compile errors or broken bisect. Signed-off-by: Konrad Dybcio --- drivers/interconnect/qcom/icc-rpm.c | 48 ++++++++++++++++++++++++++++-----= ---- drivers/interconnect/qcom/icc-rpm.h | 10 ++++++-- drivers/interconnect/qcom/msm8996.c | 22 +++++++---------- drivers/interconnect/qcom/sdm660.c | 16 +++++-------- 4 files changed, 60 insertions(+), 36 deletions(-) diff --git a/drivers/interconnect/qcom/icc-rpm.c b/drivers/interconnect/qco= m/icc-rpm.c index f78c13e6c5ce..1b382a2f2710 100644 --- a/drivers/interconnect/qcom/icc-rpm.c +++ b/drivers/interconnect/qcom/icc-rpm.c @@ -441,28 +441,43 @@ int qnoc_probe(struct platform_device *pdev) qnodes =3D desc->nodes; num_nodes =3D desc->num_nodes; =20 - if (desc->num_bus_clocks) { - cds =3D desc->bus_clocks; - cd_num =3D desc->num_bus_clocks; + if (desc->num_intf_clocks) { + cds =3D desc->intf_clocks; + cd_num =3D desc->num_intf_clocks; } else { - cds =3D bus_clocks; - cd_num =3D ARRAY_SIZE(bus_clocks); + /* 0 intf clocks is perfectly fine */ + cd_num =3D 0; } =20 - qp =3D devm_kzalloc(dev, struct_size(qp, bus_clks, cd_num), GFP_KERNEL); + qp =3D devm_kzalloc(dev, struct_size(qp, intf_clks, cd_num), GFP_KERNEL); if (!qp) return -ENOMEM; =20 - qp->bus_clk_rate =3D devm_kcalloc(dev, cd_num, sizeof(*qp->bus_clk_rate), - GFP_KERNEL); - if (!qp->bus_clk_rate) - return -ENOMEM; - data =3D devm_kzalloc(dev, struct_size(data, nodes, num_nodes), GFP_KERNEL); if (!data) return -ENOMEM; =20 + for (i =3D 0; i < cd_num; i++) + qp->intf_clks[i].id =3D cds[i]; + qp->num_intf_clks =3D cd_num; + + if (desc->num_bus_clocks) { + cds =3D desc->bus_clocks; + cd_num =3D desc->num_bus_clocks; + } else { + cds =3D bus_clocks; + cd_num =3D ARRAY_SIZE(bus_clocks); + } + + /* + * This is not realistic, scaling is only possible with an + * always-active and an active-only clock, or at least one + * of them in some very bizzare cases. + */ + if (WARN_ON(cd_num > 2)) + cd_num =3D 2; + for (i =3D 0; i < cd_num; i++) qp->bus_clks[i].id =3D cds[i]; qp->num_bus_clks =3D cd_num; @@ -503,6 +518,14 @@ int qnoc_probe(struct platform_device *pdev) if (ret) return ret; =20 + ret =3D devm_clk_bulk_get(dev, qp->num_intf_clks, qp->intf_clks); + if (ret) + return ret; + + ret =3D clk_bulk_prepare_enable(qp->num_intf_clks, qp->intf_clks); + if (ret) + return ret; + if (desc->has_bus_pd) { ret =3D dev_pm_domain_attach(dev, true); if (ret) @@ -521,6 +544,7 @@ int qnoc_probe(struct platform_device *pdev) ret =3D icc_provider_add(provider); if (ret) { dev_err(dev, "error adding interconnect provider: %d\n", ret); + clk_bulk_disable_unprepare(qp->num_intf_clks, qp->intf_clks); clk_bulk_disable_unprepare(qp->num_bus_clks, qp->bus_clks); return ret; } @@ -554,6 +578,7 @@ int qnoc_probe(struct platform_device *pdev) return 0; err: icc_nodes_remove(provider); + clk_bulk_disable_unprepare(qp->num_intf_clks, qp->intf_clks); clk_bulk_disable_unprepare(qp->num_bus_clks, qp->bus_clks); icc_provider_del(provider); =20 @@ -566,6 +591,7 @@ int qnoc_remove(struct platform_device *pdev) struct qcom_icc_provider *qp =3D platform_get_drvdata(pdev); =20 icc_nodes_remove(&qp->provider); + clk_bulk_disable_unprepare(qp->num_intf_clks, qp->intf_clks); clk_bulk_disable_unprepare(qp->num_bus_clks, qp->bus_clks); icc_provider_del(&qp->provider); =20 diff --git a/drivers/interconnect/qcom/icc-rpm.h b/drivers/interconnect/qco= m/icc-rpm.h index d4401f35f6d2..729573f0d9fe 100644 --- a/drivers/interconnect/qcom/icc-rpm.h +++ b/drivers/interconnect/qcom/icc-rpm.h @@ -24,20 +24,24 @@ enum qcom_icc_type { * struct qcom_icc_provider - Qualcomm specific interconnect provider * @provider: generic interconnect provider * @num_bus_clks: the total number of bus_clks clk_bulk_data entries + * @num_intf_clks: the total number of intf_clks clk_bulk_data entries * @type: the ICC provider type * @regmap: regmap for QoS registers read/write access * @qos_offset: offset to QoS registers * @bus_clk_rate: bus clock rate in Hz * @bus_clks: the clk_bulk_data table of bus clocks + * @intf_clks: the clk_bulk_data table of interface clocks */ struct qcom_icc_provider { struct icc_provider provider; int num_bus_clks; + int num_intf_clks; enum qcom_icc_type type; struct regmap *regmap; unsigned int qos_offset; - u64 *bus_clk_rate; - struct clk_bulk_data bus_clks[]; + u64 bus_clk_rate[2]; + struct clk_bulk_data bus_clks[2]; + struct clk_bulk_data intf_clks[]; }; =20 /** @@ -93,6 +97,8 @@ struct qcom_icc_desc { size_t num_nodes; const char * const *bus_clocks; size_t num_bus_clocks; + const char * const *intf_clocks; + size_t num_intf_clocks; bool has_bus_pd; enum qcom_icc_type type; const struct regmap_config *regmap_cfg; diff --git a/drivers/interconnect/qcom/msm8996.c b/drivers/interconnect/qco= m/msm8996.c index 69fc50a6fa5c..1a5e0ad36cc4 100644 --- a/drivers/interconnect/qcom/msm8996.c +++ b/drivers/interconnect/qcom/msm8996.c @@ -21,21 +21,17 @@ #include "smd-rpm.h" #include "msm8996.h" =20 -static const char * const bus_mm_clocks[] =3D { - "bus", - "bus_a", +static const char * const mm_intf_clocks[] =3D { "iface" }; =20 -static const char * const bus_a0noc_clocks[] =3D { +static const char * const a0noc_intf_clocks[] =3D { "aggre0_snoc_axi", "aggre0_cnoc_ahb", "aggre0_noc_mpu_cfg" }; =20 -static const char * const bus_a2noc_clocks[] =3D { - "bus", - "bus_a", +static const char * const a2noc_intf_clocks[] =3D { "aggre2_ufs_axi", "ufs_axi" }; @@ -1821,8 +1817,8 @@ static const struct qcom_icc_desc msm8996_a0noc =3D { .type =3D QCOM_ICC_NOC, .nodes =3D a0noc_nodes, .num_nodes =3D ARRAY_SIZE(a0noc_nodes), - .bus_clocks =3D bus_a0noc_clocks, - .num_bus_clocks =3D ARRAY_SIZE(bus_a0noc_clocks), + .intf_clocks =3D a0noc_intf_clocks, + .num_intf_clocks =3D ARRAY_SIZE(a0noc_intf_clocks), .has_bus_pd =3D true, .regmap_cfg =3D &msm8996_a0noc_regmap_config }; @@ -1866,8 +1862,8 @@ static const struct qcom_icc_desc msm8996_a2noc =3D { .type =3D QCOM_ICC_NOC, .nodes =3D a2noc_nodes, .num_nodes =3D ARRAY_SIZE(a2noc_nodes), - .bus_clocks =3D bus_a2noc_clocks, - .num_bus_clocks =3D ARRAY_SIZE(bus_a2noc_clocks), + .intf_clocks =3D a2noc_intf_clocks, + .num_intf_clocks =3D ARRAY_SIZE(a2noc_intf_clocks), .regmap_cfg =3D &msm8996_a2noc_regmap_config }; =20 @@ -2005,8 +2001,8 @@ static const struct qcom_icc_desc msm8996_mnoc =3D { .type =3D QCOM_ICC_NOC, .nodes =3D mnoc_nodes, .num_nodes =3D ARRAY_SIZE(mnoc_nodes), - .bus_clocks =3D bus_mm_clocks, - .num_bus_clocks =3D ARRAY_SIZE(bus_mm_clocks), + .intf_clocks =3D mm_intf_clocks, + .num_intf_clocks =3D ARRAY_SIZE(mm_intf_clocks), .regmap_cfg =3D &msm8996_mnoc_regmap_config }; =20 diff --git a/drivers/interconnect/qcom/sdm660.c b/drivers/interconnect/qcom= /sdm660.c index a22ba821efbf..0e8a96f4ce90 100644 --- a/drivers/interconnect/qcom/sdm660.c +++ b/drivers/interconnect/qcom/sdm660.c @@ -127,15 +127,11 @@ enum { SDM660_SNOC, }; =20 -static const char * const bus_mm_clocks[] =3D { - "bus", - "bus_a", +static const char * const mm_intf_clocks[] =3D { "iface", }; =20 -static const char * const bus_a2noc_clocks[] =3D { - "bus", - "bus_a", +static const char * const a2noc_intf_clocks[] =3D { "ipa", "ufs_axi", "aggre2_ufs_axi", @@ -1516,8 +1512,8 @@ static const struct qcom_icc_desc sdm660_a2noc =3D { .type =3D QCOM_ICC_NOC, .nodes =3D sdm660_a2noc_nodes, .num_nodes =3D ARRAY_SIZE(sdm660_a2noc_nodes), - .bus_clocks =3D bus_a2noc_clocks, - .num_bus_clocks =3D ARRAY_SIZE(bus_a2noc_clocks), + .intf_clocks =3D a2noc_intf_clocks, + .num_intf_clocks =3D ARRAY_SIZE(a2noc_intf_clocks), .regmap_cfg =3D &sdm660_a2noc_regmap_config, }; =20 @@ -1659,8 +1655,8 @@ static const struct qcom_icc_desc sdm660_mnoc =3D { .type =3D QCOM_ICC_NOC, .nodes =3D sdm660_mnoc_nodes, .num_nodes =3D ARRAY_SIZE(sdm660_mnoc_nodes), - .bus_clocks =3D bus_mm_clocks, - .num_bus_clocks =3D ARRAY_SIZE(bus_mm_clocks), + .intf_clocks =3D mm_intf_clocks, + .num_intf_clocks =3D ARRAY_SIZE(mm_intf_clocks), .regmap_cfg =3D &sdm660_mnoc_regmap_config, }; =20 --=20 2.39.1 From nobody Thu Sep 11 16:05:30 2025 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id E49F1C64ED6 for ; Fri, 17 Feb 2023 10:47:07 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230040AbjBQKrF (ORCPT ); Fri, 17 Feb 2023 05:47:05 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:54638 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229946AbjBQKqq (ORCPT ); Fri, 17 Feb 2023 05:46:46 -0500 Received: from mail-lj1-x22a.google.com (mail-lj1-x22a.google.com [IPv6:2a00:1450:4864:20::22a]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 7C6C1644C1 for ; Fri, 17 Feb 2023 02:46:43 -0800 (PST) Received: by mail-lj1-x22a.google.com with SMTP id bx13so681500ljb.3 for ; Fri, 17 Feb 2023 02:46:43 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; 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=EoiQaMMXwDXYQsRgtWV4mTA63/tUIiHdh1PBizMV2mE=; b=q/Tk77C78rdYacg8u6jmhO6XQ8QhPm8IuVF1gXA7/t4slxvyDOUATh9eTr9WZMm3x2 JmGB+dCuADdZBX+izzyPfR146hCh1b71sq1JvooAFIydPEPgS9iXxf0GtEQ7P+kqZaUF 21B1ZDShbKjGjRGZot8kZIvdJ8VQTvkUnnabYiA1306obHAW1kHoMi7PhrMPrjSNl2Ws 53okno+fyjuKh7nSSxEOsjmUCM0rqbjVGxi4CraLS9bTSjNp1iq2eHTOpDbuiVCft3yx PnSK+P9r2F9cXP9VXD2dcKmDpNCg+npqD2aLi63AF7nQdyIr10fY1j/JoXZND53rhA3e EeYw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; 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=EoiQaMMXwDXYQsRgtWV4mTA63/tUIiHdh1PBizMV2mE=; b=DDQgqVwa8ZkFJiYxSTRTO7fhaqsQM0w2f7EiKk0xwm45Dq0RH/5/DWTHNNdVnNj6Mo RDx6K5lgJBngGqqkr+y6f0GTHnuGXaySi5VYzcguO507iBijCt0P5939DwDldMGlhxS5 adg1EJAX7DdTtu1qZk4xRPXxJlQ6Szs8Ax+oNmyDsrlnFi8Bphcov1qfLMOm7R6L8bDB 72yBRRBZlQXnZSjP6hYUBiq2iPwLvpeUJV6U57v8FDhwmnrxD2fP+rXAsGFWDXqqIWsy 78no2TetJaq5U5+NvESNlE3zJPfwnkiOKvQvmhRTpAcugzCI4TYv3lKvzl/E74KdBmmy /wHg== X-Gm-Message-State: AO0yUKUbLv3kQeIXo9ISqMwYeBUzWlN3BusBQnvImnpjjhzQergiCDbg 9WO0eHXYBkOvhhGz0668fVmgOQ== X-Google-Smtp-Source: AK7set/EAFPURO6z3yLtlqei7ycpiwltwi+qBdgt5h0ULlyGLdM5suUx9fQ4ik/VgJvJdnj3X7FhQQ== X-Received: by 2002:a05:651c:1991:b0:293:4477:5df with SMTP id bx17-20020a05651c199100b00293447705dfmr132480ljb.37.1676630801874; Fri, 17 Feb 2023 02:46:41 -0800 (PST) Received: from [192.168.1.101] (abxh117.neoplus.adsl.tpnet.pl. [83.9.1.117]) by smtp.gmail.com with ESMTPSA id c13-20020a05651221ad00b004b53eb60e3csm645940lft.256.2023.02.17.02.46.40 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 17 Feb 2023 02:46:41 -0800 (PST) From: Konrad Dybcio Date: Fri, 17 Feb 2023 11:46:28 +0100 Subject: [PATCH v5 07/10] interconnect: qcom: icc-rpm: Allow negative num_bus_clocks MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Message-Id: <20230217-topic-icc-fixes-v5-v5-7-c9a550f9fdb9@linaro.org> References: <20230217-topic-icc-fixes-v5-v5-0-c9a550f9fdb9@linaro.org> In-Reply-To: <20230217-topic-icc-fixes-v5-v5-0-c9a550f9fdb9@linaro.org> To: Andy Gross , Bjorn Andersson , Georgi Djakov , Evan Green , Jun Nie , Greg Kroah-Hartman , Brian Masney , Dmitry Baryshkov , Yassine Oudjana Cc: Georgi Djakov , Bryan O'Donoghue , linux-arm-msm@vger.kernel.org, linux-pm@vger.kernel.org, linux-kernel@vger.kernel.org, Konrad Dybcio X-Mailer: b4 0.12.1 X-Developer-Signature: v=1; a=ed25519-sha256; t=1676630791; l=1103; i=konrad.dybcio@linaro.org; s=20230215; h=from:subject:message-id; bh=0zGQQ3Z8BxpWRbcjEih3N3lnw1JS4c/rutJ4C0HFNWc=; b=m8qeHutvzcJ9ghyjAS6EUExhare4+FDIPLNFYVJDwolT4L6g5zbqa4u9OUFWtbvi9sW/+x6qgHQm eu8r8e7JCKUQ7SUDaEv8aS/POTgMNM7b2GDVLDh5epXKrW7mS/eU X-Developer-Key: i=konrad.dybcio@linaro.org; a=ed25519; pk=iclgkYvtl2w05SSXO5EjjSYlhFKsJ+5OSZBjOkQuEms= Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org In some rare cases, buses will not have *any* bus-scaling clocks, which is "fine", as the voting can be done through RPM provided that the necessary QoS clocks are enabled. Allow specifying a negative (-1) number of clocks to make the driver accept such cases, without having to add a lot of boilerplate to all existing ICC drivers for SoCs with SMD RPM. FWIW this value was previously being assigned to a >>signed<< integer as well. Signed-off-by: Konrad Dybcio --- drivers/interconnect/qcom/icc-rpm.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/interconnect/qcom/icc-rpm.h b/drivers/interconnect/qco= m/icc-rpm.h index 729573f0d9fe..9dd631964b8c 100644 --- a/drivers/interconnect/qcom/icc-rpm.h +++ b/drivers/interconnect/qcom/icc-rpm.h @@ -96,7 +96,7 @@ struct qcom_icc_desc { struct qcom_icc_node * const *nodes; size_t num_nodes; const char * const *bus_clocks; - size_t num_bus_clocks; + int num_bus_clocks; const char * const *intf_clocks; size_t num_intf_clocks; bool has_bus_pd; --=20 2.39.1 From nobody Thu Sep 11 16:05:30 2025 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id E9D80C05027 for ; Fri, 17 Feb 2023 10:47:11 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229948AbjBQKrK (ORCPT ); Fri, 17 Feb 2023 05:47:10 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:54594 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229968AbjBQKqx (ORCPT ); Fri, 17 Feb 2023 05:46:53 -0500 Received: from mail-lf1-x134.google.com (mail-lf1-x134.google.com [IPv6:2a00:1450:4864:20::134]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id AB4FA63BD5 for ; Fri, 17 Feb 2023 02:46:44 -0800 (PST) Received: by mail-lf1-x134.google.com with SMTP id d24so1069399lfs.8 for ; Fri, 17 Feb 2023 02:46:44 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; 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=/VjEb3OZ7hQoHWr/0ps/r2NXNgbfLNbJhZAnYy2alS4=; b=RP+xeW3syi9Km7CTq3L7nhVDks4S2DbTOI2lP+4X/jcRT5IFLi2jktnqCNAIOQ7EHx HYRc2H2SuUpzsvBU7aDbxWp4bjbev60BD0CtZ528nGp3ackWXEP2ZEwDAluwzrenCAhH arPeKPdK/YPMKc5PBZM4WJy7YZcLK2QT4JRDATpgclW75I6aUOf9W8Kgen71hZWby0nn HFGMDZ8wwuVaBcNUI1Jo1wFvb2lfdj/fKuidkNgcQ8qG2ZPBXP3B/OQc4HS5SD4nxYGX wQkkJUhgz4mTMW8y3LBY8dAh81qMgFeTqM0sQxldMArDR0c8ToesYyDiAvCMP9lCXUlG OPKw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; 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=/VjEb3OZ7hQoHWr/0ps/r2NXNgbfLNbJhZAnYy2alS4=; b=NO5JYZpU+Nlb80y+IijSIb+OUPDb83vzYeSJwPa/fQNMeNr4urtNbP5bKJuN2DOZ8I wv6F1od9vFY9CWY+jiC6gjeeL2squ9ae7NJROXEbf9VOJVCgT8zw1qbdze8fkiN20KUZ sgosGQTP8tQvIaJVKbToblTOUYe7FW157YiOLSlWnIM5aakSysPiHYKrvi5qF+a/3o81 rPCnkRYyuVzvit2Pqb+UG0ivZIVWWLdU+rJmZINrHKrDEW6h/9Mn5DbPEE1lSUQHTcbT XcsBm6SZNsDnUZ31DvnOCtHVrFbWO+KKESM4x4Z7pIlIlmHMpwi82OXtm6gI4gMsKTKc Y+7g== X-Gm-Message-State: AO0yUKXv4NqPyIlDmYNZfngWE96NSvfEbRClFgnl61QySkzsAQlDHj3l d0kWUul1/6Sst8r6RVIoGZk8Jw== X-Google-Smtp-Source: AK7set9hDY73DJqGTveEBX+RQrfn/+Jk2FSuul8+0z1IyNWCWKhD1iARv2I6So/d49Z0RznVb4kDKQ== X-Received: by 2002:a05:6512:3742:b0:4ce:e95c:f300 with SMTP id a2-20020a056512374200b004cee95cf300mr2744757lfs.39.1676630803110; Fri, 17 Feb 2023 02:46:43 -0800 (PST) Received: from [192.168.1.101] (abxh117.neoplus.adsl.tpnet.pl. [83.9.1.117]) by smtp.gmail.com with ESMTPSA id c13-20020a05651221ad00b004b53eb60e3csm645940lft.256.2023.02.17.02.46.41 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 17 Feb 2023 02:46:42 -0800 (PST) From: Konrad Dybcio Date: Fri, 17 Feb 2023 11:46:29 +0100 Subject: [PATCH v5 08/10] interconnect: qcom: msm8996: Specify no bus clock scaling on A0NoC MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Message-Id: <20230217-topic-icc-fixes-v5-v5-8-c9a550f9fdb9@linaro.org> References: <20230217-topic-icc-fixes-v5-v5-0-c9a550f9fdb9@linaro.org> In-Reply-To: <20230217-topic-icc-fixes-v5-v5-0-c9a550f9fdb9@linaro.org> To: Andy Gross , Bjorn Andersson , Georgi Djakov , Evan Green , Jun Nie , Greg Kroah-Hartman , Brian Masney , Dmitry Baryshkov , Yassine Oudjana Cc: Georgi Djakov , Bryan O'Donoghue , linux-arm-msm@vger.kernel.org, linux-pm@vger.kernel.org, linux-kernel@vger.kernel.org, Konrad Dybcio X-Mailer: b4 0.12.1 X-Developer-Signature: v=1; a=ed25519-sha256; t=1676630791; l=801; i=konrad.dybcio@linaro.org; s=20230215; h=from:subject:message-id; bh=AREFOc1ndk8aH4dJx3DJJ2TVqe152RcGq0qoFxsutKs=; b=/IKip3wMWAQwdne5uZDTbmC7fQgRWhQBpwBO/KzB4CSDX45GGMGMJZbfAHAKAqfeJXGf9ZvRtBCN lAJZ9hKkAnMZxi+p4mhi3toFFuCUOqrbJIzHfIT9EILmY+yQ7kUu X-Developer-Key: i=konrad.dybcio@linaro.org; a=ed25519; pk=iclgkYvtl2w05SSXO5EjjSYlhFKsJ+5OSZBjOkQuEms= Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org A0NoC only does bus scaling through RPM votes and does not have any ICC clocks. Describe this. Signed-off-by: Konrad Dybcio --- drivers/interconnect/qcom/msm8996.c | 1 + 1 file changed, 1 insertion(+) diff --git a/drivers/interconnect/qcom/msm8996.c b/drivers/interconnect/qco= m/msm8996.c index 1a5e0ad36cc4..45eb8675fb11 100644 --- a/drivers/interconnect/qcom/msm8996.c +++ b/drivers/interconnect/qcom/msm8996.c @@ -1817,6 +1817,7 @@ static const struct qcom_icc_desc msm8996_a0noc =3D { .type =3D QCOM_ICC_NOC, .nodes =3D a0noc_nodes, .num_nodes =3D ARRAY_SIZE(a0noc_nodes), + .num_bus_clocks =3D -1, /* No bus clock scaling */ .intf_clocks =3D a0noc_intf_clocks, .num_intf_clocks =3D ARRAY_SIZE(a0noc_intf_clocks), .has_bus_pd =3D true, --=20 2.39.1 From nobody Thu Sep 11 16:05:30 2025 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 9DE15C64EC4 for ; Fri, 17 Feb 2023 10:47:15 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230007AbjBQKrO (ORCPT ); Fri, 17 Feb 2023 05:47:14 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:54554 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229974AbjBQKqx (ORCPT ); Fri, 17 Feb 2023 05:46:53 -0500 Received: from mail-lf1-x12f.google.com (mail-lf1-x12f.google.com [IPv6:2a00:1450:4864:20::12f]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id EC79A63BE0 for ; Fri, 17 Feb 2023 02:46:44 -0800 (PST) Received: by mail-lf1-x12f.google.com with SMTP id z18so1329609lfd.0 for ; Fri, 17 Feb 2023 02:46:44 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; 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=sUZvSNJx+5CVUv1a1ome/kslg/vit8dOWhZX8VfXJjY=; b=EXsdWyi08Pn7WSIyxZUVREdsQR8UnirrYFke6f6W1etq8gPhRdj7ZgB4N7wIjtYzZT 7rO+638bw8CSKKLWyVwDLbHVRdlkiZCXp0pIPfkoxg4ABM56NPG/DqIri8GLjMrwxXE6 mxq7sRzyhPDfWE/L09Yj3zUq844ssUKqMguBGnB+ymP8VAUW55AEbNo5oyhZVhzk+bPm 7B8nKUdMF11d7GZgf0zBRtU8Mp6vLYRPQFz6at5//qzcCIrJm7Gr/jckq8GaoyKsatca 4HoSCZPWeKc6OOt9iKybUwE3Nto9K4MYWDqZ6SGXidgD9oX5sP/pzPE0dQdxepH0c5Jf Hqyw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; 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=sUZvSNJx+5CVUv1a1ome/kslg/vit8dOWhZX8VfXJjY=; b=moan46gldHMXno1TthQUbzHkqd8gx0dY5Jc7GogJAdnp0f7N2KWgmNnB7n1QAUW7Ug JO482RBsspdCWS0756NRDuA3N/80qiQQC0pBtw8PgiJUFQYM9t0RjmhT3xOwQjChS+Dj 7KQrlhhhAogecK0iOyRbAsEHr5cFfB+RIOKwKoKCnVIcrHglGczRRsh3pq0sbS91jGRE lEIX4x2gMArpJHvJM2TCte5LjGE5lf2as7o2AfVdx+A4pw24QnGvNKO5ipJ9ipkCnTrk 8laWx+6dtNTQGvGd94MHXq1ItftPNoRgo7nbzaqM6yjfEJ1o6lrOOo8QyhNe7i6ri3s3 b2qg== X-Gm-Message-State: AO0yUKUtdHW12Nl4/PSYxzfQDW5WCp2BISnJ8ZatkiuGj4t9iCF9Y6gc finaajI6GnJi/QcJ96ZFYb8/iQ== X-Google-Smtp-Source: AK7set/KOt4MODQVD/uWSLyLAfds7ypN1w2Qigdsvw/j3xllf/mfSjA/+3ShtHP8y1TfzcE+WNLUHg== X-Received: by 2002:a19:550f:0:b0:4a4:7be4:9baf with SMTP id n15-20020a19550f000000b004a47be49bafmr131985lfe.59.1676630804528; Fri, 17 Feb 2023 02:46:44 -0800 (PST) Received: from [192.168.1.101] (abxh117.neoplus.adsl.tpnet.pl. [83.9.1.117]) by smtp.gmail.com with ESMTPSA id c13-20020a05651221ad00b004b53eb60e3csm645940lft.256.2023.02.17.02.46.43 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 17 Feb 2023 02:46:44 -0800 (PST) From: Konrad Dybcio Date: Fri, 17 Feb 2023 11:46:30 +0100 Subject: [PATCH v5 09/10] interconnect: qcom: rpm: Don't use clk_get_optional for bus clocks anymore MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Message-Id: <20230217-topic-icc-fixes-v5-v5-9-c9a550f9fdb9@linaro.org> References: <20230217-topic-icc-fixes-v5-v5-0-c9a550f9fdb9@linaro.org> In-Reply-To: <20230217-topic-icc-fixes-v5-v5-0-c9a550f9fdb9@linaro.org> To: Andy Gross , Bjorn Andersson , Georgi Djakov , Evan Green , Jun Nie , Greg Kroah-Hartman , Brian Masney , Dmitry Baryshkov , Yassine Oudjana Cc: Georgi Djakov , Bryan O'Donoghue , linux-arm-msm@vger.kernel.org, linux-pm@vger.kernel.org, linux-kernel@vger.kernel.org, Konrad Dybcio X-Mailer: b4 0.12.1 X-Developer-Signature: v=1; a=ed25519-sha256; t=1676630791; l=1105; i=konrad.dybcio@linaro.org; s=20230215; h=from:subject:message-id; bh=M6Z9fDv56JMA/vi+7eufxFCs9O0sn12I8qL5zKPdgGA=; b=4PU2DRlOt0EziTNs4oNm8eizsiGxce2VIGm7o4so4TLHPOOMLgZdmRPkufnOsNHyvGrwjURDmBk1 n49XNf+UC2baBget3SKLWOJw2zcRPo9w1gGP7CZEdSEDgYWnk/WJ X-Developer-Key: i=konrad.dybcio@linaro.org; a=ed25519; pk=iclgkYvtl2w05SSXO5EjjSYlhFKsJ+5OSZBjOkQuEms= Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Commit dd42ec8ea5b9 ("interconnect: qcom: rpm: Use _optional func for provi= der clocks") relaxed the requirements around probing bus clocks. This was a decent solution for making sure MSM8996 would still boot with old DTs, but now that there's a proper fix in place that both old and new DTs will be happy about, revert back to the safer variant of the function. Fixes: dd42ec8ea5b9 ("interconnect: qcom: rpm: Use _optional func for provi= der clocks") Signed-off-by: Konrad Dybcio --- drivers/interconnect/qcom/icc-rpm.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/interconnect/qcom/icc-rpm.c b/drivers/interconnect/qco= m/icc-rpm.c index 1b382a2f2710..7c2ed224d0e7 100644 --- a/drivers/interconnect/qcom/icc-rpm.c +++ b/drivers/interconnect/qcom/icc-rpm.c @@ -510,7 +510,7 @@ int qnoc_probe(struct platform_device *pdev) } =20 regmap_done: - ret =3D devm_clk_bulk_get_optional(dev, qp->num_bus_clks, qp->bus_clks); + ret =3D devm_clk_bulk_get(dev, qp->num_bus_clks, qp->bus_clks); if (ret) return ret; =20 --=20 2.39.1 From nobody Thu Sep 11 16:05:30 2025 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 10D64C05027 for ; Fri, 17 Feb 2023 10:47:25 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230109AbjBQKrX (ORCPT ); Fri, 17 Feb 2023 05:47:23 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:55338 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229953AbjBQKrD (ORCPT ); Fri, 17 Feb 2023 05:47:03 -0500 Received: from mail-lj1-x22b.google.com (mail-lj1-x22b.google.com [IPv6:2a00:1450:4864:20::22b]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id BD4A0644E0 for ; Fri, 17 Feb 2023 02:46:47 -0800 (PST) Received: by mail-lj1-x22b.google.com with SMTP id f22so557370lja.6 for ; Fri, 17 Feb 2023 02:46:47 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; 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=odDokNhSe0XiR1J+qvgMZCsSwTEjlZob9GhOBF9OHvc=; b=D3K1+FTh9n03cNh00K7Ql0DlhbCiO3snRPzAQCYRUG/kv1+Of7CSMSAoNV9rbY5paP W8hvgn6W/Sx9JTN+Sk6WsfKqW9pGze1ppmWc5Vm6T6FeJ5HqtIZYxQE9oCSVtrU3pHaO fKawFEuoaf52WGrh27Axphw2tsY/FqQw1COM/V1OkpOjUs+v6Z+RQbjOlU77Aksh69AQ uCpNVZoWEbLRKnDFD//1Y9upK775vvik1CwIJzld+ydbJgnr7PFNmJ8r5kZR5k/qWJjZ RirViQ0GcfsuksJaQ2bYZkGkAUSspKsIepsQswI0tq74LifTEUjU0cYZ21n9LPxW2QwU bxPg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; 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=odDokNhSe0XiR1J+qvgMZCsSwTEjlZob9GhOBF9OHvc=; b=M1CBaAcIhZt0WqjmeDtiiHIzWFnFhJkwLp0M2S0dNQpkwgMFcCaavoDCqxBLVtYz44 WMVafcHrcfXdFANWrOHbiKbNZmt3bA57Eq/wrB1asGa9MkMAfb2OGhnx0eSAoAEHTXhG Yt6W/s47cguepP7BdCtCWU23tvboj5/B+EiUI/ws6IPGRWaVPRlusUjV7Fxi2dMofCwT bnv62xWCN1yPSi06kyEoNxVD3Tcyl4tiM7jk8zA0Ql7GaDW0YNSmdQ30T2vsF+9GcYW8 MZiffHZkb9eZaGhcpRW+/CK2ONr51hWGS8TqtGdrFabQoav0LewExS2Nqt/G14WH0K7r WIsw== X-Gm-Message-State: AO0yUKXAL8KJEtW3ktGULcxB5Fr1C8jA7I31C6/l/eSUJbpbP5aoP7ML LyoWf411Em+oE3zYl96nNpJ3gg== X-Google-Smtp-Source: AK7set8YPXVOhX95P8BHybZ0yF7DQ14DmrU2Ma3cK5WTeI2AqchRxe+rXSXSklTjMpm5wimfKxP5iw== X-Received: by 2002:a05:651c:cb:b0:288:7a51:3882 with SMTP id 11-20020a05651c00cb00b002887a513882mr2620028ljr.10.1676630805803; Fri, 17 Feb 2023 02:46:45 -0800 (PST) Received: from [192.168.1.101] (abxh117.neoplus.adsl.tpnet.pl. [83.9.1.117]) by smtp.gmail.com with ESMTPSA id c13-20020a05651221ad00b004b53eb60e3csm645940lft.256.2023.02.17.02.46.44 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 17 Feb 2023 02:46:45 -0800 (PST) From: Konrad Dybcio Date: Fri, 17 Feb 2023 11:46:31 +0100 Subject: [PATCH v5 10/10] interconnect: qcom: msm8996: Promote to core_initcall MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Message-Id: <20230217-topic-icc-fixes-v5-v5-10-c9a550f9fdb9@linaro.org> References: <20230217-topic-icc-fixes-v5-v5-0-c9a550f9fdb9@linaro.org> In-Reply-To: <20230217-topic-icc-fixes-v5-v5-0-c9a550f9fdb9@linaro.org> To: Andy Gross , Bjorn Andersson , Georgi Djakov , Evan Green , Jun Nie , Greg Kroah-Hartman , Brian Masney , Dmitry Baryshkov , Yassine Oudjana Cc: Georgi Djakov , Bryan O'Donoghue , linux-arm-msm@vger.kernel.org, linux-pm@vger.kernel.org, linux-kernel@vger.kernel.org, Konrad Dybcio X-Mailer: b4 0.12.1 X-Developer-Signature: v=1; a=ed25519-sha256; t=1676630791; l=1279; i=konrad.dybcio@linaro.org; s=20230215; h=from:subject:message-id; bh=v+92vgE4LxpyLLy9TkKCUJhLtzjJRiMz2HkYa5ye5Ko=; b=ye4+EU5XrLH1YeGrsjD9r0V6qhdwvc1GMXE2fvuG0bZEIWXL6uWLEUYNCxBlRl9MS9g/djo7ZGI9 ccQmDLJEAYFbDFBz7+l3TTxtL/qOuMeqSDMG4MhgNym1eq7GwA6E X-Developer-Key: i=konrad.dybcio@linaro.org; a=ed25519; pk=iclgkYvtl2w05SSXO5EjjSYlhFKsJ+5OSZBjOkQuEms= Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org The interconnect driver is (or soon will be) vital to many other devices, as it's not a given that the bootloader will set up enough bandwidth for us or that the values we come into are reasonable. Promote the driver to core_initcall to ensure the consumers (i.e. most "meaningful" parts of the SoC) can probe without deferrals. Signed-off-by: Konrad Dybcio --- drivers/interconnect/qcom/msm8996.c | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/drivers/interconnect/qcom/msm8996.c b/drivers/interconnect/qco= m/msm8996.c index 45eb8675fb11..0e0395328dc7 100644 --- a/drivers/interconnect/qcom/msm8996.c +++ b/drivers/interconnect/qcom/msm8996.c @@ -2109,7 +2109,17 @@ static struct platform_driver qnoc_driver =3D { .sync_state =3D icc_sync_state, } }; -module_platform_driver(qnoc_driver); +static int __init qnoc_driver_init(void) +{ + return platform_driver_register(&qnoc_driver); +} +core_initcall(qnoc_driver_init); + +static void __exit qnoc_driver_exit(void) +{ + platform_driver_unregister(&qnoc_driver); +} +module_exit(qnoc_driver_exit); =20 MODULE_AUTHOR("Yassine Oudjana "); MODULE_DESCRIPTION("Qualcomm MSM8996 NoC driver"); --=20 2.39.1