lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Date:   Wed, 6 Jul 2022 12:07:12 +0200
From:   Christian Marangi <ansuelsmth@...il.com>
To:     Dmitry Baryshkov <dmitry.baryshkov@...aro.org>
Cc:     Bjorn Andersson <bjorn.andersson@...aro.org>,
        Andy Gross <agross@...nel.org>,
        Michael Turquette <mturquette@...libre.com>,
        Stephen Boyd <sboyd@...nel.org>,
        Rob Herring <robh+dt@...nel.org>,
        Krzysztof Kozlowski <krzysztof.kozlowski+dt@...aro.org>,
        linux-arm-msm@...r.kernel.org, linux-clk@...r.kernel.org,
        linux-kernel@...r.kernel.org, devicetree@...r.kernel.org
Subject: Re: [PATCH v2 3/3] clk: qcom: lcc-ipq806x: convert to parent data

On Wed, Jul 06, 2022 at 10:34:04AM +0300, Dmitry Baryshkov wrote:
> On Tue, 5 Jul 2022 at 23:48, Christian Marangi <ansuelsmth@...il.com> wrote:
> >
> > On Tue, Jun 21, 2022 at 11:43:10PM +0300, Dmitry Baryshkov wrote:
> > > On Tue, 21 Jun 2022 at 23:23, Christian Marangi <ansuelsmth@...il.com> wrote:
> > > >
> > > > On Tue, Jun 21, 2022 at 08:15:57PM +0300, Dmitry Baryshkov wrote:
> > > > > On Tue, 21 Jun 2022 at 19:33, Christian Marangi <ansuelsmth@...il.com> wrote:
> > > > > >
> > > > > > Convert lcc-ipq806x driver to parent_data API.
> > > > > >
> > > > > > Signed-off-by: Christian Marangi <ansuelsmth@...il.com>
> > > > > > ---
> > > > > > v2:
> > > > > > - Fix Sob tag
> > > > > >
> > > > > >  drivers/clk/qcom/lcc-ipq806x.c | 79 +++++++++++++++++++---------------
> > > > > >  1 file changed, 44 insertions(+), 35 deletions(-)
> > > > > >
> > > > > > diff --git a/drivers/clk/qcom/lcc-ipq806x.c b/drivers/clk/qcom/lcc-ipq806x.c
> > > > > > index ba90bebba597..c07ca8dc6e3a 100644
> > > > > > --- a/drivers/clk/qcom/lcc-ipq806x.c
> > > > > > +++ b/drivers/clk/qcom/lcc-ipq806x.c
> > > > > > @@ -24,6 +24,10 @@
> > > > > >  #include "clk-regmap-mux.h"
> > > > > >  #include "reset.h"
> > > > > >
> > > > > > +static const struct clk_parent_data gcc_pxo[] = {
> > > > > > +       { .fw_name = "pxo", .name = "pxo" },
> > > > >
> > > > > I think you'd use .name = "pxo_board" here. You don't need to use the
> > > > > interim clock.
> > > > >
> > > >
> > > > In gcc and in the rest of this driver we use pxo. Wonder what is right?
> > >
> > > I'd use .fw_name = "pxo", .name = "pxo_board", like the rest of drivers do.
> > >
> >
> > Will do the change, but I need an explaination... Is the use of
> > pxo_board correct?
> >
> > I'm sending a patch that sets the pxo_board fixed clock in dts to output
> > "pxo". The only clock that still use pxo_board is rpm, everything else
> > at least for ipq806x use pxo and i'm sending a patch to use pxo for rpm.
> >
> > Considering pxo is always present and pxo_board should be dropped
> > because every ipq806x driver use "pxo".
> >
> > What is correct naming pxo or pxo_board? I assume pxo right?
> 
> This might be not the case for the ipq806x, but here is the story for
> all other (old) platforms:
> - gcc driver manually registered pxo/cxo/xo fixed factor clocks.
> - Then we started adding *xo_board clocks to the DT, as they represent
> the external oscillators
> -  PXO clock consumers receive a clocks entry with clock-names = "pxo"
> which points to the pxo_board
> - All clock drivers are now being switched to use .fw_name = "pxo",
> .name = "pxo_board" to use the DT-defined pxo_board clock.
> 
> Hopefully at some point we can then drop the manually registered pxo
> clock and always use the DT-based one.
>

Okok. I got confused since looking at the code factor clock is really
just a hack to handle both driver that use pxo_board and pxo cause from
what I notice it's the same clock with different naming.

Sooo keep using pxo_board with the fact that pxo is always present seems
to be redundant but if that's the pattern then I will just keep
pxo_board in .name where it's used.

> -- 
> With best wishes
> Dmitry

-- 
	Ansuel

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ