diff options
author | Nathan Whitehorn <nwhitehorn@freebsd.org> | 2018-01-25 05:13:40 +0000 |
---|---|---|
committer | Sebastian Huber <sebastian.huber@embedded-brains.de> | 2018-07-19 07:01:11 +0200 |
commit | c13e400a31fceb64bd985ac48ef9c52b7502318b (patch) | |
tree | ea164d0991154f922a58b457a27c16b1f28d82a8 /cpukit/include/libfdt.h | |
parent | implement strnlen for systems that need it (diff) | |
download | rtems-c13e400a31fceb64bd985ac48ef9c52b7502318b.tar.bz2 |
Add limited read-only support for older (V2 and V3) device tree to libfdt.
This can be useful in particular in the kernel when booting on systems
with FDT-emitting firmware that is out of date. Releases of kexec-tools
on ppc64 prior to the end of 2014 are notable examples of such.
Signed-off-by: Nathan Whitehorn <nwhitehorn@freebsd.org>
[dwg: Some whitespace cleanups]
Signed-off-by: David Gibson <david@gibson.dropbear.id.au>
Diffstat (limited to 'cpukit/include/libfdt.h')
-rw-r--r-- | cpukit/include/libfdt.h | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/cpukit/include/libfdt.h b/cpukit/include/libfdt.h index baa882cfa1..c8c00fa865 100644 --- a/cpukit/include/libfdt.h +++ b/cpukit/include/libfdt.h @@ -54,7 +54,7 @@ #include <libfdt_env.h> #include <fdt.h> -#define FDT_FIRST_SUPPORTED_VERSION 0x10 +#define FDT_FIRST_SUPPORTED_VERSION 0x02 #define FDT_LAST_SUPPORTED_VERSION 0x11 /* Error codes: informative error codes */ @@ -527,6 +527,9 @@ int fdt_next_property_offset(const void *fdt, int offset); * offset. If lenp is non-NULL, the length of the property value is * also returned, in the integer pointed to by lenp. * + * Note that this code only works on device tree versions >= 16. fdt_getprop() + * works on all versions. + * * returns: * pointer to the structure representing the property * if lenp is non-NULL, *lenp contains the length of the property |