All of lore.kernel.org
 help / color / mirror / Atom feed
From: Tero Kristo <t-kristo@ti.com>
To: Paul Walmsley <paul@pwsan.com>
Cc: nm@ti.com, devicetree@vger.kernel.org, khilman@linaro.org,
	mturquette@linaro.org, Tony Lindgren <tony@atomide.com>,
	pdeschrijver@nvidia.com, rnayak@ti.com, bcousson@baylibre.com,
	swarren@nvidia.com, mark.rutland@arm.com,
	linux-omap@vger.kernel.org, linux-arm-kernel@lists.infradead.org
Subject: Re: [PATCHv7 00/36] ARM: OMAP: clock data conversion to DT
Date: Mon, 14 Oct 2013 21:34:34 +0300	[thread overview]
Message-ID: <525C393A.9020501@ti.com> (raw)
In-Reply-To: <alpine.DEB.2.02.1310141824380.22465@utopia.booyaka.com>

On 10/14/2013 09:27 PM, Paul Walmsley wrote:
> On Mon, 14 Oct 2013, Tero Kristo wrote:
>
>> On 10/14/2013 02:45 AM, Paul Walmsley wrote:
>>
>>> 8. A few random comments about the individual clock binding data formats
>>> themselves, based on a quick look:
>>>
>>> A. It seems pretty odd and unnecessarily obscure to do something like
>>> this:
>>>
>>> dpll_usb_ck: dpll_usb_ck@... {
>>>          ...
>>>          reg = <0x4a008180 0x4>, <0x4a008184 0x4>, <0x4a008188 0x4>,
>>> <0x4a00818c 0x4>;
>>>          ...
>>> };
>>>
>>> It's at least self-documenting to do something like this:
>>>
>>> dpll_usb_ck: dpll_usb_ck@... {
>>>          ...
>>>          control-reg = < ... >;
>>>          idlest-reg = < ... >;
>>>          .. etc. ..
>>> };
>>
>> Some earlier version had something along these lines, but it was turned down.
>> I had also reg-names as documentation purposes along, but this was unnecessary
>> and was dropped also.
>>
>>> Which itself might not even be needed, depending on how the DPLL control
>>> code is implemented.  For example, if the relative offsets are always the
>>> same for all OMAP4-family devices, maybe there's not even a need to
>>> explicitly encode that into the DT data.
>>
>> If I want to get rid of these, I need to add extra compatible strings for the
>> dpll types. There are several weird register offsets for omap3/am3 devices.
>> omap4/5/dra7/am4 behave more sanely.
>>
>>> B. Seems like you can remove the "ti," prefix on the properties, since
>>> they have no pretentions at genericity: they are specific to the
>>> PRCM/CM/PRM IP block data, and registered by those drivers.
>>
>> Can or should? It seems existing bindings use "ti," prefix even on non-generic
>> bindings, meaning if I look at any other data in DT.
>
> My comments in #8 are just regarding minor issues that don't seem
> right.  I don't have a significant objection to staying with the
> existing property names here if you think that they are important.

Ok thanks, I'll be reworking most of the other items and will hopefully 
have something ready soonish. Taking care of the register mappings is 
rather nasty thing to do.

-Tero

>>> C. Looks like the patches use the property "autoidle-low" to indicate that
>>> the autoidle bit should be inverted.  "Low" seems like the wrong
>>> expression here - it invokes the actual voltage logic level of a hardware
>>> signal, and we have no idea whether the hardware signal is using a low
>>> voltage or a high voltage to express this condition.  Would suggest
>>> something like 'invert-autoidle-bit' instead.
>>>
>>> D. Regarding "ti,index-starts-at-one", it seems best to explicitly state
>>> which index starts at one.  The code mentions a "mux index" so please
>>> consider renaming this something like "mux-index-starts-at-one" or
>>> "one-based-mux-index"
>>
>> The index is explicitly defined by the clock node where this is present. If it
>> is a mux-clock, then it is for mux-index. If for divider clock, it is index
>> for the divider.
>
>
>
> - Paul
>

WARNING: multiple messages have this Message-ID (diff)
From: t-kristo@ti.com (Tero Kristo)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCHv7 00/36] ARM: OMAP: clock data conversion to DT
Date: Mon, 14 Oct 2013 21:34:34 +0300	[thread overview]
Message-ID: <525C393A.9020501@ti.com> (raw)
In-Reply-To: <alpine.DEB.2.02.1310141824380.22465@utopia.booyaka.com>

On 10/14/2013 09:27 PM, Paul Walmsley wrote:
> On Mon, 14 Oct 2013, Tero Kristo wrote:
>
>> On 10/14/2013 02:45 AM, Paul Walmsley wrote:
>>
>>> 8. A few random comments about the individual clock binding data formats
>>> themselves, based on a quick look:
>>>
>>> A. It seems pretty odd and unnecessarily obscure to do something like
>>> this:
>>>
>>> dpll_usb_ck: dpll_usb_ck at ... {
>>>          ...
>>>          reg = <0x4a008180 0x4>, <0x4a008184 0x4>, <0x4a008188 0x4>,
>>> <0x4a00818c 0x4>;
>>>          ...
>>> };
>>>
>>> It's at least self-documenting to do something like this:
>>>
>>> dpll_usb_ck: dpll_usb_ck at ... {
>>>          ...
>>>          control-reg = < ... >;
>>>          idlest-reg = < ... >;
>>>          .. etc. ..
>>> };
>>
>> Some earlier version had something along these lines, but it was turned down.
>> I had also reg-names as documentation purposes along, but this was unnecessary
>> and was dropped also.
>>
>>> Which itself might not even be needed, depending on how the DPLL control
>>> code is implemented.  For example, if the relative offsets are always the
>>> same for all OMAP4-family devices, maybe there's not even a need to
>>> explicitly encode that into the DT data.
>>
>> If I want to get rid of these, I need to add extra compatible strings for the
>> dpll types. There are several weird register offsets for omap3/am3 devices.
>> omap4/5/dra7/am4 behave more sanely.
>>
>>> B. Seems like you can remove the "ti," prefix on the properties, since
>>> they have no pretentions at genericity: they are specific to the
>>> PRCM/CM/PRM IP block data, and registered by those drivers.
>>
>> Can or should? It seems existing bindings use "ti," prefix even on non-generic
>> bindings, meaning if I look at any other data in DT.
>
> My comments in #8 are just regarding minor issues that don't seem
> right.  I don't have a significant objection to staying with the
> existing property names here if you think that they are important.

Ok thanks, I'll be reworking most of the other items and will hopefully 
have something ready soonish. Taking care of the register mappings is 
rather nasty thing to do.

-Tero

>>> C. Looks like the patches use the property "autoidle-low" to indicate that
>>> the autoidle bit should be inverted.  "Low" seems like the wrong
>>> expression here - it invokes the actual voltage logic level of a hardware
>>> signal, and we have no idea whether the hardware signal is using a low
>>> voltage or a high voltage to express this condition.  Would suggest
>>> something like 'invert-autoidle-bit' instead.
>>>
>>> D. Regarding "ti,index-starts-at-one", it seems best to explicitly state
>>> which index starts at one.  The code mentions a "mux index" so please
>>> consider renaming this something like "mux-index-starts-at-one" or
>>> "one-based-mux-index"
>>
>> The index is explicitly defined by the clock node where this is present. If it
>> is a mux-clock, then it is for mux-index. If for divider clock, it is index
>> for the divider.
>
>
>
> - Paul
>

  reply	other threads:[~2013-10-14 18:34 UTC|newest]

Thread overview: 136+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-09-25  8:48 [PATCHv7 00/36] ARM: OMAP: clock data conversion to DT Tero Kristo
2013-09-25  8:48 ` Tero Kristo
2013-09-25  8:48 ` [PATCHv7 01/36] CLK: TI: Add DPLL clock support Tero Kristo
2013-09-25  8:48   ` Tero Kristo
2013-09-25  8:48 ` [PATCHv7 04/36] CLK: ti: add support for ti divider-clock Tero Kristo
2013-09-25  8:48   ` Tero Kristo
2013-09-25  8:48 ` [PATCHv7 07/36] CLK: TI: add support for clockdomain binding Tero Kristo
2013-09-25  8:48   ` Tero Kristo
2013-09-25  8:48 ` [PATCHv7 08/36] ARM: dts: omap4 clock data Tero Kristo
2013-09-25  8:48   ` Tero Kristo
2013-09-25  8:48 ` [PATCHv7 10/36] clk: ti: add support for basic mux clock Tero Kristo
2013-09-25  8:48   ` Tero Kristo
2013-09-25  8:48 ` [PATCHv7 11/36] CLK: TI: add omap4 clock init file Tero Kristo
2013-09-25  8:48   ` Tero Kristo
2013-09-25  8:48 ` [PATCHv7 12/36] ARM: OMAP4: remove old clock data and link in new clock init code Tero Kristo
2013-09-25  8:48   ` Tero Kristo
2013-09-25  8:48 ` [PATCHv7 13/36] ARM: dts: omap5 clock data Tero Kristo
2013-09-25  8:48   ` Tero Kristo
2013-09-25  8:48 ` [PATCHv7 15/36] CLK: TI: omap5: Initialize USB_DPLL at boot Tero Kristo
2013-09-25  8:48   ` Tero Kristo
2013-09-25  8:48 ` [PATCHv7 18/36] ARM: dts: DRA7: Change apll_pcie_m2_ck to fixed factor clock Tero Kristo
2013-09-25  8:48   ` Tero Kristo
2013-09-25  8:48 ` [PATCHv7 19/36] ARM: dts: DRA7: Add PCIe related clock nodes Tero Kristo
2013-09-25  8:48   ` Tero Kristo
2013-09-25  8:48 ` [PATCHv7 23/36] ARM: dts: DRA7: link in clock DT data Tero Kristo
2013-09-25  8:48   ` Tero Kristo
2013-09-25  8:48 ` [PATCHv7 24/36] ARM: dts: am33xx clock data Tero Kristo
2013-09-25  8:48   ` Tero Kristo
2013-09-25  8:48 ` [PATCHv7 32/36] ARM: dts: AM35xx: use DT " Tero Kristo
2013-09-25  8:48   ` Tero Kristo
2013-09-25  8:48 ` [PATCHv7 33/36] ARM: OMAP3: use DT clock init if DT data is available Tero Kristo
2013-09-25  8:48   ` Tero Kristo
2013-09-25  8:48 ` [PATCHv7 35/36] ARM: dts: AM43xx: link in clock DT data Tero Kristo
2013-09-25  8:48   ` Tero Kristo
     [not found] ` <1380098922-30340-1-git-send-email-t-kristo-l0cyMroinI0@public.gmane.org>
2013-09-25  8:48   ` [PATCHv7 02/36] CLK: TI: add DT alias clock registration mechanism Tero Kristo
2013-09-25  8:48     ` Tero Kristo
2013-09-25  8:48   ` [PATCHv7 03/36] CLK: TI: add autoidle support Tero Kristo
2013-09-25  8:48     ` Tero Kristo
2013-09-25  8:48   ` [PATCHv7 05/36] clk: ti: add support for TI fixed factor clock Tero Kristo
2013-09-25  8:48     ` Tero Kristo
2013-09-25  8:48   ` [PATCHv7 06/36] CLK: TI: add support for OMAP gate clock Tero Kristo
2013-09-25  8:48     ` Tero Kristo
2013-09-25  8:48   ` [PATCHv7 09/36] clk: ti: add mux-gate clock support Tero Kristo
2013-09-25  8:48     ` Tero Kristo
2013-09-25  8:48   ` [PATCHv7 14/36] CLK: TI: add omap5 clock init file Tero Kristo
2013-09-25  8:48     ` Tero Kristo
2013-09-25  8:48   ` [PATCHv7 16/36] ARM: dts: dra7 clock data Tero Kristo
2013-09-25  8:48     ` Tero Kristo
2013-09-25  8:48   ` [PATCHv7 17/36] ARM: dts: clk: Add apll related clocks Tero Kristo
2013-09-25  8:48     ` Tero Kristo
2013-09-25  8:48   ` [PATCHv7 20/36] CLK: TI: DRA7: Add APLL support Tero Kristo
2013-09-25  8:48     ` Tero Kristo
2013-10-08  5:16     ` Mike Turquette
2013-10-08  5:16       ` Mike Turquette
2013-09-25  8:48   ` [PATCHv7 21/36] CLK: TI: add dra7 clock init file Tero Kristo
2013-09-25  8:48     ` Tero Kristo
2013-09-25  8:48   ` [PATCHv7 22/36] ARM: OMAP: DRA7: Enable clock init Tero Kristo
2013-09-25  8:48     ` Tero Kristo
2013-09-25  8:48   ` [PATCHv7 25/36] CLK: TI: add am33xx clock init file Tero Kristo
2013-09-25  8:48     ` Tero Kristo
2013-09-25  8:48   ` [PATCHv7 26/36] ARM: AM33xx: remove old clock data and link in new clock init code Tero Kristo
2013-09-25  8:48     ` Tero Kristo
2013-09-25  8:48   ` [PATCHv7 27/36] CLK: TI: add interface clock support for OMAP3 Tero Kristo
2013-09-25  8:48     ` Tero Kristo
2013-09-25  8:48   ` [PATCHv7 28/36] ARM: OMAP: hwmod: fix an incorrect clk type cast with _get_clkdm Tero Kristo
2013-09-25  8:48     ` Tero Kristo
2013-09-25  8:48   ` [PATCHv7 29/36] ARM: OMAP3: hwmod: initialize clkdm from clkdm_name Tero Kristo
2013-09-25  8:48     ` Tero Kristo
2013-09-25  8:48   ` [PATCHv7 30/36] ARM: dts: omap3 clock data Tero Kristo
2013-09-25  8:48     ` Tero Kristo
2013-09-26 16:06     ` Nishanth Menon
2013-09-26 16:06       ` Nishanth Menon
2013-09-26 16:23       ` Nishanth Menon
2013-09-26 16:23         ` Nishanth Menon
2013-09-25  8:48   ` [PATCHv7 31/36] CLK: TI: add omap3 clock init file Tero Kristo
2013-09-25  8:48     ` Tero Kristo
2013-09-25  8:48   ` [PATCHv7 34/36] ARM: dts: am43xx clock data Tero Kristo
2013-09-25  8:48     ` Tero Kristo
2013-09-25  8:48   ` [PATCHv7 36/36] CLK: TI: add am43xx clock init file Tero Kristo
2013-09-25  8:48     ` Tero Kristo
2013-09-26 15:21   ` [PATCHv7 00/36] ARM: OMAP: clock data conversion to DT Nishanth Menon
2013-09-26 15:21     ` Nishanth Menon
2013-09-26 15:29     ` Nishanth Menon
2013-09-26 15:29       ` Nishanth Menon
2013-10-04 15:34   ` Tero Kristo
2013-10-04 15:34     ` Tero Kristo
2013-10-07  2:15     ` Tony Lindgren
2013-10-07  2:15       ` Tony Lindgren
2013-10-07  6:35       ` Tero Kristo
2013-10-07  6:35         ` Tero Kristo
2013-10-07 15:41         ` Tony Lindgren
2013-10-07 15:41           ` Tony Lindgren
2013-10-07 16:13           ` Nishanth Menon
2013-10-07 16:13             ` Nishanth Menon
2013-10-07 19:03           ` Tony Lindgren
2013-10-07 19:03             ` Tony Lindgren
     [not found]             ` <20131007190322.GY8949-4v6yS6AI5VpBDgjK7y7TUQ@public.gmane.org>
2013-10-09 18:55               ` Paul Walmsley
2013-10-09 18:55                 ` Paul Walmsley
2013-10-09 18:59                 ` Paul Walmsley
2013-10-09 18:59                   ` Paul Walmsley
2013-10-09 19:24                   ` Tony Lindgren
2013-10-09 19:24                     ` Tony Lindgren
2013-10-10  7:18                   ` Tero Kristo
2013-10-10  7:18                     ` Tero Kristo
2013-10-11 17:54                     ` Paul Walmsley
2013-10-11 17:54                       ` Paul Walmsley
2013-10-11 18:23                       ` Tero Kristo
2013-10-11 18:23                         ` Tero Kristo
2013-10-11 22:26                         ` Paul Walmsley
2013-10-11 22:26                           ` Paul Walmsley
2013-10-11 18:46                       ` Tero Kristo
2013-10-11 18:46                         ` Tero Kristo
2013-10-11 22:37                         ` Paul Walmsley
2013-10-11 22:37                           ` Paul Walmsley
2013-10-12 10:25                           ` Tero Kristo
2013-10-12 10:25                             ` Tero Kristo
2013-10-13 23:45                             ` Paul Walmsley
2013-10-13 23:45                               ` Paul Walmsley
2013-10-14 14:57                               ` Tero Kristo
2013-10-14 14:57                                 ` Tero Kristo
2013-10-14 18:27                                 ` Paul Walmsley
2013-10-14 18:27                                   ` Paul Walmsley
2013-10-14 18:34                                   ` Tero Kristo [this message]
2013-10-14 18:34                                     ` Tero Kristo
2013-10-09 19:22                 ` Tony Lindgren
2013-10-09 19:22                   ` Tony Lindgren
2013-10-10  8:17                 ` Tero Kristo
2013-10-10  8:17                   ` Tero Kristo
2013-10-11 22:53                   ` Tony Lindgren
2013-10-11 22:53                     ` Tony Lindgren
2013-10-08  5:40 ` Mike Turquette
2013-10-08  5:40   ` Mike Turquette
2013-10-08  8:17   ` Tero Kristo
2013-10-08  8:17     ` Tero Kristo
2013-10-08 16:47     ` Tony Lindgren
2013-10-08 16:47       ` Tony Lindgren

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=525C393A.9020501@ti.com \
    --to=t-kristo@ti.com \
    --cc=bcousson@baylibre.com \
    --cc=devicetree@vger.kernel.org \
    --cc=khilman@linaro.org \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-omap@vger.kernel.org \
    --cc=mark.rutland@arm.com \
    --cc=mturquette@linaro.org \
    --cc=nm@ti.com \
    --cc=paul@pwsan.com \
    --cc=pdeschrijver@nvidia.com \
    --cc=rnayak@ti.com \
    --cc=swarren@nvidia.com \
    --cc=tony@atomide.com \
    /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.