LKML Archive on lore.kernel.org
 help / color / Atom feed
From: Stephen Boyd <sboyd@kernel.org>
To: Lubomir Rintel <lkundrak@v3.sk>,
	Michael Turquette <mturquette@baylibre.com>
Cc: linux-clk@vger.kernel.org, linux-kernel@vger.kernel.org,
	stable@vger.kernel.org
Subject: Re: [PATCH] clk: mmp2: avoid disabling the SP clock when unused
Date: Wed, 16 Jan 2019 15:29:47 -0800
Message-ID: <154768138798.169631.18317264971847478148@swboyd.mtv.corp.google.com> (raw)
In-Reply-To: <73b20a5caef100d5768679cc395168976e86ed04.camel@v3.sk>

Quoting Lubomir Rintel (2019-01-16 09:26:31)
> On Wed, 2019-01-16 at 08:37 -0800, Stephen Boyd wrote:
> > Quoting Lubomir Rintel (2019-01-16 01:35:05)
> > > There could be vital functionality running on the SP PJ1 core it can not be
> > > restarted just by turning the clock back on.
> > > 
> > > On the OLPC laptop, the keyboard controller code runs there. It
> > > wouldn't be possible to load the driver for it as a module if the clock
> > > is disabled on boot.
> > > 
> > > Cc: stable@vger.kernel.org # v4.18+
> > > Fixes: commit fc27c2394d96 ("clk: mmp2: add SP clock")
> > > Signed-off-by: Lubomir Rintel <lkundrak@v3.sk>
> > > ---
> > >  drivers/clk/mmp/clk-of-mmp2.c | 2 +-
> > >  1 file changed, 1 insertion(+), 1 deletion(-)
> > > 
> > > diff --git a/drivers/clk/mmp/clk-of-mmp2.c b/drivers/clk/mmp/clk-of-mmp2.c
> > > index f2a1c9bbaa63..3e33f1295f59 100644
> > > --- a/drivers/clk/mmp/clk-of-mmp2.c
> > > +++ b/drivers/clk/mmp/clk-of-mmp2.c
> > > @@ -246,7 +246,7 @@ static struct mmp_param_gate_clk apmu_gate_clks[] = {
> > >         {MMP2_CLK_CCIC1, "ccic1_clk", "ccic1_mix_clk", CLK_SET_RATE_PARENT, APMU_CCIC1, 0x1b, 0x1b, 0x0, 0, &ccic1_lock},
> > >         {MMP2_CLK_CCIC1_PHY, "ccic1_phy_clk", "ccic1_mix_clk", CLK_SET_RATE_PARENT, APMU_CCIC1, 0x24, 0x24, 0x0, 0, &ccic1_lock},
> > >         {MMP2_CLK_CCIC1_SPHY, "ccic1_sphy_clk", "ccic1_sphy_div", CLK_SET_RATE_PARENT, APMU_CCIC1, 0x300, 0x300, 0x0, 0, &ccic1_lock},
> > > -       {MMP2_CLK_SP, "sp_clk", NULL, CLK_SET_RATE_PARENT, APMU_SP, 0x1b, 0x1b, 0x0, 0, &sp_lock},
> > > +       {MMP2_CLK_SP, "sp_clk", NULL, CLK_SET_RATE_PARENT | CLK_IGNORE_UNUSED, APMU_SP, 0x1b, 0x1b, 0x0, 0, &sp_lock},
> > 
> > Is it a critical clk that should never be turned off?
> 
> I don't think it is. It is entirely plausible to have no use for the
> "security processor", and in that case it's just okay to keep the clock
> disabled.

So does the firmware/bootloader leave the clk enabled out of boot and we
shouldn't really touch the on/off bits of the clk hardware from the
kernel? Or do we want to actively manage this clk from a driver
somewhere in the kernel?


  reply index

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-01-16  9:35 Lubomir Rintel
2019-01-16 16:37 ` Stephen Boyd
2019-01-16 17:26   ` Lubomir Rintel
2019-01-16 23:29     ` Stephen Boyd [this message]
2019-01-17  9:47       ` Lubomir Rintel
2019-01-18 17:31         ` Stephen Boyd

Reply instructions:

You may reply publically 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=154768138798.169631.18317264971847478148@swboyd.mtv.corp.google.com \
    --to=sboyd@kernel.org \
    --cc=linux-clk@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=lkundrak@v3.sk \
    --cc=mturquette@baylibre.com \
    --cc=stable@vger.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

LKML Archive on lore.kernel.org

Archives are clonable:
	git clone --mirror https://lore.kernel.org/lkml/0 lkml/git/0.git
	git clone --mirror https://lore.kernel.org/lkml/1 lkml/git/1.git
	git clone --mirror https://lore.kernel.org/lkml/2 lkml/git/2.git
	git clone --mirror https://lore.kernel.org/lkml/3 lkml/git/3.git
	git clone --mirror https://lore.kernel.org/lkml/4 lkml/git/4.git
	git clone --mirror https://lore.kernel.org/lkml/5 lkml/git/5.git
	git clone --mirror https://lore.kernel.org/lkml/6 lkml/git/6.git
	git clone --mirror https://lore.kernel.org/lkml/7 lkml/git/7.git

	# If you have public-inbox 1.1+ installed, you may
	# initialize and index your mirror using the following commands:
	public-inbox-init -V2 lkml lkml/ https://lore.kernel.org/lkml \
		linux-kernel@vger.kernel.org linux-kernel@archiver.kernel.org
	public-inbox-index lkml


Newsgroup available over NNTP:
	nntp://nntp.lore.kernel.org/org.kernel.vger.linux-kernel


AGPL code for this site: git clone https://public-inbox.org/ public-inbox