Re: [U-Boot] [PATCH 0/7] libfdt: Update to resync with dtc/libfdt

2008-08-20 Thread David Gibson
libfdt fdt_path_offset() returned FDT_ERR_NOTFOUND Uh... didn't I talk you out of this broken path-to-property stuff way back when? -- David Gibson| I'll have my music baroque, and my code david AT gibson.dropbear.id.au | minimalist, thank you. NOT _the_ _other_

Re: [U-Boot] [PATCH] libfdt: Add function to explicitly expand aliases

2008-10-03 Thread David Gibson
, int namelen); + This should be fdt_get_alias_namelen, right? It does look that way This patch has already been applied upstream, so correcting patches on top of this are welcome. Crap, sorry. I'll send a fixup patch if none of you gets to it first. -- David Gibson

Re: [U-Boot] [PATCH] libfdt: Add function to explicitly expand aliases

2008-10-03 Thread David Gibson
in the documenting comment for this function. Trivial correction in this patch. Signed-off-by: David Gibson [EMAIL PROTECTED] Index: dtc/libfdt/libfdt.h === --- dtc.orig/libfdt/libfdt.h2008-10-04 14:46:50.0 +1000 +++ dtc/libfdt

Re: [U-Boot] [PATCH v4 3/4] dtc/libfdt: introduce fdt types for annotation by endian checkers

2012-12-02 Thread David Gibson
-by: David Gibson da...@gibson.dropbear.id.au -- David Gibson| I'll have my music baroque, and my code david AT gibson.dropbear.id.au | minimalist, thank you. NOT _the_ _other_ | _way_ _around_! http://www.ozlabs.org/~dgibson

Re: [U-Boot] [PATCH 1/5] treewide: include libfdt_env.h before fdt.h

2013-01-17 Thread David Gibson
) such a requirement. -- David Gibson| I'll have my music baroque, and my code david AT gibson.dropbear.id.au | minimalist, thank you. NOT _the_ _other_ | _way_ _around_! http://www.ozlabs.org/~dgibson signature.asc Description: Digital signature

Re: [U-Boot] [PATCH 1/5] treewide: include libfdt_env.h before fdt.h

2013-01-17 Thread David Gibson
. That is, defines and structure/type declarations but no function prorotypes or other code. In particular that means that it is strictly about the FDT tree structure only, and not any of the libfdt specific entry points. -- David Gibson| I'll have my music baroque, and my code david

Re: [U-Boot] [PATCH 1/5] treewide: include libfdt_env.h before fdt.h

2013-01-20 Thread David Gibson
On Fri, Jan 18, 2013 at 06:59:46AM -0500, Gerald Van Baren wrote: On 01/17/2013 06:50 PM, David Gibson wrote: On Thu, Jan 17, 2013 at 01:32:45PM -0500, Jerry Van Baren wrote: Hi Scott, Kim, David, [snip] libfdt_env.h is where Kim typedef'ed fdt16_t, fdt32_t, fdt64_t I suspect

Re: [U-Boot] Adding new partition in uboot

2010-04-01 Thread David Gibson
reply. For this case where there's a flash partition that's sometimes there and sometimes not, it might be simpler to put all the partitions, including the not-always-present ones in the dts. Then you can use fdt_nop_subnode() to remove the extra one on systems where it's not present. -- David

Re: [U-Boot] dtc/u-boot tool naming, ftdump, mkimage

2009-01-14 Thread David Gibson
, the same people but the chairs are arranged differently ;-). [snip] IMHO, the ftdump issue needs to be addressed at the DTC level (Jon Loeliger and David Gibson). U-Boot (and the linux kernel) is being driven by DTC. David has said before that ftdump is sort of a pointless

Re: [U-Boot] dtc/u-boot tool naming, ftdump, mkimage

2009-01-14 Thread David Gibson
what's going on. Like I said, dtc -I dtb -O dts is the non-hacky way to do this. -- David Gibson| I'll have my music baroque, and my code david AT gibson.dropbear.id.au | minimalist, thank you. NOT _the_ _other_ | _way_ _around_! http

Re: [U-Boot] Subject: [PATCH] libfdt: Add fdt functionality for more intuitive fdt handling

2012-05-08 Thread David Gibson
path fdt_write - create or change a property with full path and create subnodes if needed I don't love these names (too vague). fdt_{get,set}prop_global() perhaps. fdt_create_path - create subnode path with parents Signed-off-by: Peter Feuerer peter.feue...@sysgo.com CC: David Gibson da

Re: [U-Boot] [PATCH 01/14] fdt: Tidy up a few fdtdec problems

2011-11-28 Thread David Gibson
value for the status property. -- David Gibson| I'll have my music baroque, and my code david AT gibson.dropbear.id.au | minimalist, thank you. NOT _the_ _other_ | _way_ _around_! http://www.ozlabs.org/~dgibson

Re: [U-Boot] [PATCH 02/14] fdt: Add functions to access phandles, arrays and bools

2011-11-28 Thread David Gibson
to interact with it is a bad idea. -- David Gibson| I'll have my music baroque, and my code david AT gibson.dropbear.id.au | minimalist, thank you. NOT _the_ _other_ | _way_ _around_! http://www.ozlabs.org/~dgibson

Re: [U-Boot] [PATCH 00/32] Initial sparse fix series

2012-10-18 Thread David Gibson
for their checker. For convenience on Linux systems we can have the default libfdt_env.h shipped with libfdt go either way depending on SPARSE, LINUX_TYPES or whatever suitable pre-existing preprocessor tags we can locate. -- David Gibson| I'll have my music baroque, and my code

Re: [U-Boot] [PATCH 00/32] Initial sparse fix series

2012-10-18 Thread David Gibson
On Thu, Oct 18, 2012 at 05:30:22PM -0500, Kim Phillips wrote: On Thu, 18 Oct 2012 23:11:12 +1100 David Gibson da...@gibson.dropbear.id.au wrote: On Wed, Oct 17, 2012 at 08:19:23PM -0400, Jerry Van Baren wrote: Hi David, Jon, Kim Phillips created a series of patches to change

Re: [U-Boot] Merging device trees at runtime for module-based systems

2012-10-25 Thread David Gibson
more functionality for libfdt. I've only seen bits and pieces of this thread, though, so I'd need to see a summary of what exactly is being proposed. -- David Gibson| I'll have my music baroque, and my code david AT gibson.dropbear.id.au | minimalist, thank you. NOT _the_

Re: [U-Boot] [PATCH 05/14] fdt: Export fdtdec_find_alias_node() function

2012-10-26 Thread David Gibson
On Thu, Oct 25, 2012 at 07:31:02PM -0700, Simon Glass wrote: This function is useful outside fdtdec, so export it. Hrm. fdt_path_offset() in libfdt itself will already look up aliases if given a path that doesn't start with '/'. So it's not clear why you need this function at all. -- David

Re: [U-Boot] Merging device trees at runtime for module-based systems

2012-11-01 Thread David Gibson
On Fri, Oct 26, 2012 at 09:24:11AM +0200, Daniel Mack wrote: On 26.10.2012 02:53, David Gibson wrote: On Thu, Oct 25, 2012 at 10:46:32PM +0200, Wolfgang Denk wrote: Dear Daniel, In message 50893633.6070...@gmail.com you wrote: Overwrites must be addressed in the first place. The most

Re: [U-Boot] Merging device trees at runtime for module-based systems

2012-11-02 Thread David Gibson
had in mind, so I don't think either side is really sufficiently well defined to really say if they're similar or not. -- David Gibson| I'll have my music baroque, and my code david AT gibson.dropbear.id.au | minimalist, thank you. NOT _the_ _other_

Re: [U-Boot] Merging device trees at runtime for module-based systems

2012-11-03 Thread David Gibson
On Thu, Nov 01, 2012 at 10:24:06AM +0100, Daniel Mack wrote: On 01.11.2012 04:26, David Gibson wrote: On Fri, Oct 26, 2012 at 09:24:11AM +0200, Daniel Mack wrote: I would especially like to know where such a new functionality should live, which data types it should operate on and what

Re: [U-Boot] [PATCH] libfdt: introduce fdt type annotation for use by endian checkers

2012-11-05 Thread David Gibson
then in terms of the attributes in the environment. -- David Gibson| I'll have my music baroque, and my code david AT gibson.dropbear.id.au | minimalist, thank you. NOT _the_ _other_ | _way_ _around_! http://www.ozlabs.org/~dgibson

Re: [U-Boot] [PATCH v3 3/4] dtc/libfdt: introduce fdt types for annotation by endian checkers

2012-11-14 Thread David Gibson
see why you're rewriting the byteswapper functions as part of this patch. The existing versions aren't very nice, but if you want to rewrite those, please do it in a separate patch. -- David Gibson| I'll have my music baroque, and my code david AT gibson.dropbear.id.au

Re: [U-Boot] [PATCH v3 3/4] dtc/libfdt: introduce fdt types for annotation by endian checkers

2012-11-18 Thread David Gibson
On Wed, Nov 14, 2012 at 11:12:04PM -0600, Kim Phillips wrote: On Thu, 15 Nov 2012 15:43:40 +1100 David Gibson da...@gibson.dropbear.id.au wrote: On Wed, Nov 14, 2012 at 06:59:58PM -0600, Kim Phillips wrote: +#define EXTRACT_BYTE(x, n) ((unsigned long long)((uint8_t *)x)[n]) +#define

Re: [U-Boot] [PATCH v2 4/9] libfdt: Add new headers and defines

2016-06-12 Thread David Gibson
+#endif > > + > > /* adding a ramdisk needs 0x44 bytes in version 2008.10 */ > > #define FDT_RAMDISK_OVERHEAD0x80 > > > > We need to figure out what the upstream libfdt/dtc maintainer’s take is on > this is. > For u-boot we’re fine and for now it’s O

Re: [U-Boot] [PATCH v2 7/9] libfdt: Add overlay application function

2016-06-14 Thread David Gibson
rn 0; > > +} > > + > > +static int fdt_overlay_merge(void *dt, void *dto) > > +{ > > + int root, fragment; > > + > > + root = fdt_path_offset(dto, "/"); > > + if (root < 0) > > + return root; > > + > > +

Re: [U-Boot] [PATCH v2 7/9] libfdt: Add overlay application function

2016-06-14 Thread David Gibson
On Tue, Jun 14, 2016 at 12:22:23PM +0300, Pantelis Antoniou wrote: > Hi David, > > On Jun 14, 2016, at 03:25 , David Gibson <da...@gibson.dropbear.id.au> > > wrote: > > On Fri, Jun 10, 2016 at 05:28:11PM +0300, Pantelis Antoniou wrote: [snip] > >>> +stat

Re: [U-Boot] [PATCH v2 7/9] libfdt: Add overlay application function

2016-06-15 Thread David Gibson
On Wed, Jun 15, 2016 at 12:34:00PM +0300, Pantelis Antoniou wrote: > Hi David, > > > On Jun 15, 2016, at 06:14 , David Gibson <da...@gibson.dropbear.id.au> > > wrote: > > > > On Tue, Jun 14, 2016 at 12:22:23PM +0300, Pantelis Antoniou wrote: > >&

Re: [U-Boot] [PATCH v3 07/12] libfdt: Add fdt_setprop_inplace_by_index

2016-06-27 Thread David Gibson
On Mon, Jun 27, 2016 at 11:16:52AM +0200, Maxime Ripard wrote: > On Mon, Jun 27, 2016 at 01:45:11AM +1000, David Gibson wrote: > > On Fri, Jun 24, 2016 at 04:27:52PM +0200, Maxime Ripard wrote: > > > Add a function to modify inplace a property starting

Re: [U-Boot] [PATCH v3 04/12] libfdt: Add new headers and defines

2016-06-27 Thread David Gibson
On Mon, Jun 27, 2016 at 09:25:27AM +0200, Maxime Ripard wrote: > Hi David, > > On Mon, Jun 27, 2016 at 01:39:06AM +1000, David Gibson wrote: > > On Fri, Jun 24, 2016 at 04:27:49PM +0200, Maxime Ripard wrote: > > > The libfdt overlay support introduces a bunch of new incl

Re: [U-Boot] [PATCH v3 10/12] libfdt: Add overlay application function

2016-06-27 Thread David Gibson
On Mon, Jun 27, 2016 at 01:40:00PM +0200, Maxime Ripard wrote: > Hi David, > > On Mon, Jun 27, 2016 at 03:26:07PM +1000, David Gibson wrote: > > > +static uint32_t overlay_get_target_phandle(const void *fdto, int > > > fragment) > > > +{ > >

Re: [U-Boot] [PATCH v3 00/12] cmd: fdt: Add device tree overlays support

2016-06-26 Thread David Gibson
+ > 20 files changed, 992 insertions(+), 22 deletions(-) > create mode 100644 include/test/overlay.h > create mode 100644 lib/libfdt/fdt_overlay.c > create mode 100644 test/overlay/Kconfig > create mode 100644 test/overlay/Makefile > create mode 100644

Re: [U-Boot] [PATCH v3 04/12] libfdt: Add new headers and defines

2016-06-26 Thread David Gibson
ef __UBOOT__ > +#include > + > +#define strtoul(cp, endp, base) simple_strtoul(cp, endp, base) > +#endif > + > /* adding a ramdisk needs 0x44 bytes in version 2008.10 */ > #define FDT_RAMDISK_OVERHEAD 0x80 > -- David Gibson| I'll have my music baroque,

Re: [U-Boot] [PATCH v3 07/12] libfdt: Add fdt_setprop_inplace_by_index

2016-06-26 Thread David Gibson
uint32_t index, const void *val, > + int len) > { > void *propval; > int proplen; > > - propval = fdt_getprop_w(fdt, nodeoffset, name, ); > + propval = fdt_getprop_namelen_w(fdt, nodeoffset, name, namelen, > + )

Re: [U-Boot] [PATCH v3 08/12] libfdt: Add fdt_path_offset_namelen

2016-06-26 Thread David Gibson
nd)) { > const char *q; > > while (*p == '/') > p++; > + > if (*p == '\0' || *p == ':') > return offset; > - q = fdt_path_next_seperator(p); > + > + q = fdt_pat

Re: [U-Boot] [PATCH v3 09/12] libfdt: Add fdt_getprop_namelen_w

2016-06-26 Thread David Gibson
nt namelen, > + int *lenp) > +{ > + return (void *)(uintptr_t)fdt_getprop_namelen(fdt, nodeoffset, name, > + namelen, lenp); > +} I believe you used this in your new setprop_inpace implementation. So th

Re: [U-Boot] [PATCH v3 10/12] libfdt: Add overlay application function

2016-06-26 Thread David Gibson
arget < 0) > + continue; > + > + overlay = fdt_subnode_offset(dto, fragment, "__overlay__"); > + if (overlay < 0) > + return overlay; > + > + ret = apply_overlay_node(dt, target, dto, ove

Re: [U-Boot] [PATCH v3 12/12] tests: Introduce DT overlay tests

2016-06-26 Thread David Gibson
* > + * Copyright (c) 2016 NextThing Co > + * Copyright (c) 2016 Free Electrons > + * > + * SPDX-License-Identifier: GPL-2.0+ > + */ > + > +/dts-v1/; > +/plugin/; > + > +/ { > + /* Test that we can change an int by another */ > + fragment@0 { > +

Re: [U-Boot] [PATCH v3 12/12] tests: Introduce DT overlay tests

2016-06-27 Thread David Gibson
On Mon, Jun 27, 2016 at 08:30:28AM +0200, Maxime Ripard wrote: > Hi David, > > On Mon, Jun 27, 2016 at 03:26:58PM +1000, David Gibson wrote: > > On Fri, Jun 24, 2016 at 04:27:57PM +0200, Maxime Ripard wrote: > > > This adds a bunch of unit tests for the "fdt apply&q

Re: [U-Boot] [PATCH 07/26] libfdt: Add a function to write a property placeholder

2016-01-31 Thread David Gibson
f); > prop->len = cpu_to_fdt32(len); > - memcpy(prop->data, val, len); > + *valp = prop->data; > + return 0; > +} > + > +int fdt_property(void *fdt, const char *name, const void *val, int len) > +{ > + void *ptr; > + int ret; > +

Re: [U-Boot] [PATCH 07/26] libfdt: Add a function to write a property placeholder

2016-01-31 Thread David Gibson
On Fri, Jan 29, 2016 at 11:23:31AM -0700, Simon Glass wrote: > Hi David, > > On 28 January 2016 at 22:29, David Gibson <da...@gibson.dropbear.id.au> wrote: > > On Thu, Jan 28, 2016 at 09:39:27AM -0700, Simon Glass wrote: > >> The existing function to add a new

Re: [U-Boot] [PATCH] fdt: Try to read #address-cells/size-cells from parent

2016-03-14 Thread David Gibson
gt;> device_type = "memory"; > >> reg = <0x0 0x0 0x8000>, <0x8 0x 0x8000>; > >> }; > >> > >> Code is in memory node I need to work with and asking for size-cells. >

Re: [U-Boot] [PATCH] fdt: Try to read #address-cells/size-cells from parent

2016-03-20 Thread David Gibson
On Wed, Mar 16, 2016 at 05:18:25PM +0100, Michal Simek wrote: > Hi David, > > On 15.3.2016 01:27, David Gibson wrote: > > On Mon, Mar 14, 2016 at 10:10:58PM +0100, Michal Simek wrote: > >> On 13.3.2016 02:54, Simon Glass wrote: > >>> Hi Michal, > >>

Re: [U-Boot] [PATCH v4 09/13] libfdt: Add fdt_getprop_namelen_w

2016-07-11 Thread David Gibson
On Mon, Jul 11, 2016 at 09:12:27AM +0200, Maxime Ripard wrote: > On Wed, Jul 06, 2016 at 11:22:48AM +1000, David Gibson wrote: > > On Tue, Jul 05, 2016 at 10:26:42AM +0200, Maxime Ripard wrote: > > > Add a function to retrieve a writeable property only by the first > >

Re: [U-Boot] [PATCH v4 08/13] libfdt: Add fdt_path_offset_namelen

2016-07-05 Thread David Gibson
nonsense for? > const char *q; > > while (*p == '/') > p++; > + > if (*p == '\0' || *p == ':') > return offset; > - q = fdt_path_next_separator(p); > + > + q = fdt

Re: [U-Boot] [PATCH v4 07/13] libfdt: Fix separator spelling

2016-07-05 Thread David Gibson
char *path) > p++; > if (*p == '\0' || *p == ':') > return offset; > - q = fdt_path_next_seperator(p); > + q = fdt_path_next_separator(p); > if (!q) > q =

Re: [U-Boot] [PATCH v4 06/13] libfdt: Add max phandle retrieval function

2016-07-05 Thread David Gibson
return 0; It might be worth pointing out that *any* -1 phandle in the tree counts as an error. Since -1 phandles are sometimes used as a placeholder, ignoring them might be a better option. > + if (phandle > max_phandle) > + max_phandle = phandle; &

Re: [U-Boot] [PATCH v4 09/13] libfdt: Add fdt_getprop_namelen_w

2016-07-05 Thread David Gibson
> +} > > /** > * fdt_getprop - retrieve the value of a given property -- David Gibson| I'll have my music baroque, and my code david AT gibson.dropbear.id.au | minimalist, thank you. NOT _the_ _other_ | _w

Re: [U-Boot] [PATCH v3 10/12] libfdt: Add overlay application function

2016-06-29 Thread David Gibson
On Wed, Jun 29, 2016 at 07:34:54PM -0700, Frank Rowand wrote: > On 06/27/16 20:12, David Gibson wrote: > > On Mon, Jun 27, 2016 at 01:40:00PM +0200, Maxime Ripard wrote: > >> Hi David, > >> > >> On Mon, Jun 27, 2016 at 03:26:07PM +1000, David G

Re: [U-Boot] [PATCH 03/12] libfdt: Safer access to strings section

2018-04-14 Thread David Gibson
On Fri, Apr 13, 2018 at 12:53:19PM -0400, Tom Rini wrote: > On Thu, Apr 12, 2018 at 02:39:19PM +1000, David Gibson wrote: > > On Tue, Apr 10, 2018 at 10:42:45AM -0400, Simon Glass wrote: > > > +U-Boot, Tom, Masahiro > > > > > > Hi David, > > > >

Re: [U-Boot] [PATCH 03/12] libfdt: Safer access to strings section

2018-04-12 Thread David Gibson
On Thu, Apr 12, 2018 at 03:00:17PM -0400, Tom Rini wrote: > On Thu, Apr 12, 2018 at 02:01:05PM +1000, David Gibson wrote: > > On Tue, Apr 10, 2018 at 06:36:06PM -0400, Tom Rini wrote: > > > On Tue, Apr 10, 2018 at 10:42:45AM -0400, Simon Glass wrote: > > &g

Re: [U-Boot] [PATCH 03/12] libfdt: Safer access to strings section

2018-04-11 Thread David Gibson
On Tue, Apr 10, 2018 at 10:42:45AM -0400, Simon Glass wrote: > +U-Boot, Tom, Masahiro > > Hi David, > > On 10 April 2018 at 01:22, David Gibson <da...@gibson.dropbear.id.au> wrote: > > On Wed, Apr 04, 2018 at 01:21:10AM +0800, Simon Glass wrote: > >> Hi David

Re: [U-Boot] [PATCH 03/12] libfdt: Safer access to strings section

2018-04-11 Thread David Gibson
On Tue, Apr 10, 2018 at 06:36:06PM -0400, Tom Rini wrote: > On Tue, Apr 10, 2018 at 10:42:45AM -0400, Simon Glass wrote: > > +U-Boot, Tom, Masahiro > > > > Hi David, > > > > On 10 April 2018 at 01:22, David Gibson <da...@gibson.dropbear.id.au> wrote: &

Re: [U-Boot] [PATCH 03/12] libfdt: Safer access to strings section

2018-04-17 Thread David Gibson
On Tue, Apr 17, 2018 at 12:03:19PM +0900, Masahiro Yamada wrote: > 2018-04-14 23:42 GMT+09:00 Warner Losh <i...@bsdimp.com>: > > On Fri, Apr 13, 2018 at 9:43 PM, David Gibson <da...@gibson.dropbear.id.au> > > wrote: > > > >> On Fri, Apr 13, 2018 at 12:53

Re: [U-Boot] [PATCH 03/12] libfdt: Safer access to strings section

2018-04-15 Thread David Gibson
On Sat, Apr 14, 2018 at 08:42:23AM -0600, Warner Losh wrote: > On Fri, Apr 13, 2018 at 9:43 PM, David Gibson <da...@gibson.dropbear.id.au> > wrote: > > > On Fri, Apr 13, 2018 at 12:53:19PM -0400, Tom Rini wrote: > > > On Thu, Apr 12, 2018 at 02:39:19PM +1000, Davi