Skip to content
Snippets Groups Projects
Commit 1aaf3f9a authored by Shaohui Xie's avatar Shaohui Xie Committed by York Sun
Browse files

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: default avatarShaohui Xie <Shaohui.Xie@freescale.com>
Reviewed-by: default avatarYork Sun <yorksun@freescale.com>
parent 3901978d
No related branches found
No related tags found
No related merge requests found
...@@ -52,6 +52,8 @@ int fdt_set_phy_handle(void *fdt, char *compat, phys_addr_t addr, ...@@ -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;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment