Commit Graph

12 Commits

Author SHA1 Message Date
Masahiro Yamada
ae9ace7089 libfdt: migrate fdt_rw.c to a wrapper of scripts/dtc/libfdt/fdt_rw.c
The only difference between scripts/dtc/libfdt/fdt_rw.c and
lib/libfdt/fdt_rw.c is fdt_remove_unused_strings().

It is only used by fdtgrep, so we do not need to compile it for U-Boot
image.  Move it to tools/libfdt/fdw_rw.c so that lib/libfdt/fdt_rw.c
can be a wrapper of scripts/dtc/libfdt/fdt_rw.c.

Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
2018-01-28 12:27:30 -05:00
Simon Glass
93c94b889b fdt: Sync libfdt up to upstream
Add upstream changes to U-Boot:

- new pylibfdt functions
- fdt_setprop_placeholder()

Signed-off-by: Simon Glass <sjg@chromium.org>
2017-09-15 05:24:39 -06:00
Simon Glass
92688a0993 fdt: Bring in changes from v1.4.4
This a few minor changes down from upstream since the last sync.

Signed-off-by: Simon Glass <sjg@chromium.org>
2017-04-10 13:25:19 -06:00
Simon Glass
9c07b9877c libfdt: Sync up with upstream
This includes small changes to the following functions, from upstream
commit 6d1832c:

- fdt_get_max_phandle() (upstream commit 84e0e134)
- fdt_node_check_compatible (upstream commit 53bf130b)
- fdt_setprop_inplace_namelen_partial() to remove useless brackets and
     use idx instead of index
- _fdt_resize_property() to use idx instead of index
- _fdt_splice() (upstream commit d4c7c25c)

It also includes various typo fixes in libfdt.h

Signed-off-by: Simon Glass <sjg@chromium.org>
2016-10-13 13:54:10 -06:00
Masahiro Yamada
7dc0789579 libfdt: simplify fdt_del_mem_rsv()
The variable "err" is unneeded.

[ Device Tree Compiler commit: 36fd7331fb11276c09a6affc0d8cd4977f2fe100 ]

Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>
Signed-off-by: David Gibson <david@gibson.dropbear.id.au>
Acked-by: Simon Glass <sjg@chromium.org>
2016-09-23 17:53:49 -04:00
Robert P. J. Day
6feed2a5ae lib/libfdt/: General aesthetic/style fixes.
A number of style fixes across the files in this directory, including:

 * Correct invalid kernel-doc content.
 * Tidy up massive comment in fdt_region.c.
 * Use correct spelling of "U-Boot".
 * Replace tests of "! <var>" with "!<var>".
 * Replace "libfdt_env.h" with <libfdt_env.h>.

Signed-off-by: Robert P. J. Day <rpjday@crashcourse.ca>
Acked-by: Simon Glass <sjg@chromium.org>
2016-06-19 17:05:55 -06:00
Simon Glass
8f6e2e1ee1 fdt: Add a function to remove unused strings from a device tree
Property names are stored in a string table. When a node property is
removed, the string table is not updated since other nodes may have a
property with the same name.

Thus it is possible for the string table to build up a number of unused
strings. Add a function to remove these. This works by building a new device
tree from the old one, adding strings one by one as needed.

Signed-off-by: Simon Glass <sjg@chromium.org>
2015-07-21 17:39:20 -06:00
Simon Glass
0596d35d80 fdt: Sync up with libfdt
This brings in changes up to commit f9e91a48 in the libfdt repo.
Mostly this is whitespace/minor changes. But there are a few new
features:

- fdt_size_cells() and fdt_address_cells()
- fdt_resize()

Signed-off-by: Simon Glass <sjg@chromium.org>
2014-08-09 11:17:04 -04:00
Roger Meier
35084760a9 libfdt: SPDX-License-Identifier: GPL-2.0+ BSD-2-Clause
Signed-off-by: Roger Meier <roger@bufferoverflow.ch>
Acked-by: Wolfgang Denk <wd@denx.de>
2013-08-10 09:04:25 -04:00
Kim Phillips
b2ba62a1aa libfdt: update from upstream dtc commit 142419e
commit 142419e "dtc/libfdt: sparse fixes", for u-boot's libfdt copy.

Signed-off-by: Kim Phillips <kim.phillips@freescale.com>
Cc: Jerry Van Baren <gvb.uboot@gmail.com>
2013-02-07 20:38:55 -05:00
Minghuan Lian
36ad18a6db libfdt: Add support for appending the values to a existing property
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 <Minghuan.Lian@freescale.com>
Signed-off-by: David Gibson <david@gibson.dropbear.id.au>
2012-10-15 19:15:39 -04:00
Peter Tyser
0de71d5071 Move libfdt/ into lib/
Move the libfdt directory into the common lib/ directory to clean up the
top-level directory.

Signed-off-by: Peter Tyser <ptyser@xes-inc.com>
2010-04-13 09:13:04 +02:00