[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <CAOX2RU491K_ze466NRBg401YcwFHXxB+KZBhx=nJ8O_6abn3oQ@mail.gmail.com>
Date: Wed, 13 Jul 2022 22:46:29 +0200
From: Robert Marko <robimarko@...il.com>
To: Bjorn Andersson <bjorn.andersson@...aro.org>
Cc: Andy Gross <agross@...nel.org>,
Konrad Dybcio <konrad.dybcio@...ainline.org>,
Jassi Brar <jassisinghbrar@...il.com>,
Rob Herring <robh+dt@...nel.org>,
krzysztof.kozlowski+dt@...aro.org,
linux-arm-msm <linux-arm-msm@...r.kernel.org>,
open list <linux-kernel@...r.kernel.org>,
Devicetree List <devicetree@...r.kernel.org>,
Dmitry Baryshkov <dmitry.baryshkov@...aro.org>
Subject: Re: [PATCH v6 1/4] mailbox: qcom-apcs-ipc: make regmap max_register configurable
On Wed, 13 Jul 2022 at 22:43, Bjorn Andersson
<bjorn.andersson@...aro.org> wrote:
>
> 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@...il.com>
>
> Reviewed-by: Bjorn Andersson <bjorn.andersson@...aro.org>
Bjorn, please ignore the v6 series, a way simplified and better
support is in the v8 series.
Regards,
Robert
>
> 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
> >
Powered by blists - more mailing lists