Thread (101 messages) 101 messages, 6 authors, 2013-11-06

Re: [PATCHv9 05/43] CLK: TI: add DT alias clock registration mechanism

From: Matt Sealey <hidden>
Date: 2013-11-04 22:45:57
Also in: linux-arm-kernel, linux-omap

On Sat, Nov 2, 2013 at 8:49 AM, Tomasz Figa [off-list ref] wrote:
Hi Matt,
quoted
I have one question here, what makes this part of the patch
TI-specific at all except the definition of the structure ti_dt_clk?
Mapping DT clocks to generic clkdev legacy namings seems like it would
be a necessary evil across *all* SoC platforms.
SoC platforms that are fully converted to Device Tree do not need any
legacy clkdev namings, because they have all clkdev look-ups performed
using data from DT (see generic clock bindings).

So this would be not "*all* SoC platforms", but instead "SoC platforms,
which are currently undergoing conversion to DT or conversion of which is
yet to be started".
That is well understood here, I have a long-running hobby project to
do this for i.MX5 and i.MX6 - I have a tree from months ago where I
restructured the way clocks are probed for both these (moving from
mach-imx to drivers/clk and putting in the right places) and
successfully moved 8 clocks (on i.MX51, 3 core PLLs, some fixed clocks
which got done in the meantime upstream, and one in the CCM - the CPU
freq divider) with the correct references and it all operated really
well.

In the meantime I had to add a bunch of weird hacks to the drivers to
deal with the missing connection names, so this being generic would
allow the core clock work to be finished while the drivers are brought
up to the new convention.
Still this might be a good enough justification for having a generic
solution for this problem, but I would wait with this until the real need
on some of such platforms shows up. I don't see anything wrong in
implementing this first as TI-specific quirk and then possibly making it
generic if such need shows up.
Indeed.. and I would like to make use of it but I'm not coding on a TI
platform or a Samsung platform:)
By the way, we already have something like this in clk/samsung/clk.c .
This is called aliases there and allows registering clkdev look-ups for
particular clocks. However this is specific to our clock drivers that
register all clocks inside a single clock privder, based on static ID
assignment and all clocks statically listed in clock driver - see
clk/samsung/clk-s3c64xx.c for an example.
Right. I'll keep it in mind as I do this.

Thanks, this does make my life a lot easier, means I might have it
working and submitted before the end of the month instead of sometime
next year, I was dreading reworking all these drivers up front ;)

Matt Sealey [off-list ref]
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help