From: dsd@laptop.org (Daniel Drake)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH v6 09/11] clk: mmp: parse clock from dts
Date: Wed, 14 Aug 2013 15:25:32 -0600 [thread overview]
Message-ID: <CAMLZHHSO9UrBRhTrYHsTHte66AB-pdDfc3vPNVmxeZx9biCBkA@mail.gmail.com> (raw)
In-Reply-To: <CAN1soZxwgNf_URTs8dg152jWuspuHRiLZGad7GPdJ46QGXqu1A@mail.gmail.com>
On Sat, Aug 10, 2013 at 11:22 PM, Haojian Zhuang
<haojian.zhuang@gmail.com> wrote:
>> I see that your implementation here moves away from using the existing
>> code in clk-apmu.c and instead just uses clk-divider directly. That
>> might make sense, but your new DTS does not reimplement many of the
>> static APMU clocks that were previously implemented (e.g. ccic, sdh in
>> clk-mmp2.c). Why is this?
>>
> I'll append them later.
Looking closer I see that you only implemented this for pxa910 - and
(as noted above) you only reimplemented a subset of the clocks.
The original static clock code is still in place and being called
(pxa910_init calls pxa910_clk_init). This will result in some of the
clocks being duplicated (defined once in DT and again in static code).
I think you should either add a mechanism to avoid doing both (e.g.
see the end of http://lists.infradead.org/pipermail/linux-arm-kernel/2013-June/177153.html)
or simply remove support for non-DT clocks (depending on user base,
not sure if this is possible).
I think adding support for all the clocks in DT now is quite important
as I suspect it will change your DT design. Your patch treats APMU
clocks always as simple dividers or muxes, always enabled, however I
don't think it is possible to represent the SDH/display APMU clocks in
this way, at least I have not found a way to do it. These clocks are
in reset by default and certain bits must be written to enable them.
Finally there is something confusing in mmp_apbc_setup()
+ if (of_property_read_string(np, "clock-names", &clk_name))
+ clkdev = 1;
+ else {
+ of_property_read_string(np, "clock-output-names", &clk_name);
+ clkdev = 0;
+ }
+ if (clkdev)
+ clk_register_clkdev(clk, clk_name, NULL);
Can you explain what this logic is trying to do?
I think it is wrong. If I provide the name for the clock I want to
output from my provider, I do not get registered? And in order for me
to get my clock provider registered, I have to provide a clock-names
property which is then used to name the device?? But clock-names is
usually used for the input clock name. And I don't see why providing a
name is necessary, it could just use node->name.
Thanks
Daniel
next prev parent reply other threads:[~2013-08-14 21:25 UTC|newest]
Thread overview: 32+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-07-26 10:05 No subject Haojian Zhuang
2013-07-26 10:05 ` [PATCH v6 01/11] irqchip: move mmp irq driver Haojian Zhuang
2013-08-14 21:26 ` Daniel Drake
2013-08-21 20:27 ` Daniel Drake
2013-08-22 1:28 ` Haojian Zhuang
2013-07-26 10:05 ` [PATCH v6 02/11] irqchip: mmp: support irqchip Haojian Zhuang
2013-08-12 22:53 ` Daniel Drake
2013-08-13 22:53 ` Daniel Drake
2013-08-14 17:47 ` Daniel Drake
2013-07-26 10:05 ` [PATCH v6 03/11] irqchip: mmp: support MULTI_IRQ_HANDLER Haojian Zhuang
2013-07-26 10:05 ` [PATCH v6 04/11] ARM: mmp: avoid to include head file in mach-mmp Haojian Zhuang
2013-08-14 18:56 ` Daniel Drake
2013-08-24 9:45 ` Haojian Zhuang
2013-07-26 10:05 ` [PATCH v6 05/11] irqchip: mmp: avoid to include irqs head file Haojian Zhuang
2013-07-26 16:10 ` Arnd Bergmann
2013-07-26 10:05 ` [PATCH v6 06/11] clocksource: mmp: move mmp timer driver Haojian Zhuang
2013-08-14 19:22 ` Daniel Drake
2013-07-26 10:05 ` [PATCH v6 07/11] ARM: mmp: move timer registers into driver Haojian Zhuang
2013-08-14 19:37 ` Daniel Drake
2013-07-26 10:05 ` [PATCH v6 08/11] ARM: pxa: init dma debugfs in late level Haojian Zhuang
2013-08-10 17:29 ` Daniel Mack
2013-08-11 4:53 ` Haojian Zhuang
2013-07-26 10:05 ` [PATCH v6 09/11] clk: mmp: parse clock from dts Haojian Zhuang
2013-08-09 16:04 ` Mark Rutland
2013-08-10 11:06 ` Tomasz Figa
2013-08-10 12:31 ` Mark Rutland
2013-08-10 12:34 ` Tomasz Figa
2013-08-10 14:57 ` Daniel Drake
2013-08-11 5:22 ` Haojian Zhuang
2013-08-14 21:25 ` Daniel Drake [this message]
2013-07-26 10:05 ` [PATCH v6 10/11] ARM: dts: support common clock in arch mmp Haojian Zhuang
2013-07-26 10:05 ` [PATCH v6 11/11] ARM: mmp: avoid to use cpu_is_xxx in timer Haojian Zhuang
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=CAMLZHHSO9UrBRhTrYHsTHte66AB-pdDfc3vPNVmxeZx9biCBkA@mail.gmail.com \
--to=dsd@laptop.org \
--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 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).