From: Rob Herring <robherring2-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
To: Stephen Warren <swarren-DDmLM1+adcrQT0dZR+AlfA@public.gmane.org>
Cc: Olof Johansson <olof-nZhT3qVonbNeoWH0uzbU5w@public.gmane.org>,
"linux-tegra-u79uwXL29TY76Z2rM5mHXA@public.gmane.org"
<linux-tegra-u79uwXL29TY76Z2rM5mHXA@public.gmane.org>,
"devicetree-discuss-uLR06cmDAlY/bJ5BZ2RsiQ@public.gmane.org"
<devicetree-discuss-uLR06cmDAlY/bJ5BZ2RsiQ@public.gmane.org>,
"linux-arm-kernel-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r@public.gmane.org"
<linux-arm-kernel-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r@public.gmane.org>
Subject: Re: [RFC] [PATCH] ARM: tegra: emc: device tree bindings
Date: Tue, 18 Oct 2011 21:37:53 -0500 [thread overview]
Message-ID: <4E9E3801.6080707@gmail.com> (raw)
In-Reply-To: <74CDBE0F657A3D45AFBB94109FB122FF173CA2CCA9-C7FfzLzN0UxDw2glCA4ptUEOCMrvLtNR@public.gmane.org>
On 10/18/2011 04:01 PM, Stephen Warren wrote:
> Olof Johansson wrote at Tuesday, October 18, 2011 2:54 PM:
>> On Tue, Oct 18, 2011 at 11:54 AM, Stephen Warren <swarren-DDmLM1+adcrQT0dZR+AlfA@public.gmane.org> wrote:
>>> Olof Johansson wrote at Tuesday, October 18, 2011 12:43 PM:
> ...
>>>> Compatible is still needed, in my opinion -- otherwise there will be
>>>> no way to tell if the node is there to describe emc timings or if it's
>>>> some new node used to describe something else (such as SDRAM chips as
>>>> mentioned above).
>>>
>>> Can't you go by node name; enumerate all nodes with a particular name.
>>> Or define another intermediate node that will always contain tables and
>>> nothing else, then just enumerate all child nodes of that node:
>>>
>>> emc@xxxxx {
>>> emc-tables {
>>> table-333@0 {};
>>> table-666@0 {};
>>> };
>>> };
>>>
>>> The Tegra pinmux bindings I proposed certainly used this technique; a
>>> main node with a well-known name, followed by enumeration of all child
>>> nodes of that, and nobody /said/ anything about that being a bad idea.
>>
>> I'm not really picky on this, but I think I would rather use a
>> compatible field than rely on naming.
>>
>> That being said, doing a two-level approach will probably make it
>> easier than the flat structure I initially had. So:
>>
>> emc@xxx {
>> nvidia,use-ram-code;
>> emc-table-ram-code-0 {
>> nvidia,ram-code = < 0 >;
>> table-166 { compatible = "tegra20-emc-table"; ... };
>> table-333 { ... };
>> };
>>
>> emc-table-ram-code-1 {
>> nvidia,ram-code = < 1 >;
>> ...
>> };
>> };
>>
>> ... and for none-ram-code, just leave out the emc-table-ramcode-x level.
>>
>> So, for nvidia,use-ram-code case, it'll be one intermediate step of
>> finding the right subnode, the rest of the table setup code will be
>> common. None of it will be bound to actual node names though -- first
>> step is iterating child nodes looking for nvidia,ram-code properties
>> to match, and second step iterates by matching compatible fields.
>
> I only suggested the well-known-named sub-nodes in order to eliminate
> the need for a compatible property.
>
> My inclination is that if we use compatible to distinguish the tables
> from anything else, there's little point having the extra level of nodes;
> we may as well lay it out as in your original patch, just with an explicit
> nvidia,ram-code property in each table (or omitted/ignored when not using
> it) instead of reg?
Node names should be generic like serial or ethernet. Compatible is used
to specify the specific model.
Rob
next prev parent reply other threads:[~2011-10-19 2:37 UTC|newest]
Thread overview: 18+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-10-17 17:52 [RFC] [PATCH] ARM: tegra: emc: device tree bindings Olof Johansson
[not found] ` <1318873976-25335-1-git-send-email-olof-nZhT3qVonbNeoWH0uzbU5w@public.gmane.org>
2011-10-17 18:16 ` Anton Staaf
2011-10-18 18:30 ` Stephen Warren
[not found] ` <74CDBE0F657A3D45AFBB94109FB122FF173CA2CBFB-C7FfzLzN0UxDw2glCA4ptUEOCMrvLtNR@public.gmane.org>
2011-10-18 18:42 ` Olof Johansson
[not found] ` <CAOesGMh387Oghyd_TobnTOja6tU2uU5kt-86_HwQe7nFiL+svw-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2011-10-18 18:54 ` Stephen Warren
[not found] ` <74CDBE0F657A3D45AFBB94109FB122FF173CA2CC18-C7FfzLzN0UxDw2glCA4ptUEOCMrvLtNR@public.gmane.org>
2011-10-18 20:53 ` Olof Johansson
[not found] ` <CAOesGMghu6Bn3RrFKEUBKkUNS_K8Y0ho3Y2uFZh_LXbfT80hFw-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2011-10-18 21:01 ` Stephen Warren
[not found] ` <74CDBE0F657A3D45AFBB94109FB122FF173CA2CCA9-C7FfzLzN0UxDw2glCA4ptUEOCMrvLtNR@public.gmane.org>
2011-10-19 2:37 ` Rob Herring [this message]
[not found] ` <4E9E3801.6080707-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
2011-10-19 3:28 ` Olof Johansson
[not found] ` <CAOesGMj8TREZ94RFhE3Qy=eaytOuB0YKBWw6--HAERoMB9m7Qg-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2011-10-19 14:31 ` Segher Boessenkool
2011-10-19 14:36 ` Rob Herring
[not found] ` <4E9EE07A.20301-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
2011-10-19 15:06 ` Olof Johansson
[not found] ` <CAOesGMhfAxrG4pMQ86XFzmBnHwBgrD=45eTvmA0-G2gTjaSL6Q-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2011-10-19 15:11 ` Stephen Warren
[not found] ` <74CDBE0F657A3D45AFBB94109FB122FF173D51BDEB-C7FfzLzN0UxDw2glCA4ptUEOCMrvLtNR@public.gmane.org>
2011-10-19 15:19 ` Olof Johansson
2011-10-19 20:13 ` Segher Boessenkool
[not found] ` <E8310825-036A-4541-9D8F-6DCED9CA88AA-XVmvHMARGAS8U2dJNN8I7kB+6BGkLq7r@public.gmane.org>
2011-10-19 20:17 ` Stephen Warren
2011-10-19 20:17 ` Olof Johansson
2011-10-19 3:28 ` Olof Johansson
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=4E9E3801.6080707@gmail.com \
--to=robherring2-re5jqeeqqe8avxtiumwx3w@public.gmane.org \
--cc=devicetree-discuss-uLR06cmDAlY/bJ5BZ2RsiQ@public.gmane.org \
--cc=linux-arm-kernel-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r@public.gmane.org \
--cc=linux-tegra-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
--cc=olof-nZhT3qVonbNeoWH0uzbU5w@public.gmane.org \
--cc=swarren-DDmLM1+adcrQT0dZR+AlfA@public.gmane.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