From: Bryan O'Donoghue <bryan.odonoghue@linaro.org>
To: djakov@kernel.org, bjorn.andersson@linaro.org, agross@kernel.org,
linux-arm-msm@vger.kernel.org, linux-pm@vger.kernel.org
Cc: jun.nie@linaro.org, shawn.guo@linaro.org, benl@squareup.com,
dmitry.baryshkov@linaro.org, bryan.odonoghue@linaro.org
Subject: [PATCH 2/3] interconnect: qcom: msm8939: Merge snoc and snoc_mm into one
Date: Fri, 28 Jan 2022 16:10:01 +0000 [thread overview]
Message-ID: <20220128161002.2308563-3-bryan.odonoghue@linaro.org> (raw)
In-Reply-To: <20220128161002.2308563-1-bryan.odonoghue@linaro.org>
The current msm8939 snoc and snoc_mm definitions are represented as
separate entities based on downstream definition which declares two
identical and therefore overlapping mmio regions.
Downstream:
reg = <0x580000 0x14080>,
<0x580000 0x14080>;
reg-names = "snoc-base", "snoc-mm-base";
Upstream:
snoc: interconnect@580000 {
compatible = "qcom,msm8939-snoc";
#interconnect-cells = <1>;
reg = <0x580000 0x14080>;
clock-names = "bus", "bus_a";
clocks = <&rpmcc RPM_SMD_SNOC_CLK>,
<&rpmcc RPM_SMD_SNOC_A_CLK>;
status = "okay";
};
snoc: interconnect@580000 {
compatible = "qcom,msm8939-snoc_mm";
#interconnect-cells = <1>;
reg = <0x580000 0x14080>;
clock-names = "bus", "bus_a",
clocks = <&rpmcc RPM_SMD_SYSMMNOC_CLK>,
<&rpmcc RPM_SMD_SYSMMNOC_A_CLK>;
status = "okay";
};
This overlapping declaration leads to the following failure on boot.
[ 1.212340] qnoc-msm8939 580000.interconnect_mm: can't request region for resource [mem 0x00580000-0x0059407f]
[ 1.212391] qnoc-msm8939 580000.interconnect_mm: Cannot ioremap interconnect bus resource
[ 1.221524] qnoc-msm8939: probe of 580000.interconnect_mm failed with error -16
snoc_mm is a complete misnomer though, as there is no distinct register
space, simply an additional clock to drive higher frequences on snoc for
new multi-media 'mm' devices tacked on to the old msm8916 snoc.
The difference can be captured with
- A new clock
- Performance points/clock settings in the relevant multi-media devices.
Fix the above bug by representing snoc_mm as two new clocks to the existing
snoc, not a separate interconnect bus.
Signed-off-by: Bryan O'Donoghue <bryan.odonoghue@linaro.org>
---
drivers/interconnect/qcom/msm8939.c | 30 +++++------------------------
1 file changed, 5 insertions(+), 25 deletions(-)
diff --git a/drivers/interconnect/qcom/msm8939.c b/drivers/interconnect/qcom/msm8939.c
index d188f3636e4c3..7030911e25adc 100644
--- a/drivers/interconnect/qcom/msm8939.c
+++ b/drivers/interconnect/qcom/msm8939.c
@@ -1271,25 +1271,6 @@ static struct qcom_icc_node *msm8939_snoc_nodes[] = {
[SNOC_INT_BIMC] = &snoc_int_bimc,
[SNOC_PCNOC_MAS] = &snoc_pcnoc_mas,
[SNOC_QDSS_INT] = &qdss_int,
-};
-
-static const struct regmap_config msm8939_snoc_regmap_config = {
- .reg_bits = 32,
- .reg_stride = 4,
- .val_bits = 32,
- .max_register = 0x14080,
- .fast_io = true,
-};
-
-static struct qcom_icc_desc msm8939_snoc = {
- .type = QCOM_ICC_NOC,
- .nodes = msm8939_snoc_nodes,
- .num_nodes = ARRAY_SIZE(msm8939_snoc_nodes),
- .regmap_cfg = &msm8939_snoc_regmap_config,
- .qos_offset = 0x7000,
-};
-
-static struct qcom_icc_node *msm8939_snoc_mm_nodes[] = {
[MASTER_VIDEO_P0] = &mas_video,
[MASTER_JPEG] = &mas_jpeg,
[MASTER_VFE] = &mas_vfe,
@@ -1301,7 +1282,7 @@ static struct qcom_icc_node *msm8939_snoc_mm_nodes[] = {
[SNOC_MM_INT_2] = &mm_int_2,
};
-static const struct regmap_config msm8939_snoc_mm_regmap_config = {
+static const struct regmap_config msm8939_snoc_regmap_config = {
.reg_bits = 32,
.reg_stride = 4,
.val_bits = 32,
@@ -1309,11 +1290,11 @@ static const struct regmap_config msm8939_snoc_mm_regmap_config = {
.fast_io = true,
};
-static struct qcom_icc_desc msm8939_snoc_mm = {
+static struct qcom_icc_desc msm8939_snoc = {
.type = QCOM_ICC_NOC,
- .nodes = msm8939_snoc_mm_nodes,
- .num_nodes = ARRAY_SIZE(msm8939_snoc_mm_nodes),
- .regmap_cfg = &msm8939_snoc_mm_regmap_config,
+ .nodes = msm8939_snoc_nodes,
+ .num_nodes = ARRAY_SIZE(msm8939_snoc_nodes),
+ .regmap_cfg = &msm8939_snoc_regmap_config,
.qos_offset = 0x7000,
};
@@ -1420,7 +1401,6 @@ static const struct of_device_id msm8939_noc_of_match[] = {
{ .compatible = "qcom,msm8939-bimc", .data = &msm8939_bimc },
{ .compatible = "qcom,msm8939-pcnoc", .data = &msm8939_pcnoc },
{ .compatible = "qcom,msm8939-snoc", .data = &msm8939_snoc },
- { .compatible = "qcom,msm8939-snoc-mm", .data = &msm8939_snoc_mm },
{ }
};
MODULE_DEVICE_TABLE(of, msm8939_noc_of_match);
--
2.33.0
next prev parent reply other threads:[~2022-01-28 16:10 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-01-28 16:09 [PATCH 0/3] interconnect: qcom: msm8939: Coalesce snoc and snoc_mm Bryan O'Donoghue
2022-01-28 16:10 ` [PATCH 1/3] dt-bindings: interconnect: Create modified msm8939-snoc description Bryan O'Donoghue
2022-01-28 16:10 ` Bryan O'Donoghue [this message]
2022-01-28 22:24 ` [PATCH 2/3] interconnect: qcom: msm8939: Merge snoc and snoc_mm into one Dmitry Baryshkov
2022-01-28 23:23 ` Bryan O'Donoghue
2022-01-28 23:30 ` Bryan O'Donoghue
2022-01-28 23:38 ` Bryan O'Donoghue
2022-01-29 4:10 ` Dmitry Baryshkov
2022-01-28 16:10 ` [PATCH 3/3] interconnect: qcom: msm8939: Deliniate bus, bus_a, bus_mm and bus_a_mm clocks Bryan O'Donoghue
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20220128161002.2308563-3-bryan.odonoghue@linaro.org \
--to=bryan.odonoghue@linaro.org \
--cc=agross@kernel.org \
--cc=benl@squareup.com \
--cc=bjorn.andersson@linaro.org \
--cc=djakov@kernel.org \
--cc=dmitry.baryshkov@linaro.org \
--cc=jun.nie@linaro.org \
--cc=linux-arm-msm@vger.kernel.org \
--cc=linux-pm@vger.kernel.org \
--cc=shawn.guo@linaro.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).