devicetree.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Michael Turquette <mturquette@baylibre.com>
To: Joachim Eastwood <manabian@gmail.com>
Cc: devicetree@vger.kernel.org, Stephen Boyd <sboyd@codeaurora.org>,
	linux-clk@vger.kernel.org,
	"linux-arm-kernel@lists.infradead.org"
	<linux-arm-kernel@lists.infradead.org>
Subject: Re: [PATCH 1/2] clk: add lpc18xx creg clk driver
Date: Mon, 17 Aug 2015 17:26:04 -0700	[thread overview]
Message-ID: <20150818002604.31346.18322@quantum> (raw)
In-Reply-To: <CAGhQ9VwZaM_iWTkQYVTuTiyb6gCG2y6s8WFVySCHt7YHE1qbcA@mail.gmail.com>

Quoting Joachim Eastwood (2015-08-13 13:43:11)
> On 11 August 2015 at 22:41, Michael Turquette <mturquette@baylibre.com> wrote:
> > Hi Joachim,
> >
> > Quoting Joachim Eastwood (2015-07-11 14:48:26)
> >> +static void __init lpc18xx_creg_clk_init(struct device_node *np)
> >> +{
> >> +       const char *clk_32khz_parent;
> >> +       struct regmap *syscon;
> >> +
> >> +       syscon = syscon_node_to_regmap(np->parent);
> >> +       if (IS_ERR(syscon)) {
> >> +               pr_err("%s: syscon lookup failed\n", __func__);
> >> +               return;
> >> +       }
> >> +
> >> +       clk_32khz_parent = of_clk_get_parent_name(np, 0);
> >> +
> >> +       clk_creg[CREG_CLK_32KHZ] =
> >> +               clk_register_creg_clk(&clk_creg_clocks[CREG_CLK_32KHZ],
> >> +                                     &clk_32khz_parent, syscon);
> >> +
> >> +       clk_creg[CREG_CLK_1KHZ] =
> >> +               clk_register_creg_clk(&clk_creg_clocks[CREG_CLK_1KHZ],
> >> +                                     &clk_creg_clocks[CREG_CLK_32KHZ].name,
> >> +                                     syscon);
> >> +
> >> +       of_clk_add_provider(np, of_clk_src_onecell_get, &clk_base_data);
> >> +}
> >> +CLK_OF_DECLARE(lpc18xx_creg_clk, "nxp,lpc1850-creg-clk", lpc18xx_creg_clk_init);
> >
> > I'll ask the same question that Stephen asked in your CCU/CGU driver
> > series: is it necessary to use CLK_OF_DECLARE here or can you use the
> > platform device model?
> 
> The 32 kHz clock from the CREG block is a clock parent to the CGU
> block so it's possible that it will required early. This is all
> depends on how the boot loader initially configures the CGU.
> 
> Currently in the DTS for lpc18xx cgu it has:
> clocks = <&xtal>, <&xtal32>, <...>;
> xtal32 is just a temporary placeholder until the CREG clock is in place.

Well that seems wrong. Is it just a matter of probe order where you try
to probe the cgu driver before the creg driver?

Regards,
Mike

> 
> 
> Note that while it's possible to use the 32k clock together with PLL0
> to generate the main CPU bus clock I doubt it will be common
> configuration. It is however fully possible to do.
> 
> 
> regards,
> Joachim Eastwood
> 
> _______________________________________________
> linux-arm-kernel mailing list
> linux-arm-kernel@lists.infradead.org
> http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

  reply	other threads:[~2015-08-18  0:26 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-07-11 21:48 [PATCH 0/2] CREG clk driver for NXP LPC18xx family Joachim Eastwood
     [not found] ` <1436651307-24098-1-git-send-email-manabian-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
2015-07-11 21:48   ` [PATCH 1/2] clk: add lpc18xx creg clk driver Joachim Eastwood
     [not found]     ` <1436651307-24098-2-git-send-email-manabian-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
2015-08-11 20:41       ` Michael Turquette
2015-08-13 20:43         ` Joachim Eastwood
2015-08-18  0:26           ` Michael Turquette [this message]
2016-02-13 14:38             ` Joachim Eastwood
2016-02-17  0:56               ` Michael Turquette
2016-02-17 18:24                 ` Joachim Eastwood
2016-02-17 20:28                   ` Michael Turquette
     [not found]                     ` <20160217202824.2278.25956-/Ffx6e7uQFNsG52AEeRyZ2GXanvQGlWp@public.gmane.org>
2016-02-17 21:52                       ` Joachim Eastwood
2016-02-19  2:36                         ` Stephen Boyd
2015-07-11 21:48   ` [PATCH 2/2] doc: dt: add documentation for lpc1850-creg-clk driver Joachim Eastwood
2016-02-08 22:26 ` [PATCH 0/2] CREG clk driver for NXP LPC18xx family Stephen Boyd
2016-02-09 10:19   ` Joachim Eastwood
2016-02-09 18:29     ` 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=20150818002604.31346.18322@quantum \
    --to=mturquette@baylibre.com \
    --cc=devicetree@vger.kernel.org \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-clk@vger.kernel.org \
    --cc=manabian@gmail.com \
    --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 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).