* [U-Boot] [PATCH] armv8: ls1043aqds: make sure fixed-link property is big endian
@ 2016-03-25 3:36 shh.xie at gmail.com
2016-04-06 17:25 ` York Sun
0 siblings, 1 reply; 2+ messages in thread
From: shh.xie at gmail.com @ 2016-03-25 3:36 UTC (permalink / raw)
To: u-boot
From: Shaohui Xie <Shaohui.Xie@nxp.com>
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.
Signed-off-by: Shaohui Xie <Shaohui.Xie@nxp.com>
---
board/freescale/ls1043aqds/eth.c | 12 ++++++------
1 file changed, 6 insertions(+), 6 deletions(-)
diff --git a/board/freescale/ls1043aqds/eth.c b/board/freescale/ls1043aqds/eth.c
index 67b4afe..bf26376 100644
--- a/board/freescale/ls1043aqds/eth.c
+++ b/board/freescale/ls1043aqds/eth.c
@@ -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 */
--
2.1.0.27.g96db324
^ permalink raw reply related [flat|nested] 2+ messages in thread
* [U-Boot] [PATCH] armv8: ls1043aqds: make sure fixed-link property is big endian
2016-03-25 3:36 [U-Boot] [PATCH] armv8: ls1043aqds: make sure fixed-link property is big endian shh.xie at gmail.com
@ 2016-04-06 17:25 ` York Sun
0 siblings, 0 replies; 2+ messages in thread
From: York Sun @ 2016-04-06 17:25 UTC (permalink / raw)
To: u-boot
On 03/24/2016 08:46 PM, shh.xie at gmail.com wrote:
> From: Shaohui Xie <Shaohui.Xie@nxp.com>
>
> 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.
>
> Signed-off-by: Shaohui Xie <Shaohui.Xie@nxp.com>
> ---
> board/freescale/ls1043aqds/eth.c | 12 ++++++------
> 1 file changed, 6 insertions(+), 6 deletions(-)
>
Applied to u-boot-fsl-qoriq master. Awaiting upstream.
Thanks.
York
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2016-04-06 17:25 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-03-25 3:36 [U-Boot] [PATCH] armv8: ls1043aqds: make sure fixed-link property is big endian shh.xie at gmail.com
2016-04-06 17:25 ` York Sun
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.