linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Purna Chandra Mandal <purna.mandal@microchip.com>
To: Michael Turquette <mturquette@baylibre.com>,
	Joshua Henderson <joshua.henderson@microchip.com>,
	<linux-kernel@vger.kernel.org>
Cc: <linux-mips@linux-mips.org>, <ralf@linux-mips.org>,
	Stephen Boyd <sboyd@codeaurora.org>, <linux-clk@vger.kernel.org>
Subject: Re: [PATCH v7 2/3] clk: clk-pic32: Add PIC32 clock driver
Date: Sat, 20 Feb 2016 12:33:31 +0530	[thread overview]
Message-ID: <56C80FC3.8050205@microchip.com> (raw)
In-Reply-To: <20160219201615.2278.2909@quark.deferred.io>

On 02/20/2016 01:46 AM, Michael Turquette wrote:

> Quoting Joshua Henderson (2016-02-19 08:25:35)
>> +const struct clk_ops pic32_roclk_ops = {
>> +       .enable                 = roclk_enable,
>> +       .disable                = roclk_disable,
>> +       .is_enabled             = roclk_is_enabled,
>> +       .get_parent             = roclk_get_parent,
>> +       .set_parent             = roclk_set_parent,
>> +       .determine_rate         = roclk_determine_rate,
>> +       .recalc_rate            = roclk_recalc_rate,
>> +       .round_rate             = roclk_round_rate,
>> +       .set_rate_and_parent    = roclk_set_rate_and_parent,
>> +       .set_rate               = roclk_set_rate,
>> +       .init                   = roclk_init,
>> +};
> You can remove .round_rate and only use .determine_rate.

Ack. Will remove .round_rate.

> ...
>> +CLK_OF_DECLARE(pic32mzda_clk, "microchip,pic32mzda-clk", pic32mzda_clock_init);
> Can you make this a platform_driver instead of using CLK_OF_DECLARE? I
> asked this in v6 but there was no response.

Mike,
I tried to use platform_driver approach, but didn't work for me.
On MIPS/PIC32 first call of clk_get() happens from "start_kernel -> time_init()->
plat_time_init()" which is very early in boot sequence even before execution of
early_initcall(). In short, by platform_driver way I'was not able to register clock(s)
before the first clock user becomes ready. Whereas with CLK_OF_DECLARE() I can
explicitly call of_clk_init() in plat_time_init() just before calling clk_get().

Please suggest me if you have any reference to avoid my case.

> Regards,
> Mike
>
>> -- 
>> 1.7.9.5
>>

  reply	other threads:[~2016-02-20  7:05 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-02-19 16:25 [PATCH v7 0/3] PIC32MZDA Clock Driver Joshua Henderson
2016-02-19 16:25 ` [PATCH v7 1/3] dt/bindings: Add PIC32 clock binding documentation Joshua Henderson
2016-02-23 20:47   ` Rob Herring
2016-02-19 16:25 ` [PATCH v7 2/3] clk: clk-pic32: Add PIC32 clock driver Joshua Henderson
2016-02-19 20:16   ` Michael Turquette
2016-02-20  7:03     ` Purna Chandra Mandal [this message]
2016-02-19 16:25 ` [PATCH v7 3/3] MIPS: dts: pic32: Update dts to reflect new PIC32MZDA clk binding Joshua Henderson

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=56C80FC3.8050205@microchip.com \
    --to=purna.mandal@microchip.com \
    --cc=joshua.henderson@microchip.com \
    --cc=linux-clk@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-mips@linux-mips.org \
    --cc=mturquette@baylibre.com \
    --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 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).