diff options
author | Jean-Jacques Hiblot <jjhiblot@ti.com> | 2019-10-22 10:05:22 +0200 |
---|---|---|
committer | Simon Glass <sjg@chromium.org> | 2019-10-27 13:01:53 -0600 |
commit | d60ae4c59df55c08dc96202ff58fed21ab3afb7d (patch) | |
tree | 1d22f0e91bf9091b7da037584cf12fa37f7b0ed4 /drivers/core | |
parent | 97b5f9d1a0dcae66cf7fe5e892f6dc56d14b0c21 (diff) | |
download | u-boot-d60ae4c59df55c08dc96202ff58fed21ab3afb7d.tar.gz u-boot-d60ae4c59df55c08dc96202ff58fed21ab3afb7d.tar.xz u-boot-d60ae4c59df55c08dc96202ff58fed21ab3afb7d.zip |
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 'drivers/core')
-rw-r--r-- | drivers/core/ofnode.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/core/ofnode.c b/drivers/core/ofnode.c index 297f0a0c7c..8f0eab2ca6 100644 --- a/drivers/core/ofnode.c +++ b/drivers/core/ofnode.c @@ -57,7 +57,7 @@ int ofnode_read_s32_default(ofnode node, const char *propname, s32 def) int ofnode_read_u64(ofnode node, const char *propname, u64 *outp) { - const fdt64_t *cell; + const unaligned_fdt64_t *cell; int len; assert(ofnode_valid(node)); |