From: Arnd Bergmann <arnd-r2nGTMty4D4@public.gmane.org>
To: linux-arm-kernel-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r@public.gmane.org
Cc: Sanchayan Maity
<maitysanchayan-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>,
shawnguo-DgEjT+Ai2ygdnm+yROfE0A@public.gmane.org,
devicetree-u79uwXL29TY76Z2rM5mHXA@public.gmane.org,
linux-kernel-u79uwXL29TY76Z2rM5mHXA@public.gmane.org,
stefan-XLVq0VzYD2Y@public.gmane.org,
robh+dt-DgEjT+Ai2ygdnm+yROfE0A@public.gmane.org,
lee.jones-QSEj5FYQhm4dnm+yROfE0A@public.gmane.org
Subject: Re: [PATCH v2 2/5] ARM: dts: vfxxx: Add device tree node for OCOTP
Date: Mon, 02 May 2016 09:31:12 +0200 [thread overview]
Message-ID: <4759698.elnRBldlxl@wuerfel> (raw)
In-Reply-To: <b5c1ff5a805eae3e53f07f8d0161f0af51586c00.1462171990.git.maitysanchayan-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
[-- Attachment #1: Type: text/plain, Size: 933 bytes --]
On Monday 02 May 2016 12:35:01 Sanchayan Maity wrote:
> + ocotp@400a5000 {
> + compatible = "fsl,vf610-ocotp";
> + #address-cells = <1>;
> + #size-cells = <1>;
> + reg = <0x400a5000 0xCF0>;
> + clocks = <&clks VF610_CLK_OCOTP>;
> +
> + ocotp_cfg0: cfg0@410 {
> + reg = <0x410 0x4>;
> + };
> +
> + ocotp_cfg1: cfg1@420 {
> + reg = <0x420 0x4>;
> + };
> + };
How do the registers of the child nodes relate to the registers of the
parent? If there are in the same address space, it might be good to
add a "ranges" property to describe it.
Arnd
[-- Attachment #2: Gavin Shan <gwshan-23VcF4HTsmIX0ybBhKVfKdBPR1lH4CV8@public.gmane.org>: Re: [PATCH v8 40/45] drivers/of: Split unflatten_dt_node() --]
[-- Type: message/rfc822, Size: 9739 bytes --]
From: Gavin Shan <gwshan-23VcF4HTsmIX0ybBhKVfKdBPR1lH4CV8@public.gmane.org>
To: Rob Herring <robherring2-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
Cc: "devicetree-u79uwXL29TY76Z2rM5mHXA@public.gmane.org" <devicetree-u79uwXL29TY76Z2rM5mHXA@public.gmane.org>, aik-sLpHqDYs0B2HXe+LvDLADg@public.gmane.org, Gavin Shan <gwshan-23VcF4HTsmIX0ybBhKVfKdBPR1lH4CV8@public.gmane.org>, Grant Likely <grant.likely-QSEj5FYQhm4dnm+yROfE0A@public.gmane.org>, "linux-pci-u79uwXL29TY76Z2rM5mHXA@public.gmane.org" <linux-pci-u79uwXL29TY76Z2rM5mHXA@public.gmane.org>, Bjorn Helgaas <bhelgaas-hpIqsD4AKlfQT0dZR+AlfA@public.gmane.org>, linuxppc-dev <linuxppc-dev-uLR06cmDAlY/bJ5BZ2RsiQ@public.gmane.org>, dja-Yfaxwxk/+vWsTnJN9+BGXg@public.gmane.org
Subject: Re: [PATCH v8 40/45] drivers/of: Split unflatten_dt_node()
Date: Mon, 02 May 2016 12:02:21 +1000
Message-ID: <20160502020221.GA16612@gwshan>
On Wed, Feb 17, 2016 at 08:30:42AM -0600, Rob Herring wrote:
>On Tue, Feb 16, 2016 at 9:44 PM, Gavin Shan <gwshan@linux.vnet.ibm.com> wrote:
>> The function unflatten_dt_node() is called recursively to unflatten
>> device nodes and properties in the FDT blob. It looks complicated
>> and hard to be understood.
>>
>> This splits the function into 3 functions: populate_properties(),
>> populate_node() and unflatten_dt_node(). populate_properties(),
>> which is called by populate_node(), creates properties for the
>> indicated device node. The later one creates the device nodes
>> from FDT blob. populate_node() gets the offset in FDT blob for
>> next device nodes and then calls populate_node(). No logical
>> changes introduced.
>>
>> Signed-off-by: Gavin Shan <gwshan@linux.vnet.ibm.com>
>> ---
>> drivers/of/fdt.c | 249 ++++++++++++++++++++++++++++++++-----------------------
>> 1 file changed, 147 insertions(+), 102 deletions(-)
>
>One nit, otherwise:
>
>Acked-by: Rob Herring <robh@kernel.org>
>
>[...]
>
>> + /* And we process the "ibm,phandle" property
>> + * used in pSeries dynamic device tree
>> + * stuff
>> + */
>> + if (!strcmp(pname, "ibm,phandle"))
>> + np->phandle = be32_to_cpup(val);
>> +
>> + pp->name = (char *)pname;
>> + pp->length = sz;
>> + pp->value = (__be32 *)val;
>
>This cast should not be needed.
>
It's needed. Otherwise, we will have warning. So I will keep it. I just
went through this one for next revision and sorry for late response.
drivers/of/fdt.c:225:14: warning: assignment discards ‘const’ qualifier from pointer target type
pp->value = val;
^
Thanks,
Gavin
>> + *pprev = pp;
>> + pprev = &pp->next;
>> + }
>
_______________________________________________
Linuxppc-dev mailing list
Linuxppc-dev@lists.ozlabs.org
https://lists.ozlabs.org/listinfo/linuxppc-dev
next prev parent reply other threads:[~2016-05-02 7:31 UTC|newest]
Thread overview: 15+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-05-02 7:04 [PATCH v2 0/5] Implement SoC bus driver for Vybrid Sanchayan Maity
2016-05-02 7:05 ` [PATCH v2 1/5] mfd: syscon: Introduce syscon_regmap_read_from_offset Sanchayan Maity
2016-05-02 7:05 ` [PATCH v2 2/5] ARM: dts: vfxxx: Add device tree node for OCOTP Sanchayan Maity
[not found] ` <b5c1ff5a805eae3e53f07f8d0161f0af51586c00.1462171990.git.maitysanchayan-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
2016-05-02 7:31 ` Arnd Bergmann [this message]
2016-05-02 8:12 ` maitysanchayan-Re5JQEeQqe8AvxtiuMwx3w
2016-05-02 7:05 ` [PATCH v2 3/5] ARM: dts: vfxxx: Add OCROM and phandle entries for Vybrid SoC bus driver Sanchayan Maity
[not found] ` <cover.1462171989.git.maitysanchayan-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
2016-05-02 7:05 ` [PATCH v2 4/5] soc: Add SoC bus driver for Freescale Vybrid Platform Sanchayan Maity
2016-05-02 7:05 ` [PATCH v2 5/5] vf610-soc: Add Vybrid SoC device tree binding documentation Sanchayan Maity
[not found] ` <65f3a7bd7a9faf1b390644d7c599c69683c753c4.1462171990.git.maitysanchayan-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
2016-05-04 2:30 ` Rob Herring
2016-05-05 8:27 ` maitysanchayan-Re5JQEeQqe8AvxtiuMwx3w
[not found] ` <20160505082758.GB18151-2b/appYahYDPUjlVagVGR1Kr0EmMEXJSn9A1Ff6Mc9Q@public.gmane.org>
2016-05-09 17:14 ` Rob Herring
2016-05-09 18:25 ` Stefan Agner
[not found] ` <4ca82be6c1d434c612868b441e9f6e1f-XLVq0VzYD2Y@public.gmane.org>
2016-05-09 22:58 ` Rob Herring
2016-05-10 1:13 ` Stefan Agner
2016-05-11 3:24 ` Rob Herring
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=4759698.elnRBldlxl@wuerfel \
--to=arnd-r2ngtmty4d4@public.gmane.org \
--cc=devicetree-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
--cc=lee.jones-QSEj5FYQhm4dnm+yROfE0A@public.gmane.org \
--cc=linux-arm-kernel-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r@public.gmane.org \
--cc=linux-kernel-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
--cc=maitysanchayan-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org \
--cc=robh+dt-DgEjT+Ai2ygdnm+yROfE0A@public.gmane.org \
--cc=shawnguo-DgEjT+Ai2ygdnm+yROfE0A@public.gmane.org \
--cc=stefan-XLVq0VzYD2Y@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;
as well as URLs for NNTP newsgroup(s).