mirror of
https://github.com/smaeul/u-boot.git
synced 2025-11-18 01:40:58 +00:00
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>
This commit is contained in:
parent
3901978d42
commit
1aaf3f9ae4
@ -52,6 +52,8 @@ int fdt_set_phy_handle(void *fdt, char *compat, phys_addr_t addr,
|
|||||||
if (!ph)
|
if (!ph)
|
||||||
return -FDT_ERR_BADPHANDLE;
|
return -FDT_ERR_BADPHANDLE;
|
||||||
|
|
||||||
|
ph = cpu_to_fdt32(ph);
|
||||||
|
|
||||||
offset = fdt_node_offset_by_compat_reg(fdt, compat, addr);
|
offset = fdt_node_offset_by_compat_reg(fdt, compat, addr);
|
||||||
if (offset < 0)
|
if (offset < 0)
|
||||||
return offset;
|
return offset;
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user