lkml.org 
[lkml]   [2013]   [Aug]   [16]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
SubjectRe: [PATCH v1 03/14] clk: Add of_clk_match() for device drivers
From
Date

On Aug 16, 2013, at 11:43 AM, Kumar Gala wrote:

>
> On Aug 15, 2013, at 12:02 AM, Mike Turquette wrote:
>
>>> Right now we have
>>>
>>> pll8: pll8 {
>>> #clock-cells = <0>;
>>> compatible = "qcom,pll";
>>> clocks = <&pxo>;
>>> };
>>>
>>> in DT and
>>>
>>> static struct pll_desc pll8_desc = {
>>> .l_reg = 0x3144,
>>> .m_reg = 0x3148,
>>> .n_reg = 0x314c,
>>> .config_reg = 0x3154,
>>> .mode_reg = 0x3140,
>>> .status_reg = 0x3158,
>>> .status_bit = 16,
>>> };
>>>
>>> in C. Do you want everything to be in DT? Something like:
>>>
>>> pll8: pll8@3140 {
>>> #clock-cells = <0>;
>>> compatible = "qcom,pll";
>>> clocks = <&pxo>;
>>> reg = <0x3140 0x20>;
>>> };
>>>
>>> and then assume that all those registers are offset from the base
>>> register and that the status bit is 16 (it usually is but not
>>> always)?
>
> I think its reasonable to put the various regs associated with a clock in the .dts like the example you show, but we should be going down to bit level details. If we think of each clock as its own device its reasonable that the clock would have some set of registers associated with it.


oops, we should NOT be going down to bit level.

- k

--
Employee of Qualcomm Innovation Center, Inc.
Qualcomm Innovation Center, Inc. is a member of Code Aurora Forum, hosted by The Linux Foundation



\
 
 \ /
  Last update: 2013-08-16 19:41    [W:0.051 / U:1.188 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site