From: zonque@gmail.com (Daniel Mack)
To: linux-arm-kernel@lists.infradead.org
Subject: Question about fixed-clock
Date: Tue, 19 Feb 2013 10:53:18 +0100 [thread overview]
Message-ID: <51234B8E.2000504@gmail.com> (raw)
In-Reply-To: <CAOMZO5BXVX8=QOV4+tN_w27ztSVkHAnOG2ifbS_Jpd=-cPnAdw@mail.gmail.com>
Hi Fabio,
Hi Afzal,
On 19.02.2013 02:33, Fabio Estevam wrote:
> On Mon, Feb 18, 2013 at 8:55 PM, Daniel Mack <zonque@gmail.com> wrote:
>> Hi,
>>
>> This might be a stupid question, but I'm somehow stuck here. I'm using a
>> driver with the following DTS sub-node:
>>
>> ref25: ref25M {
>> compatible = "fixed-clock";
>> #clock-cells = <0>;
>> clock-frequency = <25000000>;
>> };
>>
>> clock-generator at 0 {
>> /* ... */
>> #clock-cells = <1>;
>> clocks = <&ref25>;
>> }
>>
>> The device driver for clock-generator uses something like the following
>> call to get its clock:
>>
>> clk = of_clk_get(np, 0);
>>
>> but the return value is ERR_PTR(-ENOENT) and I also can't find this
>> clock in the clk debugfs tree.
>>
>> This is on a OMAP/AM33xx device with kernel 3.8-rc7 plus the -next tips
>> of arm-soc and omap, but with no other special clock options selected in
>> the config. Is there anything I'm missing to correctly instantiate the
>> dummy clock?
>
> Have you registered it with clk_register_fixed_rate() ?
>
> In imx we use imx_clk_fixed, which in turns call clk_register_fixed_rate().
>
> Take a look at arch/arm/mach-imx/clk-imx51-imx53.c for a reference.
Hmm no, I didn't do anything else than adding it to the DT in the first
place, hoping that a driver will pick it up and add the clock for me.
But it turns out that of_clk_init() is not called at all on my platform.
I'm doing this now from omap_generic_init() and it works. If that's an
appropriate place to call it, I can provide a patch.
Thanks,
Daniel
WARNING: multiple messages have this Message-ID (diff)
From: Daniel Mack <zonque@gmail.com>
To: Fabio Estevam <festevam@gmail.com>
Cc: Mike Turquette <mturquette@linaro.org>,
Russell King <linux@arm.linux.org.uk>,
LKML <linux-kernel@vger.kernel.org>,
"linux-arm-kernel@lists.infradead.org"
<linux-arm-kernel@lists.infradead.org>,
Afzal Mohammed <x0148406@ti.com>
Subject: Re: Question about fixed-clock
Date: Tue, 19 Feb 2013 10:53:18 +0100 [thread overview]
Message-ID: <51234B8E.2000504@gmail.com> (raw)
In-Reply-To: <CAOMZO5BXVX8=QOV4+tN_w27ztSVkHAnOG2ifbS_Jpd=-cPnAdw@mail.gmail.com>
Hi Fabio,
Hi Afzal,
On 19.02.2013 02:33, Fabio Estevam wrote:
> On Mon, Feb 18, 2013 at 8:55 PM, Daniel Mack <zonque@gmail.com> wrote:
>> Hi,
>>
>> This might be a stupid question, but I'm somehow stuck here. I'm using a
>> driver with the following DTS sub-node:
>>
>> ref25: ref25M {
>> compatible = "fixed-clock";
>> #clock-cells = <0>;
>> clock-frequency = <25000000>;
>> };
>>
>> clock-generator@0 {
>> /* ... */
>> #clock-cells = <1>;
>> clocks = <&ref25>;
>> }
>>
>> The device driver for clock-generator uses something like the following
>> call to get its clock:
>>
>> clk = of_clk_get(np, 0);
>>
>> but the return value is ERR_PTR(-ENOENT) and I also can't find this
>> clock in the clk debugfs tree.
>>
>> This is on a OMAP/AM33xx device with kernel 3.8-rc7 plus the -next tips
>> of arm-soc and omap, but with no other special clock options selected in
>> the config. Is there anything I'm missing to correctly instantiate the
>> dummy clock?
>
> Have you registered it with clk_register_fixed_rate() ?
>
> In imx we use imx_clk_fixed, which in turns call clk_register_fixed_rate().
>
> Take a look at arch/arm/mach-imx/clk-imx51-imx53.c for a reference.
Hmm no, I didn't do anything else than adding it to the DT in the first
place, hoping that a driver will pick it up and add the clock for me.
But it turns out that of_clk_init() is not called at all on my platform.
I'm doing this now from omap_generic_init() and it works. If that's an
appropriate place to call it, I can provide a patch.
Thanks,
Daniel
next prev parent reply other threads:[~2013-02-19 9:53 UTC|newest]
Thread overview: 21+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-02-18 23:55 Question about fixed-clock Daniel Mack
2013-02-18 23:55 ` Daniel Mack
2013-02-19 0:07 ` Daniel Mack
2013-02-19 0:07 ` Daniel Mack
2013-02-19 1:33 ` Fabio Estevam
2013-02-19 1:33 ` Fabio Estevam
2013-02-19 9:53 ` Daniel Mack [this message]
2013-02-19 9:53 ` Daniel Mack
[not found] ` <20130219172246.11471.14635@quantum>
2013-02-19 17:32 ` Daniel Mack
2013-02-19 17:32 ` Daniel Mack
2013-03-02 14:09 ` Daniel Mack
2013-03-02 14:09 ` Daniel Mack
2013-03-07 18:42 ` Afzal Mohammed
2013-03-07 18:42 ` Afzal Mohammed
2013-03-07 22:31 ` Daniel Mack
2013-03-08 2:15 ` Mark Brown
2013-03-08 13:30 ` Daniel Mack
2013-03-09 8:26 ` Sebastian Hesselbarth
2013-03-12 18:40 ` Mark Brown
2013-02-19 3:39 ` Afzal Mohammed
2013-02-19 3:39 ` Afzal Mohammed
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=51234B8E.2000504@gmail.com \
--to=zonque@gmail.com \
--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.