All of lore.kernel.org
 help / color / mirror / Atom feed
From: Christian Marangi <ansuelsmth@gmail.com>
To: Konrad Dybcio <konrad.dybcio@somainline.org>
Cc: Bjorn Andersson <bjorn.andersson@linaro.org>,
	Andy Gross <agross@kernel.org>,
	Michael Turquette <mturquette@baylibre.com>,
	Stephen Boyd <sboyd@kernel.org>, Rob Herring <robh+dt@kernel.org>,
	Krzysztof Kozlowski <krzysztof.kozlowski+dt@linaro.org>,
	linux-arm-msm@vger.kernel.org, linux-clk@vger.kernel.org,
	devicetree@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH 3/5] clk: qcom: clk-rpm: convert to parent_data API
Date: Wed, 6 Jul 2022 15:16:10 +0200	[thread overview]
Message-ID: <62c58eff.1c69fb81.9bbbf.f072@mx.google.com> (raw)
In-Reply-To: <92d41b82-97ab-723d-4191-1fcaca17fb76@somainline.org>

On Wed, Jul 06, 2022 at 03:26:53PM +0200, Konrad Dybcio wrote:
> 
> 
> On 5.07.2022 22:28, Christian Marangi wrote:
> > Convert clk-rpm driver to parent_data API and change parent names to cxo
> > and pxo instead of the board variant as pxo_board is an ancient name and
> > pxo should be used instead.
> > 
> > Signed-off-by: Christian Marangi <ansuelsmth@gmail.com>
> > ---
> >  drivers/clk/qcom/clk-rpm.c | 24 ++++++++++++++++--------
> >  1 file changed, 16 insertions(+), 8 deletions(-)
> > 
> > diff --git a/drivers/clk/qcom/clk-rpm.c b/drivers/clk/qcom/clk-rpm.c
> > index a18811c38018..d45a8b0fc97c 100644
> > --- a/drivers/clk/qcom/clk-rpm.c
> > +++ b/drivers/clk/qcom/clk-rpm.c
> > @@ -23,6 +23,14 @@
> >  #define QCOM_RPM_SCALING_ENABLE_ID			0x2
> >  #define QCOM_RPM_XO_MODE_ON				0x2
> >  
> > +static const struct clk_parent_data gcc_pxo[] = {
> > +	{ .fw_name = "pxo", .name = "pxo" },
> The .name lookup should include _board, as the old DTs expect that.
> If I understand correctly though, you need to preserve both pxo and
> pxo_board, as they were separate, not sure though..
>

pxo_board is what comes first... then qcom gcc driver hacks it and
create a factor clk with 1/1 div and provide pxo.
In practice they are the same clk. But yhea I should not change the
name, will resent with .name = pxo_board and be done with it.

> Konrad
> > +};
> > +
> > +static const struct clk_parent_data gcc_cxo[] = {
> > +	{ .fw_name = "cxo", .name = "cxo" },
> > +};
> > +
> >  #define DEFINE_CLK_RPM(_platform, _name, _active, r_id)			      \
> >  	static struct clk_rpm _platform##_##_active;			      \
> >  	static struct clk_rpm _platform##_##_name = {			      \
> > @@ -32,8 +40,8 @@
> >  		.hw.init = &(struct clk_init_data){			      \
> >  			.ops = &clk_rpm_ops,				      \
> >  			.name = #_name,					      \
> > -			.parent_names = (const char *[]){ "pxo_board" },      \
> > -			.num_parents = 1,				      \
> > +			.parent_data = gcc_pxo,				      \
> > +			.num_parents = ARRAY_SIZE(gcc_pxo),		      \
> >  		},							      \
> >  	};								      \
> >  	static struct clk_rpm _platform##_##_active = {			      \
> > @@ -44,8 +52,8 @@
> >  		.hw.init = &(struct clk_init_data){			      \
> >  			.ops = &clk_rpm_ops,				      \
> >  			.name = #_active,				      \
> > -			.parent_names = (const char *[]){ "pxo_board" },      \
> > -			.num_parents = 1,				      \
> > +			.parent_data = gcc_pxo,				      \
> > +			.num_parents = ARRAY_SIZE(gcc_pxo),		      \
> >  		},							      \
> >  	}
> >  
> > @@ -56,8 +64,8 @@
> >  		.hw.init = &(struct clk_init_data){			      \
> >  			.ops = &clk_rpm_xo_ops,			      \
> >  			.name = #_name,					      \
> > -			.parent_names = (const char *[]){ "cxo_board" },      \
> > -			.num_parents = 1,				      \
> > +			.parent_data = gcc_cxo,				      \
> > +			.num_parents = ARRAY_SIZE(gcc_cxo),		      \
> >  		},							      \
> >  	}
> >  
> > @@ -68,8 +76,8 @@
> >  		.hw.init = &(struct clk_init_data){			      \
> >  			.ops = &clk_rpm_fixed_ops,			      \
> >  			.name = #_name,					      \
> > -			.parent_names = (const char *[]){ "pxo" },	      \
> > -			.num_parents = 1,				      \
> > +			.parent_data = gcc_pxo,				      \
> > +			.num_parents = ARRAY_SIZE(gcc_pxo),		      \
> >  		},							      \
> >  	}
> >  

-- 
	Ansuel

  reply	other threads:[~2022-07-06 13:32 UTC|newest]

Thread overview: 24+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-07-05 20:28 [PATCH 0/5] clk: qcom: Drop use of pxo/cxo_board for rpm devices Christian Marangi
2022-07-05 20:28 ` [PATCH 1/5] dt-bindings: clock: fix wrong clock documentation for qcom,rpmcc Christian Marangi
2022-07-06  7:43   ` Krzysztof Kozlowski
2022-07-06  8:23   ` Dmitry Baryshkov
2022-07-06 10:19     ` Christian Marangi
2022-07-06 11:58       ` Dmitry Baryshkov
2022-07-05 20:28 ` [PATCH 2/5] ARM: DTS: qcom: fix dtbs_check warning with new rpmcc clocks Christian Marangi
2022-07-06  7:35   ` Dmitry Baryshkov
2022-07-06  7:44   ` Krzysztof Kozlowski
2022-07-06 10:20     ` Christian Marangi
2022-07-06 15:07       ` Krzysztof Kozlowski
2022-07-06 19:10         ` Christian Marangi
2022-07-06 20:09           ` Krzysztof Kozlowski
2022-07-06 20:38             ` Christian Marangi
2022-07-05 20:28 ` [PATCH 3/5] clk: qcom: clk-rpm: convert to parent_data API Christian Marangi
2022-07-06  8:27   ` Dmitry Baryshkov
2022-07-06 10:21     ` Christian Marangi
2022-07-06 13:26   ` Konrad Dybcio
2022-07-06 13:16     ` Christian Marangi [this message]
2022-07-05 20:28 ` [PATCH 4/5] ARM: dts: qcom: add pxo/cxo clock-output-names for ipq8064 Christian Marangi
2022-07-06  8:29   ` Dmitry Baryshkov
2022-07-06 10:22     ` Christian Marangi
2022-07-06 13:24   ` Konrad Dybcio
2022-07-05 20:28 ` [PATCH 5/5] clk: qcom: gcc-ipq806x: remove cc_register_board for pxo and cxo Christian Marangi

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=62c58eff.1c69fb81.9bbbf.f072@mx.google.com \
    --to=ansuelsmth@gmail.com \
    --cc=agross@kernel.org \
    --cc=bjorn.andersson@linaro.org \
    --cc=devicetree@vger.kernel.org \
    --cc=konrad.dybcio@somainline.org \
    --cc=krzysztof.kozlowski+dt@linaro.org \
    --cc=linux-arm-msm@vger.kernel.org \
    --cc=linux-clk@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mturquette@baylibre.com \
    --cc=robh+dt@kernel.org \
    --cc=sboyd@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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.