Skip to contentSkip to conversation

armv8: ls1043aqds: make sure fixed-link property is big endian

PATCH New shh.xie at gmail.com 2 participants 2 messages Mar 25, 2016 – Apr 6, 2016

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 armv8: ls1043aqds: make sure fixed-link property is big endian

From: Shaohui Xie <[email protected]>

When setting fixed-link property to DTS, the values should be converted with using cpu_to_fdt32 so that to have correct value on little endian Soc.

---
 board/freescale/ls1043aqds/eth.c | 12 ++++++------
 1 file changed, 6 insertions(+), 6 deletions(-)
board/freescale/ls1043aqds/eth.c +6 -6
index 67b4afe..bf26376 100644
@@ -176,9 +176,9 @@ void board_ft_fman_fixup_port(void *fdt, char *compat, phys_addr_t addr,
 	} else if (fm_info_get_enet_if(port) ==
 		   PHY_INTERFACE_MODE_SGMII_2500) {
 		/* 2.5G SGMII interface */
-		f_link.phy_id = port;
-		f_link.duplex = 1;
-		f_link.link_speed = 1000;
+		f_link.phy_id = cpu_to_fdt32(port);
+		f_link.duplex = cpu_to_fdt32(1);
+		f_link.link_speed = cpu_to_fdt32(1000);
 		f_link.pause = 0;
 		f_link.asym_pause = 0;
 		/* no PHY for 2.5G SGMII */
@@ -241,9 +241,9 @@ void board_ft_fman_fixup_port(void *fdt, char *compat, phys_addr_t addr,
 	} else if (fm_info_get_enet_if(port) == PHY_INTERFACE_MODE_XGMII &&
 		   port == FM1_10GEC1) {
 		/* XFI interface */
-		f_link.phy_id = port;
-		f_link.duplex = 1;
-		f_link.link_speed = 10000;
+		f_link.phy_id = cpu_to_fdt32(port);
+		f_link.duplex = cpu_to_fdt32(1);
+		f_link.link_speed = cpu_to_fdt32(10000);
 		f_link.pause = 0;
 		f_link.asym_pause = 0;
 		/* no PHY for XFI */
Signature · 1 line
2.1.0.27.g96db324
#1 lore raw

PATCH 1/1 armv8: ls1043aqds: make sure fixed-link property is big endian

Quoted 11 lines · shh.xie at gmail.com

From: Shaohui Xie <[email protected]>

When setting fixed-link property to DTS, the values should be converted with using cpu_to_fdt32 so that to have correct value on little endian Soc.

---
 board/freescale/ls1043aqds/eth.c | 12 ++++++------
 1 file changed, 6 insertions(+), 6 deletions(-)

Applied to u-boot-fsl-qoriq master. Awaiting upstream. Thanks.

York