aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRob Herring <robh@kernel.org>2015-04-29 16:02:30 -0500
committerJulian Veit <claymore1298@gmail.com>2021-12-20 14:55:49 +0100
commit7a0d6e0851b9c2bcf62f01a60fd642c0d11f8140 (patch)
tree4476959cef42ccfd46c2f588c5b52b8c1ef654b5
parent645a3adc04e3992877eef83ed21d77f4c6e15a39 (diff)
libfdt: add fdt type definitions
In preparation for libfdt/dtc update, add the new fdt specific types. Signed-off-by: Rob Herring <robh@kernel.org> Cc: Russell King <linux@arm.linux.org.uk> Cc: Benjamin Herrenschmidt <benh@kernel.crashing.org> Cc: Paul Mackerras <paulus@samba.org> Cc: Michael Ellerman <mpe@ellerman.id.au> Cc: linux-arm-kernel@lists.infradead.org Cc: linuxppc-dev@lists.ozlabs.org
-rw-r--r--arch/arm/boot/compressed/libfdt_env.h4
-rw-r--r--arch/powerpc/boot/libfdt_env.h4
-rw-r--r--arch/powerpc/boot/of.h4
-rw-r--r--include/linux/libfdt_env.h4
4 files changed, 16 insertions, 0 deletions
diff --git a/arch/arm/boot/compressed/libfdt_env.h b/arch/arm/boot/compressed/libfdt_env.h
index 1f4e71876b0..17ae0f3efac 100644
--- a/arch/arm/boot/compressed/libfdt_env.h
+++ b/arch/arm/boot/compressed/libfdt_env.h
@@ -5,6 +5,10 @@
#include <linux/string.h>
#include <asm/byteorder.h>
+typedef __be16 fdt16_t;
+typedef __be32 fdt32_t;
+typedef __be64 fdt64_t;
+
#define fdt16_to_cpu(x) be16_to_cpu(x)
#define cpu_to_fdt16(x) cpu_to_be16(x)
#define fdt32_to_cpu(x) be32_to_cpu(x)
diff --git a/arch/powerpc/boot/libfdt_env.h b/arch/powerpc/boot/libfdt_env.h
index c89fdb1b80e..005242354f1 100644
--- a/arch/powerpc/boot/libfdt_env.h
+++ b/arch/powerpc/boot/libfdt_env.h
@@ -8,6 +8,10 @@ typedef u32 uint32_t;
typedef u64 uint64_t;
typedef unsigned long uintptr_t;
+typedef __be16 fdt16_t;
+typedef __be32 fdt32_t;
+typedef __be64 fdt64_t;
+
#define fdt16_to_cpu(x) (x)
#define cpu_to_fdt16(x) (x)
#define fdt32_to_cpu(x) (x)
diff --git a/arch/powerpc/boot/of.h b/arch/powerpc/boot/of.h
index e4c68f7391c..91195332aa1 100644
--- a/arch/powerpc/boot/of.h
+++ b/arch/powerpc/boot/of.h
@@ -18,4 +18,8 @@ int of_setprop(const void *phandle, const char *name, const void *buf,
/* Console functions */
void of_console_init(void);
+typedef u16 __be16;
+typedef u32 __be32;
+typedef u64 __be64;
+
#endif /* _PPC_BOOT_OF_H_ */
diff --git a/include/linux/libfdt_env.h b/include/linux/libfdt_env.h
index 93c452bca08..1440d26d554 100644
--- a/include/linux/libfdt_env.h
+++ b/include/linux/libfdt_env.h
@@ -6,6 +6,10 @@
#include <asm/byteorder.h>
+typedef __be16 fdt16_t;
+typedef __be32 fdt32_t;
+typedef __be64 fdt64_t;
+
#define fdt32_to_cpu(x) be32_to_cpu(x)
#define cpu_to_fdt32(x) cpu_to_be32(x)
#define fdt64_to_cpu(x) be64_to_cpu(x)