diff options
| author | Stefano Babic <sbabic@denx.de> | 2014-09-22 15:51:01 +0200 |
|---|---|---|
| committer | Stefano Babic <sbabic@denx.de> | 2014-09-22 15:51:01 +0200 |
| commit | 42817eb85de1d7dec399c75dbd133ea6b5351a72 (patch) | |
| tree | cf93368fd5642cc995055f764103f85d7abbedf1 /lib | |
| parent | 7a56bddd7fb9fe27c775cadd18ebde6f883d7cff (diff) | |
| parent | 2a8c9c86b92a9ccee3c27286de317e19bb0530b3 (diff) | |
Merge branch 'master' of git://git.denx.de/u-boot-arm
Diffstat (limited to 'lib')
| -rw-r--r-- | lib/fdtdec.c | 15 | ||||
| -rw-r--r-- | lib/list_sort.c | 1 | ||||
| -rw-r--r-- | lib/rbtree.c | 1 |
3 files changed, 15 insertions, 2 deletions
diff --git a/lib/fdtdec.c b/lib/fdtdec.c index c2f3645253..06d4542029 100644 --- a/lib/fdtdec.c +++ b/lib/fdtdec.c @@ -382,6 +382,21 @@ int fdtdec_get_alias_node(const void *blob, const char *name) return fdt_path_offset(blob, prop); } +int fdtdec_get_chosen_node(const void *blob, const char *name) +{ + const char *prop; + int chosen_node; + int len; + + if (!blob) + return -FDT_ERR_NOTFOUND; + chosen_node = fdt_path_offset(blob, "/chosen"); + prop = fdt_getprop(blob, chosen_node, name, &len); + if (!prop) + return -FDT_ERR_NOTFOUND; + return fdt_path_offset(blob, prop); +} + int fdtdec_check_fdt(void) { /* diff --git a/lib/list_sort.c b/lib/list_sort.c index 81de0a17de..e841da53ee 100644 --- a/lib/list_sort.c +++ b/lib/list_sort.c @@ -1,4 +1,3 @@ -#define __UBOOT__ #ifndef __UBOOT__ #include <linux/kernel.h> #include <linux/module.h> diff --git a/lib/rbtree.c b/lib/rbtree.c index 9e52f70d17..5de3bf4026 100644 --- a/lib/rbtree.c +++ b/lib/rbtree.c @@ -9,7 +9,6 @@ linux/lib/rbtree.c */ -#define __UBOOT__ #include <linux/rbtree_augmented.h> #ifndef __UBOOT__ #include <linux/export.h> |
