From: Konrad Dybcio <konrad.dybcio@linaro.org>
To: Unnathi Chalicheemala <quic_uchalich@quicinc.com>,
Bjorn Andersson <andersson@kernel.org>,
Rob Herring <robh+dt@kernel.org>,
Krzysztof Kozlowski <krzysztof.kozlowski+dt@linaro.org>,
Conor Dooley <conor+dt@kernel.org>
Cc: linux-arm-msm@vger.kernel.org, devicetree@vger.kernel.org,
linux-kernel@vger.kernel.org, kernel@quicinc.com
Subject: Re: [PATCH v2 5/5] soc: qcom: llcc: Add regmap for Broadcast_AND region
Date: Tue, 6 Feb 2024 19:42:37 +0100 [thread overview]
Message-ID: <1ca4d384-9df4-4c00-a4c9-0c5ff491616e@linaro.org> (raw)
In-Reply-To: <169277f53affed98ef41e5a7cbf2401fe62716bd.1707202761.git.quic_uchalich@quicinc.com>
On 6.02.2024 08:15, Unnathi Chalicheemala wrote:
> Define new regmap structure for Broadcast_AND region and initialize
> regmap for Broadcast_AND region when HW block version
> is greater than 4.1 for backwards compatibility.
Are they actually separate regions and not a single contiguous one?
>
> Switch from broadcast_OR to broadcast_AND region for checking
> status bit 1 as Broadcast_OR region checks only for bit 0.
>
> Signed-off-by: Unnathi Chalicheemala <quic_uchalich@quicinc.com>
> ---
> drivers/soc/qcom/llcc-qcom.c | 22 +++++++++++++++++++---
> include/linux/soc/qcom/llcc-qcom.h | 4 +++-
> 2 files changed, 22 insertions(+), 4 deletions(-)
>
> diff --git a/drivers/soc/qcom/llcc-qcom.c b/drivers/soc/qcom/llcc-qcom.c
> index 4ca88eaebf06..fbd2542cd4c5 100644
> --- a/drivers/soc/qcom/llcc-qcom.c
> +++ b/drivers/soc/qcom/llcc-qcom.c
> @@ -849,9 +849,14 @@ static int llcc_update_act_ctrl(u32 sid,
> return ret;
>
> if (drv_data->version >= LLCC_VERSION_4_1_0_0) {
> - ret = regmap_read_poll_timeout(drv_data->bcast_regmap, status_reg,
> - slice_status, (slice_status & ACT_COMPLETE),
> - 0, LLCC_STATUS_READ_DELAY);
> + if (!drv_data->bcast_and_regmap)
> + ret = regmap_read_poll_timeout(drv_data->bcast_regmap, status_reg,
> + slice_status, (slice_status & ACT_COMPLETE),
> + 0, LLCC_STATUS_READ_DELAY);
> + else
> + ret = regmap_read_poll_timeout(drv_data->bcast_and_regmap, status_reg,
> + slice_status, (slice_status & ACT_COMPLETE),
> + 0, LLCC_STATUS_READ_DELAY);
struct regmap *regmap = drv_data->bcast_and_regmap ?: bcast_regmap;
?
> + if (drv_data->version >= LLCC_VERSION_4_1_0_0) {
This check is rather redundant.. If there's no such region in hardware,
it won't be described, and as such the _get()s will return some sort
of an error.
Might as well make it a comment that it's intended for >=v4.1 and
definitely leave a comment for the next guy that there's a backwards
compatibility quirk involved..
Konrad
next prev parent reply other threads:[~2024-02-06 18:42 UTC|newest]
Thread overview: 16+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-02-06 7:15 [PATCH v2 0/5] LLCC: Support " Unnathi Chalicheemala
2024-02-06 7:15 ` [PATCH v2 1/5] dt-bindings: arm: msm: Add llcc Broadcast_AND register region Unnathi Chalicheemala
2024-02-06 18:23 ` Rob Herring
2024-02-06 7:15 ` [PATCH v2 2/5] arm64: dts: qcom: sm8450: Add mapping to llcc Broadcast_AND region Unnathi Chalicheemala
2024-02-06 8:35 ` Krzysztof Kozlowski
2024-02-06 20:06 ` Unnathi Chalicheemala
2024-02-06 23:56 ` Dmitry Baryshkov
2024-02-06 7:15 ` [PATCH v2 3/5] arm64: dts: qcom: sm8550: " Unnathi Chalicheemala
2024-02-06 7:15 ` [PATCH v2 4/5] arm64: dts: qcom: sm8650: " Unnathi Chalicheemala
2024-02-06 7:15 ` [PATCH v2 5/5] soc: qcom: llcc: Add regmap for " Unnathi Chalicheemala
2024-02-06 8:40 ` Krzysztof Kozlowski
2024-02-06 18:42 ` Konrad Dybcio [this message]
2024-02-06 21:45 ` Unnathi Chalicheemala
2024-02-06 8:34 ` [PATCH v2 0/5] LLCC: Support " Krzysztof Kozlowski
2024-02-06 19:41 ` Unnathi Chalicheemala
2024-02-06 19:54 ` Krzysztof Kozlowski
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=1ca4d384-9df4-4c00-a4c9-0c5ff491616e@linaro.org \
--to=konrad.dybcio@linaro.org \
--cc=andersson@kernel.org \
--cc=conor+dt@kernel.org \
--cc=devicetree@vger.kernel.org \
--cc=kernel@quicinc.com \
--cc=krzysztof.kozlowski+dt@linaro.org \
--cc=linux-arm-msm@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=quic_uchalich@quicinc.com \
--cc=robh+dt@kernel.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
all inboxes | Powered by JetHome®