From: Bjorn Andersson <bjorn.andersson@linaro.org>
To: Robert Marko <robimarko@gmail.com>
Cc: agross@kernel.org, konrad.dybcio@somainline.org,
jassisinghbrar@gmail.com, robh+dt@kernel.org,
krzysztof.kozlowski+dt@linaro.org, linux-arm-msm@vger.kernel.org,
linux-kernel@vger.kernel.org, devicetree@vger.kernel.org,
dmitry.baryshkov@linaro.org
Subject: Re: [PATCH v6 1/4] mailbox: qcom-apcs-ipc: make regmap max_register configurable
Date: Wed, 13 Jul 2022 15:43:37 -0500 [thread overview]
Message-ID: <Ys8ueXn77ZjRTt25@builder.lan> (raw)
In-Reply-To: <20220707173733.404947-1-robimarko@gmail.com>
On Thu 07 Jul 12:37 CDT 2022, Robert Marko wrote:
> APCS register space in IPQ8074 is 0x6000 so regmap max_register needs to
> be 0x5ffc.
>
> Instead of making it global, make max_register configurable via match data.
>
> Signed-off-by: Robert Marko <robimarko@gmail.com>
Reviewed-by: Bjorn Andersson <bjorn.andersson@linaro.org>
Regards,
Bjorn
> ---
> drivers/mailbox/qcom-apcs-ipc-mailbox.c | 12 +++++++++---
> 1 file changed, 9 insertions(+), 3 deletions(-)
>
> diff --git a/drivers/mailbox/qcom-apcs-ipc-mailbox.c b/drivers/mailbox/qcom-apcs-ipc-mailbox.c
> index 80a54d81412e..c05f3276d02c 100644
> --- a/drivers/mailbox/qcom-apcs-ipc-mailbox.c
> +++ b/drivers/mailbox/qcom-apcs-ipc-mailbox.c
> @@ -27,6 +27,7 @@ struct qcom_apcs_ipc {
> struct qcom_apcs_ipc_data {
> int offset;
> char *clk_name;
> + unsigned int max_register;
> };
>
> static const struct qcom_apcs_ipc_data ipq6018_apcs_data = {
> @@ -53,7 +54,7 @@ static const struct qcom_apcs_ipc_data sdx55_apcs_data = {
> .offset = 0x1008, .clk_name = "qcom-sdx55-acps-clk"
> };
>
> -static const struct regmap_config apcs_regmap_config = {
> +static struct regmap_config apcs_regmap_config = {
> .reg_bits = 32,
> .reg_stride = 4,
> .val_bits = 32,
> @@ -91,12 +92,17 @@ static int qcom_apcs_ipc_probe(struct platform_device *pdev)
> if (IS_ERR(base))
> return PTR_ERR(base);
>
> + apcs_data = of_device_get_match_data(&pdev->dev);
> + if (!apcs_data)
> + return -ENODATA;
> +
> + if (apcs_data->max_register)
> + apcs_regmap_config.max_register = apcs_data->max_register;
> +
> regmap = devm_regmap_init_mmio(&pdev->dev, base, &apcs_regmap_config);
> if (IS_ERR(regmap))
> return PTR_ERR(regmap);
>
> - apcs_data = of_device_get_match_data(&pdev->dev);
> -
> apcs->regmap = regmap;
> apcs->offset = apcs_data->offset;
>
> --
> 2.36.1
>
next prev parent reply other threads:[~2022-07-13 20:43 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-07-07 17:37 [PATCH v6 1/4] mailbox: qcom-apcs-ipc: make regmap max_register configurable Robert Marko
2022-07-07 17:37 ` [PATCH v6 2/4] mailbox: qcom-apcs-ipc: add IPQ8074 APSS clock controller support Robert Marko
2022-07-13 20:44 ` Bjorn Andersson
2022-07-13 20:47 ` Robert Marko
2022-07-07 17:37 ` [PATCH v6 3/4] dt-bindings: mailbox: qcom: set correct #clock-cells Robert Marko
2022-07-07 17:37 ` [PATCH v6 4/4] arm64: dts: ipq8074: add APCS node Robert Marko
2022-07-16 15:19 ` (subset) " Bjorn Andersson
2022-07-17 12:02 ` Robert Marko
2022-07-13 20:43 ` Bjorn Andersson [this message]
2022-07-13 20:46 ` [PATCH v6 1/4] mailbox: qcom-apcs-ipc: make regmap max_register configurable Robert Marko
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=Ys8ueXn77ZjRTt25@builder.lan \
--to=bjorn.andersson@linaro.org \
--cc=agross@kernel.org \
--cc=devicetree@vger.kernel.org \
--cc=dmitry.baryshkov@linaro.org \
--cc=jassisinghbrar@gmail.com \
--cc=konrad.dybcio@somainline.org \
--cc=krzysztof.kozlowski+dt@linaro.org \
--cc=linux-arm-msm@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=robh+dt@kernel.org \
--cc=robimarko@gmail.com \
/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).