[U-Boot] [PATCH v2 7/9] fdt_support: fix an endian bug of fdt_fixup_memory_banks

Simon Glass sjg at chromium.org
Sat May 24 03:28:03 CEST 2014


On 17 April 2014 22:41, Masahiro Yamada <yamada.m at jp.panasonic.com> wrote:
> Data written to DTB must be converted to big endian order.
> It is usually done by using cpu_to_fdt32(), cpu_to_fdt64(), etc.
>
> fdt_fixup_memory_banks() invoked write_cell(), which always
> swaps byte order.
> It means the function only worked on little endian architectures.
>
> This commit adds and uses a new helper function, fdt_pack_reg(),
> which works on both big endian and little endian architrectures.
>
> Signed-off-by: Masahiro Yamada <yamada.m at jp.panasonic.com>

Acked-by: Simon Glass <sjg at chromium.org>

> ---
>
> Changes in v2: None
>
>  common/fdt_support.c | 42 ++++++++++++++++++++++++++++++------------
>  1 file changed, 30 insertions(+), 12 deletions(-)
>


More information about the U-Boot mailing list