diff options
author | Antonio Niño Díaz <antonio.ninodiaz@arm.com> | 2018-10-24 11:30:18 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2018-10-24 11:30:18 +0200 |
commit | 799bbb1d8215d6b5f480dd093d18a0b71f2448e3 (patch) | |
tree | 1b5db4b973984235c4f6a0dddce140bd895b3ba0 /lib/libfdt/libfdt_internal.h | |
parent | dfe5c78e7a42f3360b2c9c6f12fc3838a2c1e21c (diff) | |
parent | 630b011ffd6a83436581af71d770ddd9fe01f747 (diff) | |
download | platform_external_arm-trusted-firmware-799bbb1d8215d6b5f480dd093d18a0b71f2448e3.tar.gz platform_external_arm-trusted-firmware-799bbb1d8215d6b5f480dd093d18a0b71f2448e3.tar.bz2 platform_external_arm-trusted-firmware-799bbb1d8215d6b5f480dd093d18a0b71f2448e3.zip |
Merge pull request #1643 from antonio-nino-diaz-arm/an/libfdt
Update libfdt to version 1.4.7
Diffstat (limited to 'lib/libfdt/libfdt_internal.h')
-rw-r--r-- | lib/libfdt/libfdt_internal.h | 35 |
1 files changed, 18 insertions, 17 deletions
diff --git a/lib/libfdt/libfdt_internal.h b/lib/libfdt/libfdt_internal.h index 02cfa6fb6..4109f890a 100644 --- a/lib/libfdt/libfdt_internal.h +++ b/lib/libfdt/libfdt_internal.h @@ -1,5 +1,5 @@ -#ifndef _LIBFDT_INTERNAL_H -#define _LIBFDT_INTERNAL_H +#ifndef LIBFDT_INTERNAL_H +#define LIBFDT_INTERNAL_H /* * libfdt - Flat Device Tree manipulation * Copyright (C) 2006 David Gibson, IBM Corporation. @@ -55,29 +55,30 @@ #define FDT_ALIGN(x, a) (((x) + (a) - 1) & ~((a) - 1)) #define FDT_TAGALIGN(x) (FDT_ALIGN((x), FDT_TAGSIZE)) -#define FDT_CHECK_HEADER(fdt) \ +int fdt_ro_probe_(const void *fdt); +#define FDT_RO_PROBE(fdt) \ { \ - int __err; \ - if ((__err = fdt_check_header(fdt)) != 0) \ - return __err; \ + int err_; \ + if ((err_ = fdt_ro_probe_(fdt)) != 0) \ + return err_; \ } -int _fdt_check_node_offset(const void *fdt, int offset); -int _fdt_check_prop_offset(const void *fdt, int offset); -const char *_fdt_find_string(const char *strtab, int tabsize, const char *s); -int _fdt_node_end_offset(void *fdt, int nodeoffset); +int fdt_check_node_offset_(const void *fdt, int offset); +int fdt_check_prop_offset_(const void *fdt, int offset); +const char *fdt_find_string_(const char *strtab, int tabsize, const char *s); +int fdt_node_end_offset_(void *fdt, int nodeoffset); -static inline const void *_fdt_offset_ptr(const void *fdt, int offset) +static inline const void *fdt_offset_ptr_(const void *fdt, int offset) { return (const char *)fdt + fdt_off_dt_struct(fdt) + offset; } -static inline void *_fdt_offset_ptr_w(void *fdt, int offset) +static inline void *fdt_offset_ptr_w_(void *fdt, int offset) { - return (void *)(uintptr_t)_fdt_offset_ptr(fdt, offset); + return (void *)(uintptr_t)fdt_offset_ptr_(fdt, offset); } -static inline const struct fdt_reserve_entry *_fdt_mem_rsv(const void *fdt, int n) +static inline const struct fdt_reserve_entry *fdt_mem_rsv_(const void *fdt, int n) { const struct fdt_reserve_entry *rsv_table = (const struct fdt_reserve_entry *) @@ -85,11 +86,11 @@ static inline const struct fdt_reserve_entry *_fdt_mem_rsv(const void *fdt, int return rsv_table + n; } -static inline struct fdt_reserve_entry *_fdt_mem_rsv_w(void *fdt, int n) +static inline struct fdt_reserve_entry *fdt_mem_rsv_w_(void *fdt, int n) { - return (void *)(uintptr_t)_fdt_mem_rsv(fdt, n); + return (void *)(uintptr_t)fdt_mem_rsv_(fdt, n); } #define FDT_SW_MAGIC (~FDT_MAGIC) -#endif /* _LIBFDT_INTERNAL_H */ +#endif /* LIBFDT_INTERNAL_H */ |