libfdt: move headers to <linux/libfdt.h> and <linux/libfdt_env.h>
Thomas reported U-Boot failed to build host tools if libfdt-devel
package is installed because tools include libfdt headers from
/usr/include/ instead of using internal ones.
This commit moves the header code:
include/libfdt.h -> include/linux/libfdt.h
include/libfdt_env.h -> include/linux/libfdt_env.h
and replaces include directives:
#include <libfdt.h> -> #include <linux/libfdt.h>
#include <libfdt_env.h> -> #include <linux/libfdt_env.h>
Reported-by: Thomas Petazzoni <thomas.petazzoni@bootlin.com>
Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>
diff --git a/common/board_info.c b/common/board_info.c
index aa45e24..16cf966 100644
--- a/common/board_info.c
+++ b/common/board_info.c
@@ -3,7 +3,7 @@
*/
#include <common.h>
-#include <libfdt.h>
+#include <linux/libfdt.h>
#include <linux/compiler.h>
int __weak checkboard(void)
diff --git a/common/boot_fit.c b/common/boot_fit.c
index add65c4..4b5cec5 100644
--- a/common/boot_fit.c
+++ b/common/boot_fit.c
@@ -11,7 +11,7 @@
#include <common.h>
#include <errno.h>
#include <image.h>
-#include <libfdt.h>
+#include <linux/libfdt.h>
static int fdt_offset(const void *fit)
{
diff --git a/common/bootm_os.c b/common/bootm_os.c
index 31b1878..5e6b177 100644
--- a/common/bootm_os.c
+++ b/common/bootm_os.c
@@ -8,7 +8,7 @@
#include <common.h>
#include <bootm.h>
#include <fdt_support.h>
-#include <libfdt.h>
+#include <linux/libfdt.h>
#include <malloc.h>
#include <vxworks.h>
diff --git a/common/bootstage.c b/common/bootstage.c
index b866e66..b1d4ee8 100644
--- a/common/bootstage.c
+++ b/common/bootstage.c
@@ -11,7 +11,7 @@
*/
#include <common.h>
-#include <libfdt.h>
+#include <linux/libfdt.h>
#include <malloc.h>
#include <linux/compiler.h>
diff --git a/common/common_fit.c b/common/common_fit.c
index 85b33d8..3fef740 100644
--- a/common/common_fit.c
+++ b/common/common_fit.c
@@ -8,7 +8,7 @@
#include <common.h>
#include <errno.h>
#include <image.h>
-#include <libfdt.h>
+#include <linux/libfdt.h>
#include <spl.h>
ulong fdt_getprop_u32(const void *fdt, int node, const char *prop)
diff --git a/common/fdt_support.c b/common/fdt_support.c
index b148536..66a313e 100644
--- a/common/fdt_support.c
+++ b/common/fdt_support.c
@@ -13,7 +13,7 @@
#include <linux/ctype.h>
#include <linux/types.h>
#include <asm/global_data.h>
-#include <libfdt.h>
+#include <linux/libfdt.h>
#include <fdt_support.h>
#include <exports.h>
#include <fdtdec.h>
diff --git a/common/image-fdt.c b/common/image-fdt.c
index 24e4c7c..25103ba 100644
--- a/common/image-fdt.c
+++ b/common/image-fdt.c
@@ -13,7 +13,7 @@
#include <fdt_support.h>
#include <errno.h>
#include <image.h>
-#include <libfdt.h>
+#include <linux/libfdt.h>
#include <mapmem.h>
#include <asm/io.h>
diff --git a/common/image.c b/common/image.c
index e9609cd..14be3ca 100644
--- a/common/image.c
+++ b/common/image.c
@@ -22,7 +22,7 @@
#include <mapmem.h>
#if IMAGE_ENABLE_FIT || IMAGE_ENABLE_OF_LIBFDT
-#include <libfdt.h>
+#include <linux/libfdt.h>
#include <fdt_support.h>
#include <fpga.h>
#include <xilinx.h>
diff --git a/common/lcd_simplefb.c b/common/lcd_simplefb.c
index d7e9fc9..81f3f42 100644
--- a/common/lcd_simplefb.c
+++ b/common/lcd_simplefb.c
@@ -11,7 +11,7 @@
#include <dm.h>
#include <lcd.h>
#include <fdt_support.h>
-#include <libfdt.h>
+#include <linux/libfdt.h>
#include <video.h>
DECLARE_GLOBAL_DATA_PTR;
diff --git a/common/spl/spl_fat.c b/common/spl/spl_fat.c
index 60b85f0..59a85a9 100644
--- a/common/spl/spl_fat.c
+++ b/common/spl/spl_fat.c
@@ -15,7 +15,7 @@
#include <fat.h>
#include <errno.h>
#include <image.h>
-#include <libfdt.h>
+#include <linux/libfdt.h>
static int fat_registered;
diff --git a/common/spl/spl_fit.c b/common/spl/spl_fit.c
index cc07fbc..b705d03 100644
--- a/common/spl/spl_fit.c
+++ b/common/spl/spl_fit.c
@@ -8,7 +8,7 @@
#include <common.h>
#include <errno.h>
#include <image.h>
-#include <libfdt.h>
+#include <linux/libfdt.h>
#include <spl.h>
#ifndef CONFIG_SYS_BOOTM_LEN
diff --git a/common/spl/spl_nand.c b/common/spl/spl_nand.c
index cd39f9b..d075985 100644
--- a/common/spl/spl_nand.c
+++ b/common/spl/spl_nand.c
@@ -9,7 +9,7 @@
#include <spl.h>
#include <asm/io.h>
#include <nand.h>
-#include <libfdt_env.h>
+#include <linux/libfdt_env.h>
#include <fdt.h>
#if defined(CONFIG_SPL_NAND_RAW_ONLY)
diff --git a/common/spl/spl_net.c b/common/spl/spl_net.c
index ef13145..50d0247 100644
--- a/common/spl/spl_net.c
+++ b/common/spl/spl_net.c
@@ -11,7 +11,7 @@
#include <errno.h>
#include <spl.h>
#include <net.h>
-#include <libfdt.h>
+#include <linux/libfdt.h>
DECLARE_GLOBAL_DATA_PTR;
diff --git a/common/spl/spl_ram.c b/common/spl/spl_ram.c
index fa8c768..d9db9f3 100644
--- a/common/spl/spl_ram.c
+++ b/common/spl/spl_ram.c
@@ -14,7 +14,7 @@
#include <binman_sym.h>
#include <mapmem.h>
#include <spl.h>
-#include <libfdt.h>
+#include <linux/libfdt.h>
#ifndef CONFIG_SPL_LOAD_FIT_ADDRESS
# define CONFIG_SPL_LOAD_FIT_ADDRESS 0
diff --git a/common/spl/spl_ymodem.c b/common/spl/spl_ymodem.c
index ff8085b..4ab3dcd 100644
--- a/common/spl/spl_ymodem.c
+++ b/common/spl/spl_ymodem.c
@@ -14,7 +14,7 @@
#include <xyzModem.h>
#include <asm/u-boot.h>
#include <asm/utils.h>
-#include <libfdt.h>
+#include <linux/libfdt.h>
#define BUF_SIZE 1024