diff options
author | Masahiro Yamada <yamada.masahiro@socionext.com> | 2017-10-17 22:30:17 +0900 |
---|---|---|
committer | Tom Rini <trini@konsulko.com> | 2017-11-17 07:44:13 -0500 |
commit | 35a33baea59210924bceedabcfba794f0fed59dd (patch) | |
tree | c614fc7414ddbd7438c34b9bbbf5755c9e80c210 /lib | |
parent | 9e65b01ac57f7be2bbc17c9f4c0ee43fab22221e (diff) | |
download | u-boot-35a33baea59210924bceedabcfba794f0fed59dd.zip u-boot-35a33baea59210924bceedabcfba794f0fed59dd.tar.gz u-boot-35a33baea59210924bceedabcfba794f0fed59dd.tar.bz2 |
libfdt: change libfdt_internal.h to a wrapper of scripts/dtc/libfdt/*
Fortunately, U-Boot did not modify libfdt_internal.h locally.
Change it to a wrapper of scripts/dtc/libfdt/fdt.h, which will be
periodically synced with the upstream DTC (or kernel).
Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>
Diffstat (limited to 'lib')
-rw-r--r-- | lib/libfdt/libfdt_internal.h | 51 |
1 files changed, 1 insertions, 50 deletions
diff --git a/lib/libfdt/libfdt_internal.h b/lib/libfdt/libfdt_internal.h index 9a79fe8..5197c5d 100644 --- a/lib/libfdt/libfdt_internal.h +++ b/lib/libfdt/libfdt_internal.h @@ -1,50 +1 @@ -#ifndef _LIBFDT_INTERNAL_H -#define _LIBFDT_INTERNAL_H -/* - * libfdt - Flat Device Tree manipulation - * Copyright (C) 2006 David Gibson, IBM Corporation. - * SPDX-License-Identifier: GPL-2.0+ BSD-2-Clause - */ -#include <fdt.h> - -#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 __err; \ - if ((__err = fdt_check_header(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); - -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) -{ - return (void *)(uintptr_t)_fdt_offset_ptr(fdt, offset); -} - -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 *) - ((const char *)fdt + fdt_off_mem_rsvmap(fdt)); - - return rsv_table + n; -} -static inline struct fdt_reserve_entry *_fdt_mem_rsv_w(void *fdt, int n) -{ - return (void *)(uintptr_t)_fdt_mem_rsv(fdt, n); -} - -#define FDT_SW_MAGIC (~FDT_MAGIC) - -#endif /* _LIBFDT_INTERNAL_H */ +#include "../../scripts/dtc/libfdt/libfdt_internal.h" |