linux-clk.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Stephen Boyd <sboyd@kernel.org>
To: Michael Turquette <mturquette@baylibre.com>,
	Taniya Das <tdas@codeaurora.org>
Cc: Andy Gross <andy.gross@linaro.org>,
	David Brown <david.brown@linaro.org>,
	Rajendra Nayak <rnayak@codeaurora.org>,
	linux-arm-msm@vger.kernel.org, linux-soc@vger.kernel.org,
	linux-clk@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH v1] clk: qcom: lpass: Add CLK_IGNORE_UNUSED for lpass clocks
Date: Mon, 07 Jan 2019 13:04:37 -0800	[thread overview]
Message-ID: <154689507747.15366.6553307032295093169@swboyd.mtv.corp.google.com> (raw)
In-Reply-To: <b6397ef1-a6df-0040-9dcc-c491b76a2f8f@codeaurora.org>

Quoting Taniya Das (2019-01-06 22:26:00)
> Hello Stephen,
> 
> On 12/21/2018 2:34 AM, Stephen Boyd wrote:
> > Quoting Taniya Das (2018-12-20 03:46:25)
> >> The LPASS clocks has a dependency on the GCC lpass clocks to be enabled
> >> before accessing them and that was the reason to mark the gcc lpass clocks
> >> as critical. But in the case where the lpass subsystem would require a
> >> restart, toggling the lpass reset would from HW clear the SW enable bits
> >> of the GCC lpass clocks. Thus the next time bringing up the lpass subsystem
> >> out of reset would fail.
> >>
> >> Allow the lpass clock driver to enable/disable the gcc lpass clocks and
> >> mark the lpass clocks not be accessed during late_init if no client vote.
> > 
> > You need to add more details here. It feels like you wrote the beginning
> > of a paragraph and then stopped abruptly, leaving the reader hanging for
> > the whole story. Why is late_init important? Why do we need to leave
> > them on from the bootloader? What if the bootloader doesn't leave them
> > enabled? This is all rather hacky so I'm deeply confused. Does the lpass
> > driver need to get these gcc clks and enable/prepare them during probe?
> > But then it needs to also allow a reset happen and change the clk state?
> > 
> > I suspect this situation is circling a larger problem where a reset is
> > toggled and that changes some clk state without the clk framework
> > knowing. There's not much we can do about that besides having some
> > mechanism for the clks to know that their state is now out of sync. If
> > that can be done on the provider driver side then we should have an
> > easier time not needing to write a bunch of framework code to handle
> > this. OMAP folks are dealing with the same problems from what I recall.
> > 
> 
> Hmm, if I mark the CLK_IS_CRITICAL, I don't see a way to handle it in 
> provider. Please suggest if you think provider could handle it.

As far as I know, I'm not suggesting the use of CLK_IS_CRITICAL here.
But removing CLK_IS_CRITICAL and relying on some random bootloader
behavior also looks wrong. Can you clarify what's going on?


  reply	other threads:[~2019-01-07 21:04 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-12-20 11:46 [PATCH v1] clk: qcom: lpass: Add CLK_IGNORE_UNUSED for lpass clocks Taniya Das
2018-12-20 21:04 ` Stephen Boyd
2019-01-07  6:26   ` Taniya Das
2019-01-07 21:04     ` Stephen Boyd [this message]
2019-01-14  6:12       ` Taniya Das
2019-01-14 22:25         ` Stephen Boyd
2019-01-17 11:19           ` Taniya Das
2019-01-18 19:01             ` Stephen Boyd
2019-01-22  9:31               ` Taniya Das
2019-02-13  7:17 ` Bjorn Andersson

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=154689507747.15366.6553307032295093169@swboyd.mtv.corp.google.com \
    --to=sboyd@kernel.org \
    --cc=andy.gross@linaro.org \
    --cc=david.brown@linaro.org \
    --cc=linux-arm-msm@vger.kernel.org \
    --cc=linux-clk@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-soc@vger.kernel.org \
    --cc=mturquette@baylibre.com \
    --cc=rnayak@codeaurora.org \
    --cc=tdas@codeaurora.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 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).