Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1338650

Re: [PATCH v7 2/3] clk: clk-pic32: Add PIC32 clock driver

From Purna Chandra Mandal <purna.mandal@microchip.com>
Newsgroups linux.kernel
Subject Re: [PATCH v7 2/3] clk: clk-pic32: Add PIC32 clock driver
Date 2016-02-20 08:10 +0100
Message-ID <r49PY-1my-7@gated-at.bofh.it> (permalink)
References <r3W6m-7OW-11@gated-at.bofh.it> <r3W6n-7OW-53@gated-at.bofh.it> <r3ZGV-2hA-7@gated-at.bofh.it>
Organization linux.* mail to news gateway

Show all headers | View raw


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
>>

Back to linux.kernel | Previous | NextPrevious in thread | Find similar | Unroll thread


Thread

[PATCH v7 0/3] PIC32MZDA Clock Driver Joshua Henderson <joshua.henderson@microchip.com> - 2016-02-19 17:30 +0100
  [PATCH v7 1/3] dt/bindings: Add PIC32 clock binding documentation Joshua Henderson <joshua.henderson@microchip.com> - 2016-02-19 17:30 +0100
  [PATCH v7 2/3] clk: clk-pic32: Add PIC32 clock driver Joshua Henderson <joshua.henderson@microchip.com> - 2016-02-19 17:30 +0100
    Re: [PATCH v7 2/3] clk: clk-pic32: Add PIC32 clock driver Michael Turquette <mturquette@baylibre.com> - 2016-02-19 21:20 +0100
      Re: [PATCH v7 2/3] clk: clk-pic32: Add PIC32 clock driver Purna Chandra Mandal <purna.mandal@microchip.com> - 2016-02-20 08:10 +0100

csiph-web