Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1392054

Re: [PATCH v2 2/5] ARM: dts: vfxxx: Add device tree node for OCOTP

Path csiph.com!news.freedyn.net!aioe.org!bofh.it!news.nic.it!robomod
From maitysanchayan@gmail.com
Newsgroups linux.kernel
Subject Re: [PATCH v2 2/5] ARM: dts: vfxxx: Add device tree node for OCOTP
Date Mon, 02 May 2016 10:20:02 +0200
Message-ID <ruhfc-8nf-19@gated-at.bofh.it> (permalink)
References <rugj7-7xc-5@gated-at.bofh.it> <rugj8-7xc-27@gated-at.bofh.it> <rugCu-7Ih-1@gated-at.bofh.it>
X-Original-To Arnd Bergmann <arnd@arndb.de>
Dkim-Signature v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=date:from:to:cc:subject:message-id:references:mime-version :content-disposition:content-transfer-encoding:in-reply-to :user-agent; bh=au8kZ8IVBUh9xAOj5OUrZLJ79sGd26pdoFRTcvZlIQY=; b=XSxlqoAMhtQ9+kXI6a7wwYbXsgApoHpOQb6ZAws5pX4770ZbOOr0duce5tae4LL7OK hkGKfymL8HC0Ii9J+79nGMCmVcbwBC1X6Bj8IM55EGfJ0Utfhlx3NqXtAgXvLUkzRX1J hplEbaWYc+S58Rr4scw34BrVnVmjmLZWbw66GOvbEWqodswyI/ODVjvcqHZsL1svPLrP WXiwu6aZAA/jLy6MpdZwRlI5eYtw2/jFnMcsq2W/8ItjEvVCqTdu0CFYbczC36GUj/1k illTMDse52+RO6vg5U5PoM4P/0YeS+B/5szbldCkFsGeDj/RZKFqks26/GUnE8/vzriJ NC+g==
X-Google-Dkim-Signature v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:content-transfer-encoding :in-reply-to:user-agent; bh=au8kZ8IVBUh9xAOj5OUrZLJ79sGd26pdoFRTcvZlIQY=; b=hiMBkZPbMhZLAAqRDZHWb9TfaCQolmaCF+9PwN7Hcj9pkxrSbeiKka53lQyjZJs6W3 SeWTFafSncCnE867FjOmP6xt/mp4/lkPPpV4yHgo00vDyVUSmEJaMyQTJZGYqqlWmyW6 r8gpusbe9262WHq2uVi6ckX3LCa6B43zfcl5GZMd9zP+mnqFF8D3ekQtrjTVLQ17ldWg qBWYKr3U3+NVwp2R51br9rQRyS473Xu9v4oN68fvTD0A/MkY7mc4KBULmLtG6RPntDfT tM3UAdTLagS2bLspPRhUbBS1udr7KRVPWU7nWFki/Y7cX/w3n6mkYgknAp4zXMjOoH7/ gzDA==
X-Gm-Message-State AOPr4FV0gFyliSXlh1J3Wpox3X8zEIQ1EChepY4naOq7s1NB4s0IMlrtR5/iXOqDLSalZw==
X-Received by 10.66.43.143 with SMTP id w15mr44916844pal.76.1462177115858; Mon, 02 May 2016 01:18:35 -0700 (PDT)
MIME-Version 1.0
Content-Type text/plain; charset=utf-8
Content-Disposition inline
Content-Transfer-Encoding 8bit
User-Agent Mutt/1.6.0 (2016-04-01)
Sender robomod@news.nic.it
List-ID <linux-kernel.vger.kernel.org>
X-Mailing-List linux-kernel@vger.kernel.org
Approved robomod@news.nic.it
Lines 108
Organization linux.* mail to news gateway
X-Original-Cc linux-arm-kernel@lists.infradead.org, shawnguo@kernel.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, stefan@agner.ch, robh+dt@kernel.org, lee.jones@linaro.org
X-Original-Date Mon, 2 May 2016 13:42:12 +0530
X-Original-Message-ID <20160502081211.GA7847@Sanchayan-Arch.localdomain>
X-Original-References <cover.1462171989.git.maitysanchayan@gmail.com> <b5c1ff5a805eae3e53f07f8d0161f0af51586c00.1462171990.git.maitysanchayan@gmail.com> <4759698.elnRBldlxl@wuerfel>
X-Original-Sender linux-kernel-owner@vger.kernel.org
Xref csiph.com linux.kernel:1392054

Show key headers only | View raw


Hello Arnd,

On 16-05-02 09:31:12, Arnd Bergmann wrote:
> 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.

cfg0 and cfg1 are in the same address space viz. 0x400a5410 and 0x400a5420
respectively. These nodes are primarily for use by the NVMEM consumer API in
the SoC bus driver to retrieve the values from these registers leveraging
the NVMEM vf610 ocotp driver.

Based on the NVMEM bindings here
http://lxr.free-electrons.com/source/Documentation/devicetree/bindings/nvmem/nvmem.txt#L33

Thanks.

Regards,
Sanchayan.

> 
> 	Arnd

> Date: Mon, 02 May 2016 12:02:21 +1000
> From: Gavin Shan <gwshan@linux.vnet.ibm.com>
> To: Rob Herring <robherring2@gmail.com>
> Cc: "devicetree@vger.kernel.org" <devicetree@vger.kernel.org>,
>  aik@ozlabs.ru, Gavin Shan <gwshan@linux.vnet.ibm.com>, Grant Likely
>  <grant.likely@linaro.org>, "linux-pci@vger.kernel.org"
>  <linux-pci@vger.kernel.org>, Bjorn Helgaas <bhelgaas@google.com>,
>  linuxppc-dev <linuxppc-dev@lists.ozlabs.org>, dja@axtens.net
> Subject: Re: [PATCH v8 40/45] drivers/of: Split unflatten_dt_node()
> 
> 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

Back to linux.kernel | Previous | Next — Previous in thread | Find similar | Unroll thread


Thread

[PATCH v2 0/5] Implement SoC bus driver for Vybrid Sanchayan Maity <maitysanchayan@gmail.com> - 2016-05-02 09:20 +0200
  [PATCH v2 1/5] mfd: syscon: Introduce syscon_regmap_read_from_offset Sanchayan Maity <maitysanchayan@gmail.com> - 2016-05-02 09:20 +0200
  [PATCH v2 2/5] ARM: dts: vfxxx: Add device tree node for OCOTP Sanchayan Maity <maitysanchayan@gmail.com> - 2016-05-02 09:20 +0200
    Re: [PATCH v2 2/5] ARM: dts: vfxxx: Add device tree node for OCOTP Arnd Bergmann <arnd@arndb.de> - 2016-05-02 09:40 +0200
      Re: [PATCH v2 2/5] ARM: dts: vfxxx: Add device tree node for OCOTP maitysanchayan@gmail.com - 2016-05-02 10:20 +0200

csiph-web