]> git.dujemihanovic.xyz Git - u-boot.git/commitdiff
board/t102x: use fdt_setprop_string instead of fdt_setprop
authorShengzhou Liu <Shengzhou.Liu@freescale.com>
Tue, 14 Apr 2015 09:56:50 +0000 (17:56 +0800)
committerYork Sun <yorksun@freescale.com>
Mon, 4 May 2015 16:24:50 +0000 (09:24 -0700)
Use fdt_setprop_string instead of fdt_setprop to fix string length.

Signed-off-by: Shengzhou Liu <Shengzhou.Liu@freescale.com>
Reviewed-by: York Sun <yorksun@freescale.com>
board/freescale/t102xqds/eth_t102xqds.c
board/freescale/t102xrdb/eth_t102xrdb.c

index 7723f580db42b2ef91de6a5f06de8c2733a6bf5e..441d6a3e6142ed8903f3886fc03b460eb1397fc2 100644 (file)
@@ -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");
        }
 }
 
index dd386bc3a99324970f91a0bc6a1ba7cc16041f45..856ec6e227961d3be13f745ad55ffd82b8e45673 100644 (file)
@@ -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