summaryrefslogtreecommitdiff
path: root/include/libfdt.h
Commit message (Collapse)AuthorAgeLines
* libfdt: Implement fdt_get_property_namelen() and fdt_getprop_namelen()David Gibson2008-08-24-0/+30
| | | | | | | | | | | | | | | | | | | | | | 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 <david@gibson.dropbear.id.au>
* libfdt: Improve documentation in libfdt.hWolfram Sang2008-08-24-14/+14
| | | | | | | Fix a few typos and mistakes. Signed-off-by: Wolfram Sang <w.sang@pengutronix.de> Acked-by: David Gibson <david@gibson.dropbear.id.au>
* dtc: Enable and fix -Wcast-qual warningsDavid Gibson2008-08-24-4/+4
| | | | | | | | | | | | | Enabling -Wcast-qual warnings in dtc shows up a number of places where we are incorrectly discarding a const qualification. There are also some places where we are intentionally discarding the 'const', and we need an ugly cast through uintptr_t to suppress the warning. However, most of these are pretty well isolated with the *_w() functions. So in the interests of maximum safety with const qualifications, this patch enables the warnings and fixes the existing complaints. Signed-off-by: David Gibson <david@gibson.dropbear.id.au> Acked-by: Gerald Van Baren <vanbaren@cideas.com>
* Big white-space cleanup.Wolfgang Denk2008-05-21-11/+11
| | | | | | | | | | | This commit gets rid of a huge amount of silly white-space issues. Especially, all sequences of SPACEs followed by TAB characters get removed (unless they appear in print statements). Also remove all embedded "vim:" and "vi:" statements which hide indentation problems. Signed-off-by: Wolfgang Denk <wd@denx.de>
* libfdt: Add and use a node iteration helper function.David Gibson2008-03-18-0/+6
| | | | | | | | | This patch adds an fdt_next_node() function which can be used to iterate through nodes of the tree while keeping track of depth. This function is used to simplify the iteration code in a lot of other functions, and is also exported for use by library users. Signed-off-by: David Gibson <david@gibson.dropbear.id.au>
* libfdt: Add fdt_set_name() functionDavid Gibson2008-03-18-0/+26
| | | | | | | | This patch adds an fdt_set_name() function to libfdt, mirroring fdt_get_name(). This is a r/w function which alters the name of a given device tree node. Signed-off-by: David Gibson <david@gibson.dropbear.id.au>
* libfdt: Add more documentation (patch the seventh)David Gibson2008-01-08-0/+219
| | | | | | | | This patch adds more documenting comments to libfdt.h. Specifically, these document the read/write functions (not including fdt_open_into() and fdt_pack(), for now). Signed-off-by: David Gibson <david@gibson.dropbear.id.au>
* libfdt: Add more documentation (patch the sixth)David Gibson2008-01-08-0/+104
| | | | | | | This patch adds some more documenting comments to libfdt.h. Specifically this documents all the write-in-place functions. Signed-off-by: David Gibson <david@gibson.dropbear.id.au>
* Fix compile problem introduced by "cleanup" commit 3dfd708cWolfgang Denk2008-01-02-2/+2
| | | | Signed-off-by: Wolfgang Denk <wd@denx.de>
* Minor coding style cleanup.Wolfgang Denk2008-01-02-2/+2
| | | | Signed-off-by: Wolfgang Denk <wd@denx.de>
* Update libfdt from device tree compiler (dtc)Kumar Gala2007-11-21-69/+642
| | | | | | | Update libfdt to commit 8eaf5e358366017aa2e846c5038d1aa19958314e from the device tree compiler (dtc) project. Signed-off-by: Kumar Gala <galak@kernel.crashing.org>
* Removed some nonused fdt functions and moved fdt_find_and_setprop out of libfdtKumar Gala2007-11-21-6/+0
| | | | | | | | | | | | | | Removed: fdt_node_is_compatible fdt_find_node_by_type fdt_find_compatible_node To ease merge of newer libfdt as we aren't using them anywhere at this time. Also moved fdt_find_and_setprop out of libfdt into fdt_support.c for the same reason. Signed-off-by: Kumar Gala <galak@kernel.crashing.org>
* libfdt: add convenience function fdt_find_and_setprop()Grant Likely2007-09-06-0/+2
| | | | | | | Given the path to a node, fdt_find_and_setprop() allows a property value to be set directly. Signed-off-by: Grant Likely <grant.likely@secretlab.ca>
* Add fdt_find_node_by_type() and fdt_find_compatible_node() to LIBFDTGerald Van Baren2007-08-10-0/+6
| | | | | Signed-off-by: Wolfgang Grandegger <wg@grandegger.com> Acked-by: Gerald Van Baren <vanbaren@cideas.com>
* Replace fdt_node_offset() with fdt_find_node_by_path().Gerald Van Baren2007-08-10-1/+1
| | | | | | | | The new name matches more closely the kernel's name, which is also a much better description. Signed-off-by: Wolfgang Grandegger <wg@grandegger.com> Acked-by: Gerald Van Baren <vanbaren@cideas.com>
* Add some utilities to manipulate the reserved memory map.Gerald Van Baren2007-04-14-0/+5
|
* libfdt: Make fdt_check_header() publicGerald Van Baren2007-04-06-2/+5
| | | | | | | Changed _fdt_check_header() to fdt_check_header() and made it part of the interface - it is a useful routine. Also did some asthetics cleanup to the include files (headers).
* Minor cleanup.Wolfgang Denk2007-04-04-5/+5
|
* libfdt: Enhanced and published fdt_next_tag()Gerald Van Baren2007-03-31-0/+3
| | | | | | | Enhanced the formerly private function _fdt_next_tag() to allow stepping through the tree, used to produce a human-readable dump, and made it part of the published interface. Also added some comments.
* libfdt: Import libfdt source (1 of 2)Gerald Van Baren2007-03-31-0/+135
This adds the applicable libfdt source files (unmodified) and a README to explain where the source came from.