R: R: [PATCH v2] ARM: qcom: Disable i2c device on gsbi4 for ipq806x

From: ansuelsmth
Date: Wed Apr 15 2020 - 19:13:01 EST




> -----Messaggio originale-----
> Da: Stephen Boyd <sboyd@xxxxxxxxxx>
> Inviato: domenica 5 aprile 2020 05:11
> A: 'Andy Gross' <agross@xxxxxxxxxx>; ansuelsmth@xxxxxxxxx
> Cc: 'Mathieu Olivari' <mathieu@xxxxxxxxxxxxxx>; 'Bjorn Andersson'
> <bjorn.andersson@xxxxxxxxxx>; 'Rob Herring' <robh+dt@xxxxxxxxxx>; 'Mark
> Rutland' <mark.rutland@xxxxxxx>; 'Michael Turquette'
> <mturquette@xxxxxxxxxxxx>; linux-arm-msm@xxxxxxxxxxxxxxx;
> devicetree@xxxxxxxxxxxxxxx; linux-kernel@xxxxxxxxxxxxxxx; linux-
> clk@xxxxxxxxxxxxxxx
> Oggetto: Re: R: [PATCH v2] ARM: qcom: Disable i2c device on gsbi4 for
> ipq806x
>
> Quoting ansuelsmth@xxxxxxxxx (2020-04-02 18:39:04)
> >
> >
> > > -----Messaggio originale-----
> > > Da: Stephen Boyd <sboyd@xxxxxxxxxx>
> > > Inviato: venerdà 3 aprile 2020 03:34
> > > A: Andy Gross <agross@xxxxxxxxxx>; Ansuel Smith
> > > <ansuelsmth@xxxxxxxxx>
> > > Cc: Ansuel Smith <ansuelsmth@xxxxxxxxx>; Mathieu Olivari
> > > <mathieu@xxxxxxxxxxxxxx>; Bjorn Andersson
> > > <bjorn.andersson@xxxxxxxxxx>; Rob Herring <robh+dt@xxxxxxxxxx>;
> Mark
> > > Rutland <mark.rutland@xxxxxxx>; Michael Turquette
> > > <mturquette@xxxxxxxxxxxx>; linux-arm-msm@xxxxxxxxxxxxxxx;
> > > devicetree@xxxxxxxxxxxxxxx; linux-kernel@xxxxxxxxxxxxxxx; linux-
> > > clk@xxxxxxxxxxxxxxx
> > > Oggetto: Re: [PATCH v2] ARM: qcom: Disable i2c device on gsbi4 for
> > > ipq806x
> > >
> > > Quoting Ansuel Smith (2020-03-30 13:56:46)
> > > > diff --git a/drivers/clk/qcom/gcc-ipq806x.c b/drivers/clk/qcom/gcc-
> > > ipq806x.c
> > > > index b0eee0903807..f7d7a2bc84c1 100644
> > > > --- a/drivers/clk/qcom/gcc-ipq806x.c
> > > > +++ b/drivers/clk/qcom/gcc-ipq806x.c
> > > > @@ -991,6 +991,7 @@ static struct clk_branch gsbi4_h_clk = {
> > > > .hw.init = &(struct clk_init_data){
> > > > .name = "gsbi4_h_clk",
> > > > .ops = &clk_branch_ops,
> > > > + .flags = CLK_IGNORE_UNUSED,
> > >
> > > Is this necessary? Shouldn't we skip clks that are protected during the
> > > unused phase?
> > >
> >
> > gsbi4_h_clk is not protected. gsbi4_h_clk needs to not be disabled if
> unused
> > (as it's used by rpm) but can't be protected since it's used by uart gsbi4.
> > (With some test protecting also this clk cause the malfunction of uart
> gsb4)
> >
>
> Who owns gsbi4 on this platform? Is it RPM? If so, it should be
> protected and we shouldn't touch this clk from the kernel.

Sorry for the late replay. Trying to protect gsbi4 clk cause the uart serial to
not work at all as it can't be used by the driver. If for some
reason some dev decide to not use gsbi4 uart, GSBI4_CLK gets disabled
(as it would be not used), this is the reason of the IGNORE_UNUSED.
I really can't find another way to keep both gsbi4 protected and and permit
gsbi4 uart to use it.