aboutsummaryrefslogtreecommitdiff
path: root/lib
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 /lib
parent97b5f9d1a0dcae66cf7fe5e892f6dc56d14b0c21 (diff)
downloadu-boot-d60ae4c59df55c08dc96202ff58fed21ab3afb7d.zip
u-boot-d60ae4c59df55c08dc96202ff58fed21ab3afb7d.tar.gz
u-boot-d60ae4c59df55c08dc96202ff58fed21ab3afb7d.tar.bz2
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 'lib')
-rw-r--r--lib/fdtdec.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/fdtdec.c b/lib/fdtdec.c
index 17736ce..125d9db 100644
--- a/lib/fdtdec.c
+++ b/lib/fdtdec.c
@@ -242,7 +242,7 @@ int fdtdec_get_pci_bar32(struct udevice *dev, struct fdt_pci_addr *addr,
uint64_t fdtdec_get_uint64(const void *blob, int node, const char *prop_name,
uint64_t default_val)
{
- const uint64_t *cell64;
+ const unaligned_fdt64_t *cell64;
int length;
cell64 = fdt_getprop(blob, node, prop_name, &length);