From: Shaohui Xie Date: Tue, 10 Nov 2015 11:20:16 +0000 (+0800) Subject: freescale: fman: make sure phy-handle property is big endian X-Git-Tag: v2016.01-rc3~23^2~23 X-Git-Url: https://git.librecmc.org/?a=commitdiff_plain;h=1aaf3f9ae471929a70509f86a48a61da6fbfb19f;p=oweals%2Fu-boot.git freescale: fman: make sure phy-handle property is big endian When creating phy-handle property, an unsigned int value is created by fdt_create_phandle, and memcpy is used to get the value, since DTS is big endian, the value cannot be used directly on little endian SoCs, it should be converted by cpu_to_fdt32. Signed-off-by: Shaohui Xie Reviewed-by: York Sun --- diff --git a/board/freescale/common/fman.c b/board/freescale/common/fman.c index 26cf5175c7..b5025ab14e 100644 --- a/board/freescale/common/fman.c +++ b/board/freescale/common/fman.c @@ -52,6 +52,8 @@ int fdt_set_phy_handle(void *fdt, char *compat, phys_addr_t addr, if (!ph) return -FDT_ERR_BADPHANDLE; + ph = cpu_to_fdt32(ph); + offset = fdt_node_offset_by_compat_reg(fdt, compat, addr); if (offset < 0) return offset;