mirror of
https://github.com/u-boot/u-boot.git
synced 2025-05-09 03:21:51 +00:00
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>
This commit is contained in:
parent
97b5f9d1a0
commit
d60ae4c59d
4 changed files with 4 additions and 3 deletions
|
@ -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));
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue