All of lore.kernel.org
 help / color / mirror / Atom feed
* [U-Boot] [PATCH] board/t102x: use fdt_setprop_string instead of fdt_setprop
@ 2015-04-14  9:56 Shengzhou Liu
  2015-05-05 16:35 ` York Sun
  0 siblings, 1 reply; 2+ messages in thread
From: Shengzhou Liu @ 2015-04-14  9:56 UTC (permalink / raw)
  To: u-boot

Use fdt_setprop_string instead of fdt_setprop to fix string length.

Signed-off-by: Shengzhou Liu <Shengzhou.Liu@freescale.com>
---
 board/freescale/t102xqds/eth_t102xqds.c | 9 +++++----
 board/freescale/t102xrdb/eth_t102xrdb.c | 4 ++--
 2 files changed, 7 insertions(+), 6 deletions(-)

diff --git a/board/freescale/t102xqds/eth_t102xqds.c b/board/freescale/t102xqds/eth_t102xqds.c
index 7723f58..441d6a3 100644
--- a/board/freescale/t102xqds/eth_t102xqds.c
+++ b/board/freescale/t102xqds/eth_t102xqds.c
@@ -172,8 +172,8 @@ void board_ft_fman_fixup_port(void *fdt, char *compat, phys_addr_t addr,
 	if (fm_info_get_enet_if(port) == PHY_INTERFACE_MODE_RGMII) {
 		if (port == FM1_DTSEC3) {
 			fdt_set_phy_handle(fdt, compat, addr, "rgmii_phy2");
-			fdt_setprop(fdt, offset, "phy-connection-type",
-				    "rgmii", 5);
+			fdt_setprop_string(fdt, offset, "phy-connection-type",
+					   "rgmii");
 			fdt_status_okay_by_alias(fdt, "emi1_rgmii1");
 		}
 	} else if (fm_info_get_enet_if(port) == PHY_INTERFACE_MODE_SGMII) {
@@ -207,7 +207,8 @@ void board_ft_fman_fixup_port(void *fdt, char *compat, phys_addr_t addr,
 			break;
 		}
 		fdt_delprop(fdt, offset, "phy-connection-type");
-		fdt_setprop(fdt, offset, "phy-connection-type", "qsgmii", 6);
+		fdt_setprop_string(fdt, offset, "phy-connection-type",
+				   "qsgmii");
 		fdt_status_okay_by_alias(fdt, "emi1_slot2");
 	} else if (fm_info_get_enet_if(port) == PHY_INTERFACE_MODE_XGMII) {
 		/* XFI interface */
@@ -219,7 +220,7 @@ void board_ft_fman_fixup_port(void *fdt, char *compat, phys_addr_t addr,
 		/* no PHY for XFI */
 		fdt_delprop(fdt, offset, "phy-handle");
 		fdt_setprop(fdt, offset, "fixed-link", &f_link, sizeof(f_link));
-		fdt_setprop(fdt, offset, "phy-connection-type", "xgmii", 5);
+		fdt_setprop_string(fdt, offset, "phy-connection-type", "xgmii");
 	}
 }
 
diff --git a/board/freescale/t102xrdb/eth_t102xrdb.c b/board/freescale/t102xrdb/eth_t102xrdb.c
index dd386bc..856ec6e 100644
--- a/board/freescale/t102xrdb/eth_t102xrdb.c
+++ b/board/freescale/t102xrdb/eth_t102xrdb.c
@@ -133,8 +133,8 @@ void board_ft_fman_fixup_port(void *fdt, char *compat, phys_addr_t addr,
 	     (fm_info_get_enet_if(port) == PHY_INTERFACE_MODE_SGMII)) &&
 			(port == FM1_DTSEC3)) {
 		fdt_set_phy_handle(fdt, compat, addr, "sg_2500_aqr105_phy4");
-		fdt_setprop(fdt, offset, "phy-connection-type",
-			    "sgmii-2500", 10);
+		fdt_setprop_string(fdt, offset, "phy-connection-type",
+				   "sgmii-2500");
 		fdt_status_disabled_by_alias(fdt, "xg_aqr105_phy3");
 	}
 #endif
-- 
2.1.0.27.g96db324

^ permalink raw reply related	[flat|nested] 2+ messages in thread

* [U-Boot] [PATCH] board/t102x: use fdt_setprop_string instead of fdt_setprop
  2015-04-14  9:56 [U-Boot] [PATCH] board/t102x: use fdt_setprop_string instead of fdt_setprop Shengzhou Liu
@ 2015-05-05 16:35 ` York Sun
  0 siblings, 0 replies; 2+ messages in thread
From: York Sun @ 2015-05-05 16:35 UTC (permalink / raw)
  To: u-boot



On 04/14/2015 02:56 AM, Shengzhou Liu wrote:
> Use fdt_setprop_string instead of fdt_setprop to fix string length.
> 
> Signed-off-by: Shengzhou Liu <Shengzhou.Liu@freescale.com>
> ---
>  board/freescale/t102xqds/eth_t102xqds.c | 9 +++++----
>  board/freescale/t102xrdb/eth_t102xrdb.c | 4 ++--
>  2 files changed, 7 insertions(+), 6 deletions(-)
> 

Applied to u-boot-mpc85xx master. Awaiting upstream.

York

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2015-05-05 16:35 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-04-14  9:56 [U-Boot] [PATCH] board/t102x: use fdt_setprop_string instead of fdt_setprop Shengzhou Liu
2015-05-05 16:35 ` 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.