diff options
author | Tom Rini <trini@konsulko.com> | 2024-04-12 12:50:57 -0600 |
---|---|---|
committer | Tom Rini <trini@konsulko.com> | 2024-04-12 12:50:57 -0600 |
commit | ef8ef5f77c9a998f76a48277a883af1645b54117 (patch) | |
tree | 52fdcdbbf87dfa777fa87e8ac9e27577003f5d0a /boot/fdt_support.c | |
parent | d5e6401011a269328d3ea69468532b4125fd2bb9 (diff) | |
parent | 4341fb73326907faecfc9e3b711bbfcd3937b525 (diff) |
Merge branch '2024-04-12-assorted-updates'
- Assorted sandbox fixes, cleanup some of the partition table code and a
few other fixes
Diffstat (limited to 'boot/fdt_support.c')
-rw-r--r-- | boot/fdt_support.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/boot/fdt_support.c b/boot/fdt_support.c index 090d82ee80a..9844c70be80 100644 --- a/boot/fdt_support.c +++ b/boot/fdt_support.c @@ -17,6 +17,7 @@ #include <linux/ctype.h> #include <linux/types.h> #include <asm/global_data.h> +#include <asm/unaligned.h> #include <linux/libfdt.h> #include <fdt_support.h> #include <exports.h> @@ -421,13 +422,13 @@ static int fdt_pack_reg(const void *fdt, void *buf, u64 *address, u64 *size, for (i = 0; i < n; i++) { if (address_cells == 2) - *(fdt64_t *)p = cpu_to_fdt64(address[i]); + put_unaligned_be64(address[i], p); else *(fdt32_t *)p = cpu_to_fdt32(address[i]); p += 4 * address_cells; if (size_cells == 2) - *(fdt64_t *)p = cpu_to_fdt64(size[i]); + put_unaligned_be64(size[i], p); else *(fdt32_t *)p = cpu_to_fdt32(size[i]); p += 4 * size_cells; |