<feed xmlns='http://www.w3.org/2005/Atom'>
<title>u-boot.git/include/libfdt.h, branch u-boot-2013.01.y</title>
<subtitle>Unnamed repository; edit this file 'description' to name the repository.
</subtitle>
<link rel='alternate' type='text/html' href='http://cgit.235523.xyz/u-boot.git/'/>
<entry>
<title>libfdt: Add helper function to create a trivial, empty tree</title>
<updated>2012-10-16T02:24:36+00:00</updated>
<author>
<name>Gerald Van Baren</name>
<email>gvb@unssw.com</email>
</author>
<published>2012-10-16T02:24:36+00:00</published>
<link rel='alternate' type='text/html' href='http://cgit.235523.xyz/u-boot.git/commit/?id=c71b64f3617b5a4362c6e4e0aefdd66d6ac6affd'/>
<id>c71b64f3617b5a4362c6e4e0aefdd66d6ac6affd</id>
<content type='text'>
The libfdt read/write functions are now usable enough that it's become a
moderately common pattern to use them to build and manipulate a device
tree from scratch.  For example, we do so ourself in our rw_tree1 testcase,
and qemu is starting to use this model when building device trees for some
targets such as e500.

However, the read/write functions require some sort of valid tree to begin
with, so this necessitates either having a trivial canned dtb to begin with
or, more commonly, creating an empty tree using the serial-write functions
first.

This patch adds a helper function which uses the serial-write functions to
create a trivial, empty but complete and valid tree in a supplied buffer,
ready for manipulation with the read/write functions.

Signed-off-by: David Gibson &lt;david@gibson.dropbear.id.au&gt;

From git://git.jdl.com/software/dtc.git patch hash be6026838 with
adaptations to include/libfdt.h and lib/libfdt/Makefile for the U-Boot
environment.

Signed-off-by: Gerald Van Baren &lt;vanbaren@cideas.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
The libfdt read/write functions are now usable enough that it's become a
moderately common pattern to use them to build and manipulate a device
tree from scratch.  For example, we do so ourself in our rw_tree1 testcase,
and qemu is starting to use this model when building device trees for some
targets such as e500.

However, the read/write functions require some sort of valid tree to begin
with, so this necessitates either having a trivial canned dtb to begin with
or, more commonly, creating an empty tree using the serial-write functions
first.

This patch adds a helper function which uses the serial-write functions to
create a trivial, empty but complete and valid tree in a supplied buffer,
ready for manipulation with the read/write functions.

Signed-off-by: David Gibson &lt;david@gibson.dropbear.id.au&gt;

From git://git.jdl.com/software/dtc.git patch hash be6026838 with
adaptations to include/libfdt.h and lib/libfdt/Makefile for the U-Boot
environment.

Signed-off-by: Gerald Van Baren &lt;vanbaren@cideas.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>libfdt: Add helpers for 64-bit integer properties</title>
<updated>2012-10-15T23:15:39+00:00</updated>
<author>
<name>David Gibson</name>
<email>david@gibson.dropbear.id.au</email>
</author>
<published>2012-08-28T00:39:00+00:00</published>
<link rel='alternate' type='text/html' href='http://cgit.235523.xyz/u-boot.git/commit/?id=24fa0e588e68dfb4b15d1e94c543c9301d226902'/>
<id>24fa0e588e68dfb4b15d1e94c543c9301d226902</id>
<content type='text'>
In device trees in the world, properties consisting of a single 64-bit
integer are not as common as those consisting of a single 32-bit, cell
sized integer, but they're common enough that they're worth including
convenience functions for.

This patch adds helper wrappers of fdt_setprop_inplace(), fdt_setprop() and
fdt_appendprop() for handling 64-bit integer quantities in properties.  For
better consistency with the names of these new *_u64() functions we also
add *_u32() functions as alternative names for the existing *_cell()
functions handling 32-bit integers.

Signed-off-by: David Gibson &lt;david@gibson.dropbear.id.au&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
In device trees in the world, properties consisting of a single 64-bit
integer are not as common as those consisting of a single 32-bit, cell
sized integer, but they're common enough that they're worth including
convenience functions for.

This patch adds helper wrappers of fdt_setprop_inplace(), fdt_setprop() and
fdt_appendprop() for handling 64-bit integer quantities in properties.  For
better consistency with the names of these new *_u64() functions we also
add *_u32() functions as alternative names for the existing *_cell()
functions handling 32-bit integers.

Signed-off-by: David Gibson &lt;david@gibson.dropbear.id.au&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>libfdt: Add support for appending the values to a existing property</title>
<updated>2012-10-15T23:15:39+00:00</updated>
<author>
<name>Minghuan Lian</name>
<email>Minghuan.Lian@freescale.com</email>
</author>
<published>2012-08-28T00:38:59+00:00</published>
<link rel='alternate' type='text/html' href='http://cgit.235523.xyz/u-boot.git/commit/?id=36ad18a6db0eec546b83e6500ceb7593be53a1ed'/>
<id>36ad18a6db0eec546b83e6500ceb7593be53a1ed</id>
<content type='text'>
Some properties may contain multiple values, these values may need
to be added to the property respectively. this patch provides this
functionality. The main purpose of fdt_append_prop() is to append
the values to a existing property, or create a new property if it
dose not exist.

Signed-off-by: Minghuan Lian &lt;Minghuan.Lian@freescale.com&gt;
Signed-off-by: David Gibson &lt;david@gibson.dropbear.id.au&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Some properties may contain multiple values, these values may need
to be added to the property respectively. this patch provides this
functionality. The main purpose of fdt_append_prop() is to append
the values to a existing property, or create a new property if it
dose not exist.

Signed-off-by: Minghuan Lian &lt;Minghuan.Lian@freescale.com&gt;
Signed-off-by: David Gibson &lt;david@gibson.dropbear.id.au&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>libfdt: Implement property iteration functions</title>
<updated>2011-07-15T01:10:34+00:00</updated>
<author>
<name>David Gibson</name>
<email>david@gibson.dropbear.id.au</email>
</author>
<published>2010-03-09T06:39:14+00:00</published>
<link rel='alternate' type='text/html' href='http://cgit.235523.xyz/u-boot.git/commit/?id=d1c6314887c4d6712f7bd9ba7428b6517e7732e0'/>
<id>d1c6314887c4d6712f7bd9ba7428b6517e7732e0</id>
<content type='text'>
For ages, we've been talking about adding functions to libfdt to allow
iteration through properties.  So, finally, here are some.

I got bogged down on this for a long time because I didn't want to
expose offsets directly to properties to the callers.  But without
that, attempting to make reasonable iteration functions just became
horrible.  So eventually, I settled on an interface which does now
expose property offsets.  fdt_first_property_offset() and
fdt_next_property_offset() are used to step through the offsets of the
properties starting from a particularly node offset.  The details of
the property at each offset can then be retrieved with either
fdt_get_property_by_offset() or fdt_getprop_by_offset() which have
interfaces similar to fdt_get_property() and fdt_getprop()
respectively.

No explicit testcases are included, but we do use the new functions to
reimplement the existing fdt_get_property() function.

Signed-off-by: David Gibson &lt;david@gibson.dropbear.id.au&gt;

This was extracted from the DTC commit:
73dca9ae0b9abe6924ba640164ecce9f8df69c5a Mon Sep 17 00:00:00 2001

Signed-off-by: Gerald Van Baren &lt;vanbaren@cideas.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
For ages, we've been talking about adding functions to libfdt to allow
iteration through properties.  So, finally, here are some.

I got bogged down on this for a long time because I didn't want to
expose offsets directly to properties to the callers.  But without
that, attempting to make reasonable iteration functions just became
horrible.  So eventually, I settled on an interface which does now
expose property offsets.  fdt_first_property_offset() and
fdt_next_property_offset() are used to step through the offsets of the
properties starting from a particularly node offset.  The details of
the property at each offset can then be retrieved with either
fdt_get_property_by_offset() or fdt_getprop_by_offset() which have
interfaces similar to fdt_get_property() and fdt_getprop()
respectively.

No explicit testcases are included, but we do use the new functions to
reimplement the existing fdt_get_property() function.

Signed-off-by: David Gibson &lt;david@gibson.dropbear.id.au&gt;

This was extracted from the DTC commit:
73dca9ae0b9abe6924ba640164ecce9f8df69c5a Mon Sep 17 00:00:00 2001

Signed-off-by: Gerald Van Baren &lt;vanbaren@cideas.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>libfdt: Fix C++ compile-time cast error on gnu 4.2.1</title>
<updated>2009-04-01T23:30:27+00:00</updated>
<author>
<name>Laurent Gregoire</name>
<email>laurent.gregoire@tomtom.com</email>
</author>
<published>2009-03-03T13:23:59+00:00</published>
<link rel='alternate' type='text/html' href='http://cgit.235523.xyz/u-boot.git/commit/?id=67b89c79e72fe86b0ea0199425d880630beb95d8'/>
<id>67b89c79e72fe86b0ea0199425d880630beb95d8</id>
<content type='text'>
Allow the inclusion of libfdt.h in C++ source.

Signed-off-by: Laurent Gregoire &lt;laurent.gregoire@tomtom.com&gt;
Acked-by: David Gibson &lt;david@gibson.dropbear.id.au&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Allow the inclusion of libfdt.h in C++ source.

Signed-off-by: Laurent Gregoire &lt;laurent.gregoire@tomtom.com&gt;
Acked-by: David Gibson &lt;david@gibson.dropbear.id.au&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>libfdt: Fix error in documentation for fdt_get_alias_namelen()</title>
<updated>2008-10-04T11:56:06+00:00</updated>
<author>
<name>Gerald Van Baren</name>
<email>vanbaren@cideas.com</email>
</author>
<published>2008-10-04T11:56:06+00:00</published>
<link rel='alternate' type='text/html' href='http://cgit.235523.xyz/u-boot.git/commit/?id=cd3cb0d9269d155276b00207e3816a9347fd1c92'/>
<id>cd3cb0d9269d155276b00207e3816a9347fd1c92</id>
<content type='text'>
Oops, screwed up the function name in the documenting comment for this
function.  Trivial correction in this patch.

Signed-off-by: David Gibson &lt;david@gibson.dropbear.id.au&gt;
Acked-by: Gerald Van Baren &lt;vanbaren@cideas.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Oops, screwed up the function name in the documenting comment for this
function.  Trivial correction in this patch.

Signed-off-by: David Gibson &lt;david@gibson.dropbear.id.au&gt;
Acked-by: Gerald Van Baren &lt;vanbaren@cideas.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>libfdt: Add function to explicitly expand aliases</title>
<updated>2008-10-02T23:06:09+00:00</updated>
<author>
<name>David Gibson</name>
<email>david@gibson.dropbear.id.au</email>
</author>
<published>2008-08-20T06:55:14+00:00</published>
<link rel='alternate' type='text/html' href='http://cgit.235523.xyz/u-boot.git/commit/?id=9a6cf73a88ddab2e1ac39088f2806177982cc62c'/>
<id>9a6cf73a88ddab2e1ac39088f2806177982cc62c</id>
<content type='text'>
Kumar has already added alias expansion to fdt_path_offset().
However, in some circumstances it may be convenient for the user of
libfdt to explicitly get the string expansion of an alias.  This patch
adds a function to do this, fdt_get_alias(), and uses it to implement
fdt_path_offset().

Signed-off-by: David Gibson &lt;david@gibson.dropbear.id.au&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Kumar has already added alias expansion to fdt_path_offset().
However, in some circumstances it may be convenient for the user of
libfdt to explicitly get the string expansion of an alias.  This patch
adds a function to do this, fdt_get_alias(), and uses it to implement
fdt_path_offset().

Signed-off-by: David Gibson &lt;david@gibson.dropbear.id.au&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>Fix an overflow case in fdt_offset_ptr() detected by GCC 4.3.</title>
<updated>2008-10-02T02:01:52+00:00</updated>
<author>
<name>Jon Loeliger</name>
<email>jdl@freescale.com</email>
</author>
<published>2008-09-25T16:02:17+00:00</published>
<link rel='alternate' type='text/html' href='http://cgit.235523.xyz/u-boot.git/commit/?id=741a6d010d09b5bafca8e4cdfb6b2f8a2c07994d'/>
<id>741a6d010d09b5bafca8e4cdfb6b2f8a2c07994d</id>
<content type='text'>
Using Gcc 4.3 detected this problem:

    ../dtc/libfdt/fdt.c: In function 'fdt_next_tag':
    ../dtc/libfdt/fdt.c:82: error: assuming signed overflow does not
    occur when assuming that (X + c) &lt; X is always false

To fix the problem, treat the offset as an unsigned int.

The problem report and proposed fix were provided
by Steve Papacharalambous &lt;stevep@freescale.com&gt;.

Signed-off-by: Jon Loeliger &lt;jdl@freescale.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Using Gcc 4.3 detected this problem:

    ../dtc/libfdt/fdt.c: In function 'fdt_next_tag':
    ../dtc/libfdt/fdt.c:82: error: assuming signed overflow does not
    occur when assuming that (X + c) &lt; X is always false

To fix the problem, treat the offset as an unsigned int.

The problem report and proposed fix were provided
by Steve Papacharalambous &lt;stevep@freescale.com&gt;.

Signed-off-by: Jon Loeliger &lt;jdl@freescale.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>libfdt: Implement fdt_get_property_namelen() and fdt_getprop_namelen()</title>
<updated>2008-08-25T02:20:50+00:00</updated>
<author>
<name>David Gibson</name>
<email>david@gibson.dropbear.id.au</email>
</author>
<published>2008-08-06T04:50:49+00:00</published>
<link rel='alternate' type='text/html' href='http://cgit.235523.xyz/u-boot.git/commit/?id=0219399a4e3a8edb428e1924e1a03d58cccf8d8e'/>
<id>0219399a4e3a8edb428e1924e1a03d58cccf8d8e</id>
<content type='text'>
As well as fdt_subnode_offset(), libfdt includes an
fdt_subnode_offset_namelen() function that takes the subnode name to
look up not as a NUL-terminated string, but as a string with an
explicit length.  This can be useful when the caller has the name as
part of a longer string, such as a full path.

However, we don't have corresponding 'namelen' versions for
fdt_get_property() and fdt_getprop().  There are less obvious use
cases for these variants on property names, but there are
circumstances where they can be useful e.g. looking up property names
which need to be parsed from a longer string buffer such as user input
or a configuration file, or looking up an alias in a path with
IEEE1275 style aliases.

So, since it's very easy to implement such variants, this patch does
so.  The original NUL-terminated variants are, of course, implemented
in terms of the namelen versions.

Signed-off-by: David Gibson &lt;david@gibson.dropbear.id.au&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
As well as fdt_subnode_offset(), libfdt includes an
fdt_subnode_offset_namelen() function that takes the subnode name to
look up not as a NUL-terminated string, but as a string with an
explicit length.  This can be useful when the caller has the name as
part of a longer string, such as a full path.

However, we don't have corresponding 'namelen' versions for
fdt_get_property() and fdt_getprop().  There are less obvious use
cases for these variants on property names, but there are
circumstances where they can be useful e.g. looking up property names
which need to be parsed from a longer string buffer such as user input
or a configuration file, or looking up an alias in a path with
IEEE1275 style aliases.

So, since it's very easy to implement such variants, this patch does
so.  The original NUL-terminated variants are, of course, implemented
in terms of the namelen versions.

Signed-off-by: David Gibson &lt;david@gibson.dropbear.id.au&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>libfdt: Improve documentation in libfdt.h</title>
<updated>2008-08-25T02:20:49+00:00</updated>
<author>
<name>Wolfram Sang</name>
<email>w.sang@pengutronix.de</email>
</author>
<published>2008-07-09T09:22:44+00:00</published>
<link rel='alternate' type='text/html' href='http://cgit.235523.xyz/u-boot.git/commit/?id=46390da15411351fc3b498bd8c1615f78fe80df0'/>
<id>46390da15411351fc3b498bd8c1615f78fe80df0</id>
<content type='text'>
Fix a few typos and mistakes.

Signed-off-by: Wolfram Sang &lt;w.sang@pengutronix.de&gt;
Acked-by: David Gibson &lt;david@gibson.dropbear.id.au&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Fix a few typos and mistakes.

Signed-off-by: Wolfram Sang &lt;w.sang@pengutronix.de&gt;
Acked-by: David Gibson &lt;david@gibson.dropbear.id.au&gt;
</pre>
</div>
</content>
</entry>
</feed>
