diff options
author | Shaohui Xie <Shaohui.Xie@freescale.com> | 2015-11-10 19:20:16 +0800 |
---|---|---|
committer | York Sun <yorksun@freescale.com> | 2015-12-13 18:27:28 -0800 |
commit | 1aaf3f9ae471929a70509f86a48a61da6fbfb19f (patch) | |
tree | 66bdf60b2cb7762ee7bb105208015b36d4d3a7f3 /board | |
parent | 3901978d42b7008b13e7e9b67bea12a51cc5847b (diff) | |
download | u-boot-imx-1aaf3f9ae471929a70509f86a48a61da6fbfb19f.zip u-boot-imx-1aaf3f9ae471929a70509f86a48a61da6fbfb19f.tar.gz u-boot-imx-1aaf3f9ae471929a70509f86a48a61da6fbfb19f.tar.bz2 |
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 <Shaohui.Xie@freescale.com>
Reviewed-by: York Sun <yorksun@freescale.com>
Diffstat (limited to 'board')
-rw-r--r-- | board/freescale/common/fman.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/board/freescale/common/fman.c b/board/freescale/common/fman.c index 26cf517..b5025ab 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; |