Skip to content

Commit 69f3bac

Browse files
robherringZile995
authored andcommitted
BACKPORT: 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 Signed-off-by: Albert I <kras@raphielgang.org>
1 parent 234b2fb commit 69f3bac

File tree

4 files changed

+14
-0
lines changed

4 files changed

+14
-0
lines changed

arch/arm/boot/compressed/libfdt_env.h

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,10 @@
55
#include <linux/string.h>
66
#include <asm/byteorder.h>
77

8+
typedef __be16 fdt16_t;
9+
typedef __be32 fdt32_t;
10+
typedef __be64 fdt64_t;
11+
812
#define fdt16_to_cpu(x) be16_to_cpu(x)
913
#define cpu_to_fdt16(x) cpu_to_be16(x)
1014
#define fdt32_to_cpu(x) be32_to_cpu(x)

arch/powerpc/boot/libfdt_env.h

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,10 @@ typedef u32 uint32_t;
88
typedef u64 uint64_t;
99
typedef unsigned long uintptr_t;
1010

11+
typedef __be16 fdt16_t;
12+
typedef __be32 fdt32_t;
13+
typedef __be64 fdt64_t;
14+
1115
#define fdt16_to_cpu(x) (x)
1216
#define cpu_to_fdt16(x) (x)
1317
#define fdt32_to_cpu(x) (x)

arch/powerpc/boot/of.h

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,9 @@ int of_setprop(const void *phandle, const char *name, const void *buf,
2121
/* Console functions */
2222
void of_console_init(void);
2323

24+
typedef u16 __be16;
2425
typedef u32 __be32;
26+
typedef u64 __be64;
2527

2628
#ifdef __LITTLE_ENDIAN__
2729
#define cpu_to_be32(x) swab32(x)

include/linux/libfdt_env.h

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,10 @@
66

77
#include <asm/byteorder.h>
88

9+
typedef __be16 fdt16_t;
10+
typedef __be32 fdt32_t;
11+
typedef __be64 fdt64_t;
12+
913
#define fdt32_to_cpu(x) be32_to_cpu(x)
1014
#define cpu_to_fdt32(x) cpu_to_be32(x)
1115
#define fdt64_to_cpu(x) be64_to_cpu(x)

0 commit comments

Comments
 (0)