lkml.org 
[lkml]   [2013]   [Aug]   [26]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [RFC 17/17] clk: zynq: remove call to of_clk_init
On 08/26/13 14:07, Steffen Trumtrar wrote:
> On Mon, Aug 26, 2013 at 01:15:11PM +0200, Michal Simek wrote:
>> I agree with Soren - let's fix the current problem and then when Steffen has patches with syscon
>> we can look at them.
>>
>> If there is any discussion about early syscon registration please let me know.
>>
>
> Where I'm stuck at the moment is: if I map the whole register space to the
> parent node, how do I get its mapped address in the clkc?

Steffen,

if slcr is such an essential part of the SoC, you can choose to provide
zynq_slcr_readl/writel callbacks. You can then use those callback in the
clock driver without knowing the base address. Also, it allows you to
hide slcr specific locking details from subsequent drivers using the
callbacks.

> AFAIK the phandle is pretty useless in this early stage. In the pinmuxing
> case I should be able to find the registered driver for the lock via the
> phandle.

About the slcr phandle, yes, it is useless. IMHO phandles should only
be used if the referenced node is not known in advance, e.g. for gpios
or clocks. As you will always reference slcr node (and only that node)
you can just use of_find_compatible_node instead. But with the callbacks
above, you will solve it without exploiting DT but common non-static
functions instead.

Sebastian


\
 
 \ /
  Last update: 2013-08-26 15:01    [W:0.138 / U:0.952 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site