All of lore.kernel.org
 help / color / mirror / Atom feed
From: heiko@sntech.de (Heiko Stübner)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH] clk: rockchip: add initcall to set clk defaults after syscons are available
Date: Wed, 24 Sep 2014 22:27:17 +0200	[thread overview]
Message-ID: <1913186.v9VZxj5m8a@phil> (raw)
In-Reply-To: <CAD=FV=V5ZBAVEV=-BK7MEWO2KLUqQ4L6ZXrxkGA=AsKxY3mq9w@mail.gmail.com>

Am Mittwoch, 24. September 2014, 13:21:57 schrieb Doug Anderson:
> Hi,
> 
> On Thu, Aug 7, 2014 at 5:57 AM, Heiko St?bner <heiko@sntech.de> wrote:
> > PLLs on Rockchip platforms report their locking state in an external
> > register situated in the "General Register Files" which is provided
> > through a syscon device.
> > 
> > When the initial clk init runs, this syscon is of course not yet
> > available, making it impossible to set PLLs to other frequencies
> > through the assigned-rate property of the clock-controller node.
> > 
> > Syscon devices are initialized through a postcore initcall, so add an
> > arch_initcall to rerun the rockchip specific clock initalization when
> > the GRF is available.
> > 
> > As the clock init already runs two times (through of_clk_add_provider
> > and of_clk_init), a third time shouldn't hurt to much and in the best
> > case wouldn't change any settings at all.
> > 
> > Signed-off-by: Heiko Stuebner <heiko@sntech.de>
> > ---
> > 
> >  drivers/clk/rockchip/clk.c | 13 +++++++++++++
> >  1 file changed, 13 insertions(+)
> 
> My current understanding is that this patch is on hold pending
> <https://patchwork.kernel.org/patch/4945531/> (AKA mfd: syscon:
> Decouple syscon interface from platform devices).  If that patch lands
> then we can drop this one.

correct.

I've tested v5 this evening and apart from the debugfs issue I reported there, 
the whole assigned-clocks init worked really nice.


Heiko

WARNING: multiple messages have this Message-ID (diff)
From: "Heiko Stübner" <heiko@sntech.de>
To: Doug Anderson <dianders@chromium.org>
Cc: Mike Turquette <mturquette@linaro.org>,
	"linux-arm-kernel@lists.infradead.org" 
	<linux-arm-kernel@lists.infradead.org>,
	"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH] clk: rockchip: add initcall to set clk defaults after syscons are available
Date: Wed, 24 Sep 2014 22:27:17 +0200	[thread overview]
Message-ID: <1913186.v9VZxj5m8a@phil> (raw)
In-Reply-To: <CAD=FV=V5ZBAVEV=-BK7MEWO2KLUqQ4L6ZXrxkGA=AsKxY3mq9w@mail.gmail.com>

Am Mittwoch, 24. September 2014, 13:21:57 schrieb Doug Anderson:
> Hi,
> 
> On Thu, Aug 7, 2014 at 5:57 AM, Heiko Stübner <heiko@sntech.de> wrote:
> > PLLs on Rockchip platforms report their locking state in an external
> > register situated in the "General Register Files" which is provided
> > through a syscon device.
> > 
> > When the initial clk init runs, this syscon is of course not yet
> > available, making it impossible to set PLLs to other frequencies
> > through the assigned-rate property of the clock-controller node.
> > 
> > Syscon devices are initialized through a postcore initcall, so add an
> > arch_initcall to rerun the rockchip specific clock initalization when
> > the GRF is available.
> > 
> > As the clock init already runs two times (through of_clk_add_provider
> > and of_clk_init), a third time shouldn't hurt to much and in the best
> > case wouldn't change any settings at all.
> > 
> > Signed-off-by: Heiko Stuebner <heiko@sntech.de>
> > ---
> > 
> >  drivers/clk/rockchip/clk.c | 13 +++++++++++++
> >  1 file changed, 13 insertions(+)
> 
> My current understanding is that this patch is on hold pending
> <https://patchwork.kernel.org/patch/4945531/> (AKA mfd: syscon:
> Decouple syscon interface from platform devices).  If that patch lands
> then we can drop this one.

correct.

I've tested v5 this evening and apart from the debugfs issue I reported there, 
the whole assigned-clocks init worked really nice.


Heiko

  reply	other threads:[~2014-09-24 20:27 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-08-07 12:57 [PATCH] clk: rockchip: add initcall to set clk defaults after syscons are available Heiko Stübner
2014-08-07 12:57 ` Heiko Stübner
2014-09-22  7:56 ` Kever Yang
2014-09-22  7:56   ` Kever Yang
2014-09-24 20:21 ` Doug Anderson
2014-09-24 20:21   ` Doug Anderson
2014-09-24 20:27   ` Heiko Stübner [this message]
2014-09-24 20:27     ` Heiko Stübner

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=1913186.v9VZxj5m8a@phil \
    --to=heiko@sntech.de \
    --cc=linux-arm-kernel@lists.infradead.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.