All of lore.kernel.org
 help / color / mirror / Atom feed
From: Michael Turquette <mturquette@linaro.org>
To: Andrew Bresticker <abrestic@chromium.org>,
	"Stephen Boyd" <sboyd@codeaurora.org>
Cc: "Ralf Baechle" <ralf@linux-mips.org>,
	"devicetree@vger.kernel.org" <devicetree@vger.kernel.org>,
	"Linux-MIPS" <linux-mips@linux-mips.org>,
	"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
	"Ezequiel Garcia" <ezequiel.garcia@imgtec.com>,
	"James Hartley" <james.hartley@imgtec.com>,
	"James Hogan" <james.hogan@imgtec.com>
Subject: Re: [PATCH 2/7] clk: Add basic infrastructure for Pistachio clocks
Date: Mon, 30 Mar 2015 18:36:59 -0700	[thread overview]
Message-ID: <20150331013659.25195.31669@quantum> (raw)
In-Reply-To: <CAL1qeaGTtMWDM+p+FpDRP=L-yqQ_ai7LY8GwcBUO_C1F+V1LzQ@mail.gmail.com>

Quoting Andrew Bresticker (2015-03-30 17:15:43)
> On Mon, Mar 30, 2015 at 4:59 PM, Stephen Boyd <sboyd@codeaurora.org> wrote:
> > On 02/24/15 19:56, Andrew Bresticker wrote:
> >> +
> >> +void pistachio_clk_force_enable(struct pistachio_clk_provider *p,
> >> +                             unsigned int *clk_ids, unsigned int num)
> >> +{
> >> +     unsigned int i;
> >> +     int err;
> >> +
> >> +     for (i = 0; i < num; i++) {
> >> +             struct clk *clk = p->clk_data.clks[clk_ids[i]];
> >> +
> >> +             if (IS_ERR(clk))
> >> +                     continue;
> >> +
> >> +             err = clk_prepare_enable(clk);
> >> +             if (err)
> >> +                     pr_err("Failed to enable clock %s: %d\n",
> >> +                            __clk_get_name(clk), err);
> >> +     }
> >> +}
> >>
> >
> > Is this to workaround some problems in the framework where clocks are
> > turned off? Or is it that these clocks are already on before we boot
> > Linux and we need to make sure the framework knows that?
> 
> It's the former.  These clocks are enabled at POR and may only be
> gated as the final step to entering suspend, so they must remain on at
> runtime.  The issue we were running into was that consumers of these
> critical clocks or their descendants would enable/disable their clocks
> during boot or runtime PM and cause these clocks to get disabled.
> Bumping up the prepare/enable count of these critical clocks seemed
> like the best way to handle this - is there a more preferred way?
> FWIW, this is also how the Tegra and Rockchip drivers handled this
> problem.

Hi Andrew,

Why are your drivers allowed to disable clocks which must not be
disabled? (you mentioned boot and runtime pm)

Is this the case that a critical clock is not directly disabled, but a
parent of that critical clock is and it is gated as a result?

Regards,
Mike

  parent reply	other threads:[~2015-03-31  1:37 UTC|newest]

Thread overview: 22+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-02-25  3:56 [PATCH 0/7] clk: Common clock support for IMG Pistachio Andrew Bresticker
2015-02-25  3:56 ` Andrew Bresticker
2015-02-25  3:56 ` [PATCH 1/7] clk: Add binding document for Pistachio clock controllers Andrew Bresticker
2015-02-25  3:56 ` [PATCH 2/7] clk: Add basic infrastructure for Pistachio clocks Andrew Bresticker
2015-03-30 23:59   ` Stephen Boyd
2015-03-30 23:59     ` Stephen Boyd
2015-03-31  0:15     ` Andrew Bresticker
2015-03-31  0:15       ` Andrew Bresticker
2015-03-31  1:21       ` Stephen Boyd
2015-03-31  1:21         ` Stephen Boyd
2015-03-31  1:36         ` Andrew Bresticker
2015-03-31  1:36           ` Andrew Bresticker
2015-03-31  1:36       ` Michael Turquette [this message]
2015-03-31  1:49         ` Andrew Bresticker
2015-03-31  1:49           ` Andrew Bresticker
2015-02-25  3:56 ` [PATCH 3/7] clk: pistachio: Add PLL driver Andrew Bresticker
2015-02-25  3:56 ` [PATCH 4/7] clk: pistachio: Register core clocks Andrew Bresticker
2015-02-25  3:56 ` [PATCH 5/7] clk: pistachio: Register peripheral clocks Andrew Bresticker
2015-02-25  3:56   ` Andrew Bresticker
2015-02-25  3:56 ` [PATCH 6/7] clk: pistachio: Register system interface gate clocks Andrew Bresticker
2015-02-25  3:56 ` [PATCH 7/7] clk: pistachio: Register external clock gates Andrew Bresticker
2015-03-31  0:01 ` [PATCH 0/7] clk: Common clock support for IMG Pistachio Stephen Boyd

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=20150331013659.25195.31669@quantum \
    --to=mturquette@linaro.org \
    --cc=abrestic@chromium.org \
    --cc=devicetree@vger.kernel.org \
    --cc=ezequiel.garcia@imgtec.com \
    --cc=james.hartley@imgtec.com \
    --cc=james.hogan@imgtec.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-mips@linux-mips.org \
    --cc=ralf@linux-mips.org \
    --cc=sboyd@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 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.