summaryrefslogtreecommitdiff
path: root/include/linux
diff options
context:
space:
mode:
authorJean-Jacques Hiblot <jjhiblot@ti.com>2019-10-22 10:05:22 +0200
committerSimon Glass <sjg@chromium.org>2019-10-27 13:01:53 -0600
commitd60ae4c59df55c08dc96202ff58fed21ab3afb7d (patch)
tree1d22f0e91bf9091b7da037584cf12fa37f7b0ed4 /include/linux
parent97b5f9d1a0dcae66cf7fe5e892f6dc56d14b0c21 (diff)
fdt: Fix alignment issue when reading 64-bits properties from fdt
The FDT specification [0] gives a requirement of aligning properties on 32-bits. Make sure that the compiler is aware of this constraint when accessing 64-bits properties. [0]: https://github.com/devicetree-org/devicetree-specification/blob/master/source/flattened-format.rst Signed-off-by: Jean-Jacques Hiblot <jjhiblot@ti.com> Reviewed-by: Simon Glass <sjg@chromium.org>
Diffstat (limited to 'include/linux')
-rw-r--r--include/linux/libfdt_env.h1
1 files changed, 1 insertions, 0 deletions
diff --git a/include/linux/libfdt_env.h b/include/linux/libfdt_env.h
index e2bf79c7ee..e49fcd72bd 100644
--- a/include/linux/libfdt_env.h
+++ b/include/linux/libfdt_env.h
@@ -16,6 +16,7 @@
typedef __be16 fdt16_t;
typedef __be32 fdt32_t;
typedef __be64 fdt64_t;
+typedef __be64 unaligned_fdt64_t __aligned(4);
#define fdt32_to_cpu(x) be32_to_cpu(x)
#define cpu_to_fdt32(x) cpu_to_be32(x)