From: Wolfgang Denk Date: Wed, 27 Sep 2017 16:15:22 +0200 Subject: [U-Boot] [PATCH 3/5] Revert "scripts/dtc: Update to upstream version v1.4.4-50-gfe50bd1ecc1d" In-Reply-To: <20170927141524.5920-1-wd@denx.de> References: <1506263222-7080-1-git-send-email-trini@konsulko.com> <20170927141524.5920-1-wd@denx.de> Message-ID: <20170927141524.5920-4-wd@denx.de> List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="windows-1252" Content-Transfer-Encoding: quoted-printable To: u-boot@lists.denx.de This reverts commit 2d4c2259930b91fe5e7a2f92db32c03fe640ed60. This patch is part of a series which has never been reviewed and has not been generally accepted by the community. Signed-off-by: Wolfgang Denk Cc: Albert Aribaud Cc: Alexander Graf Cc: Alexey Brodkin Cc: Anatolij Gustschin Cc: Andre Przywara , Cc: Andreas Bie=C3=9Fmann Cc: Angelo Dureghello Cc: Bin Meng Cc: Daniel Hellstrom Cc: Daniel Schwierzeck Cc: Heiko Schocher Cc: Heinrich Schuchardt Cc: Huan Wang Cc: Jagan Teki Cc: Joe Hershberger Cc: Kim Phillips Cc: Kyungmin Park Cc: Lukasz Majewski Cc: Macpaul Lin Cc: Marek Vasut Cc: Marek Vasut Cc: Masahiro Yamada Cc: Michal Simek Cc: Minkyu Kang Cc: Nobuhiro Iwamatsu Cc: Pantelis Antoniou Cc: Prafulla Wadaskar Cc: Przemyslaw Marczak Cc: Robert Nelson Cc: Scott Wood Cc: Simon Glass Cc: Sonic Zhang Cc: Stanislav Galabov Cc: Stefan Roese Cc: Stefano Babic Cc: Stephen Warren Cc: Thomas Chou Cc: Tom Rini Cc: Tom Warren Cc: u-boot at lists.denx.de Cc: Vagrant Cascadian Cc: Vipin Kumar Cc: York Sun --- scripts/dtc/checks.c | 231 --------------------------------= ---- scripts/dtc/dtc.c | 2 +- scripts/dtc/dtc.h | 6 - scripts/dtc/libfdt/fdt_empty_tree.c | 1 + scripts/dtc/libfdt/fdt_ro.c | 4 +- scripts/dtc/libfdt/fdt_rw.c | 24 +--- scripts/dtc/libfdt/fdt_sw.c | 16 +-- scripts/dtc/libfdt/fdt_wip.c | 4 +- scripts/dtc/libfdt/libfdt.h | 68 +---------- scripts/dtc/livetree.c | 3 +- scripts/dtc/version_gen.h | 2 +- 11 files changed, 16 insertions(+), 345 deletions(-) diff --git a/scripts/dtc/checks.c b/scripts/dtc/checks.c index afabf64337..38f548e582 100644 --- a/scripts/dtc/checks.c +++ b/scripts/dtc/checks.c @@ -681,229 +681,6 @@ static void check_ranges_format(struct check *c, stru= ct dt_info *dti, } WARNING(ranges_format, check_ranges_format, NULL, &addr_size_cells); =20 -static const struct bus_type pci_bus =3D { - .name =3D "PCI", -}; - -static void check_pci_bridge(struct check *c, struct dt_info *dti, struct = node *node) -{ - struct property *prop; - cell_t *cells; - - prop =3D get_property(node, "device_type"); - if (!prop || !streq(prop->val.val, "pci")) - return; - - node->bus =3D &pci_bus; - - if (!strneq(node->name, "pci", node->basenamelen) && - !strneq(node->name, "pcie", node->basenamelen)) - FAIL(c, dti, "Node %s node name is not \"pci\" or \"pcie\"", - node->fullpath); - - prop =3D get_property(node, "ranges"); - if (!prop) - FAIL(c, dti, "Node %s missing ranges for PCI bridge (or not a bridge)", - node->fullpath); - - if (node_addr_cells(node) !=3D 3) - FAIL(c, dti, "Node %s incorrect #address-cells for PCI bridge", - node->fullpath); - if (node_size_cells(node) !=3D 2) - FAIL(c, dti, "Node %s incorrect #size-cells for PCI bridge", - node->fullpath); - - prop =3D get_property(node, "bus-range"); - if (!prop) { - FAIL(c, dti, "Node %s missing bus-range for PCI bridge", - node->fullpath); - return; - } - if (prop->val.len !=3D (sizeof(cell_t) * 2)) { - FAIL(c, dti, "Node %s bus-range must be 2 cells", - node->fullpath); - return; - } - cells =3D (cell_t *)prop->val.val; - if (fdt32_to_cpu(cells[0]) > fdt32_to_cpu(cells[1])) - FAIL(c, dti, "Node %s bus-range 1st cell must be less than or equal to 2= nd cell", - node->fullpath); - if (fdt32_to_cpu(cells[1]) > 0xff) - FAIL(c, dti, "Node %s bus-range maximum bus number must be less than 256= ", - node->fullpath); -} -WARNING(pci_bridge, check_pci_bridge, NULL, - &device_type_is_string, &addr_size_cells); - -static void check_pci_device_bus_num(struct check *c, struct dt_info *dti,= struct node *node) -{ - struct property *prop; - unsigned int bus_num, min_bus, max_bus; - cell_t *cells; - - if (!node->parent || (node->parent->bus !=3D &pci_bus)) - return; - - prop =3D get_property(node, "reg"); - if (!prop) - return; - - cells =3D (cell_t *)prop->val.val; - bus_num =3D (fdt32_to_cpu(cells[0]) & 0x00ff0000) >> 16; - - prop =3D get_property(node->parent, "bus-range"); - if (!prop) { - min_bus =3D max_bus =3D 0; - } else { - cells =3D (cell_t *)prop->val.val; - min_bus =3D fdt32_to_cpu(cells[0]); - max_bus =3D fdt32_to_cpu(cells[0]); - } - if ((bus_num < min_bus) || (bus_num > max_bus)) - FAIL(c, dti, "Node %s PCI bus number %d out of range, expected (%d - %d)= ", - node->fullpath, bus_num, min_bus, max_bus); -} -WARNING(pci_device_bus_num, check_pci_device_bus_num, NULL, ®_format, &= pci_bridge); - -static void check_pci_device_reg(struct check *c, struct dt_info *dti, str= uct node *node) -{ - struct property *prop; - const char *unitname =3D get_unitname(node); - char unit_addr[5]; - unsigned int dev, func, reg; - cell_t *cells; - - if (!node->parent || (node->parent->bus !=3D &pci_bus)) - return; - - prop =3D get_property(node, "reg"); - if (!prop) { - FAIL(c, dti, "Node %s missing PCI reg property", node->fullpath); - return; - } - - cells =3D (cell_t *)prop->val.val; - if (cells[1] || cells[2]) - FAIL(c, dti, "Node %s PCI reg config space address cells 2 and 3 must be= 0", - node->fullpath); - - reg =3D fdt32_to_cpu(cells[0]); - dev =3D (reg & 0xf800) >> 11; - func =3D (reg & 0x700) >> 8; - - if (reg & 0xff000000) - FAIL(c, dti, "Node %s PCI reg address is not configuration space", - node->fullpath); - if (reg & 0x000000ff) - FAIL(c, dti, "Node %s PCI reg config space address register number must = be 0", - node->fullpath); - - if (func =3D=3D 0) { - snprintf(unit_addr, sizeof(unit_addr), "%x", dev); - if (streq(unitname, unit_addr)) - return; - } - - snprintf(unit_addr, sizeof(unit_addr), "%x,%x", dev, func); - if (streq(unitname, unit_addr)) - return; - - FAIL(c, dti, "Node %s PCI unit address format error, expected \"%s\"", - node->fullpath, unit_addr); -} -WARNING(pci_device_reg, check_pci_device_reg, NULL, ®_format, &pci_brid= ge); - -static const struct bus_type simple_bus =3D { - .name =3D "simple-bus", -}; - -static bool node_is_compatible(struct node *node, const char *compat) -{ - struct property *prop; - const char *str, *end; - - prop =3D get_property(node, "compatible"); - if (!prop) - return false; - - for (str =3D prop->val.val, end =3D str + prop->val.len; str < end; - str +=3D strnlen(str, end - str) + 1) { - if (strneq(str, compat, end - str)) - return true; - } - return false; -} - -static void check_simple_bus_bridge(struct check *c, struct dt_info *dti, = struct node *node) -{ - if (node_is_compatible(node, "simple-bus")) - node->bus =3D &simple_bus; -} -WARNING(simple_bus_bridge, check_simple_bus_bridge, NULL, &addr_size_cells= ); - -static void check_simple_bus_reg(struct check *c, struct dt_info *dti, str= uct node *node) -{ - struct property *prop; - const char *unitname =3D get_unitname(node); - char unit_addr[17]; - unsigned int size; - uint64_t reg =3D 0; - cell_t *cells =3D NULL; - - if (!node->parent || (node->parent->bus !=3D &simple_bus)) - return; - - prop =3D get_property(node, "reg"); - if (prop) - cells =3D (cell_t *)prop->val.val; - else { - prop =3D get_property(node, "ranges"); - if (prop && prop->val.len) - /* skip of child address */ - cells =3D ((cell_t *)prop->val.val) + node_addr_cells(node); - } - - if (!cells) { - if (node->parent->parent && !(node->bus =3D=3D &simple_bus)) - FAIL(c, dti, "Node %s missing or empty reg/ranges property", node->full= path); - return; - } - - size =3D node_addr_cells(node->parent); - while (size--) - reg =3D (reg << 32) | fdt32_to_cpu(*(cells++)); - - snprintf(unit_addr, sizeof(unit_addr), "%"PRIx64, reg); - if (!streq(unitname, unit_addr)) - FAIL(c, dti, "Node %s simple-bus unit address format error, expected \"%= s\"", - node->fullpath, unit_addr); -} -WARNING(simple_bus_reg, check_simple_bus_reg, NULL, ®_format, &simple_b= us_bridge); - -static void check_unit_address_format(struct check *c, struct dt_info *dti, - struct node *node) -{ - const char *unitname =3D get_unitname(node); - - if (node->parent && node->parent->bus) - return; - - if (!unitname[0]) - return; - - if (!strncmp(unitname, "0x", 2)) { - FAIL(c, dti, "Node %s unit name should not have leading \"0x\"", - node->fullpath); - /* skip over 0x for next test */ - unitname +=3D 2; - } - if (unitname[0] =3D=3D '0' && isxdigit(unitname[1])) - FAIL(c, dti, "Node %s unit name should not have leading 0s", - node->fullpath); -} -WARNING(unit_address_format, check_unit_address_format, NULL, - &node_name_format, &pci_bridge, &simple_bus_bridge); - /* * Style checks */ @@ -975,14 +752,6 @@ static struct check *check_table[] =3D { &addr_size_cells, ®_format, &ranges_format, =20 &unit_address_vs_reg, - &unit_address_format, - - &pci_bridge, - &pci_device_reg, - &pci_device_bus_num, - - &simple_bus_bridge, - &simple_bus_reg, =20 &avoid_default_addr_size, &obsolete_chosen_interrupt_controller, diff --git a/scripts/dtc/dtc.c b/scripts/dtc/dtc.c index 5ed873c72a..f5eed9d72c 100644 --- a/scripts/dtc/dtc.c +++ b/scripts/dtc/dtc.c @@ -31,7 +31,7 @@ int reservenum; /* Number of memory reservation slots */ int minsize; /* Minimum blob size */ int padsize; /* Additional padding to blob */ int alignsize; /* Additional padding to blob accroding to the alignsize */ -int phandle_format =3D PHANDLE_EPAPR; /* Use linux,phandle or phandle prop= erties */ +int phandle_format =3D PHANDLE_BOTH; /* Use linux,phandle or phandle prope= rties */ int generate_symbols; /* enable symbols & fixup support */ int generate_fixups; /* suppress generation of fixups on symbol support */ int auto_label_aliases; /* auto generate labels -> aliases */ diff --git a/scripts/dtc/dtc.h b/scripts/dtc/dtc.h index 409db76c94..403b79deab 100644 --- a/scripts/dtc/dtc.h +++ b/scripts/dtc/dtc.h @@ -31,7 +31,6 @@ #include #include #include -#include =20 #include #include @@ -136,10 +135,6 @@ struct label { struct label *next; }; =20 -struct bus_type { - const char *name; -}; - struct property { bool deleted; char *name; @@ -166,7 +161,6 @@ struct node { int addr_cells, size_cells; =20 struct label *labels; - const struct bus_type *bus; }; =20 #define for_each_label_withdel(l0, l) \ diff --git a/scripts/dtc/libfdt/fdt_empty_tree.c b/scripts/dtc/libfdt/fdt_e= mpty_tree.c index f2ae9b77c2..f72d13b1d1 100644 --- a/scripts/dtc/libfdt/fdt_empty_tree.c +++ b/scripts/dtc/libfdt/fdt_empty_tree.c @@ -81,3 +81,4 @@ int fdt_create_empty_tree(void *buf, int bufsize) =20 return fdt_open_into(buf, buf, bufsize); } + diff --git a/scripts/dtc/libfdt/fdt_ro.c b/scripts/dtc/libfdt/fdt_ro.c index 08de2cce67..3d00d2eee0 100644 --- a/scripts/dtc/libfdt/fdt_ro.c +++ b/scripts/dtc/libfdt/fdt_ro.c @@ -60,7 +60,7 @@ static int _fdt_nodename_eq(const void *fdt, int offset, { const char *p =3D fdt_offset_ptr(fdt, offset + FDT_TAGSIZE, len+1); =20 - if (!p) + if (! p) /* short match */ return 0; =20 @@ -327,7 +327,7 @@ const void *fdt_getprop_namelen(const void *fdt, int no= deoffset, const struct fdt_property *prop; =20 prop =3D fdt_get_property_namelen(fdt, nodeoffset, name, namelen, lenp); - if (!prop) + if (! prop) return NULL; =20 return prop->data; diff --git a/scripts/dtc/libfdt/fdt_rw.c b/scripts/dtc/libfdt/fdt_rw.c index 5c3a2bb0bc..3fd5847377 100644 --- a/scripts/dtc/libfdt/fdt_rw.c +++ b/scripts/dtc/libfdt/fdt_rw.c @@ -207,7 +207,7 @@ static int _fdt_resize_property(void *fdt, int nodeoffs= et, const char *name, int err; =20 *prop =3D fdt_get_property_w(fdt, nodeoffset, name, &oldlen); - if (!*prop) + if (! (*prop)) return oldlen; =20 if ((err =3D _fdt_splice_struct(fdt, (*prop)->data, FDT_TAGALIGN(oldlen), @@ -269,8 +269,8 @@ int fdt_set_name(void *fdt, int nodeoffset, const char = *name) return 0; } =20 -int fdt_setprop_placeholder(void *fdt, int nodeoffset, const char *name, - int len, void **prop_data) +int fdt_setprop(void *fdt, int nodeoffset, const char *name, + const void *val, int len) { struct fdt_property *prop; int err; @@ -283,22 +283,8 @@ int fdt_setprop_placeholder(void *fdt, int nodeoffset,= const char *name, if (err) return err; =20 - *prop_data =3D prop->data; - return 0; -} - -int fdt_setprop(void *fdt, int nodeoffset, const char *name, - const void *val, int len) -{ - void *prop_data; - int err; - - err =3D fdt_setprop_placeholder(fdt, nodeoffset, name, len, &prop_data); - if (err) - return err; - if (len) - memcpy(prop_data, val, len); + memcpy(prop->data, val, len); return 0; } =20 @@ -337,7 +323,7 @@ int fdt_delprop(void *fdt, int nodeoffset, const char *= name) FDT_RW_CHECK_HEADER(fdt); =20 prop =3D fdt_get_property_w(fdt, nodeoffset, name, &len); - if (!prop) + if (! prop) return len; =20 proplen =3D sizeof(*prop) + FDT_TAGALIGN(len); diff --git a/scripts/dtc/libfdt/fdt_sw.c b/scripts/dtc/libfdt/fdt_sw.c index 2bd15e7aef..6a804859fd 100644 --- a/scripts/dtc/libfdt/fdt_sw.c +++ b/scripts/dtc/libfdt/fdt_sw.c @@ -220,7 +220,7 @@ static int _fdt_find_add_string(void *fdt, const char *= s) return offset; } =20 -int fdt_property_placeholder(void *fdt, const char *name, int len, void **= valp) +int fdt_property(void *fdt, const char *name, const void *val, int len) { struct fdt_property *prop; int nameoff; @@ -238,19 +238,7 @@ int fdt_property_placeholder(void *fdt, const char *na= me, int len, void **valp) prop->tag =3D cpu_to_fdt32(FDT_PROP); prop->nameoff =3D cpu_to_fdt32(nameoff); prop->len =3D cpu_to_fdt32(len); - *valp =3D prop->data; - return 0; -} - -int fdt_property(void *fdt, const char *name, const void *val, int len) -{ - void *ptr; - int ret; - - ret =3D fdt_property_placeholder(fdt, name, len, &ptr); - if (ret) - return ret; - memcpy(ptr, val, len); + memcpy(prop->data, val, len); return 0; } =20 diff --git a/scripts/dtc/libfdt/fdt_wip.c b/scripts/dtc/libfdt/fdt_wip.c index 5e85919862..6aaab39992 100644 --- a/scripts/dtc/libfdt/fdt_wip.c +++ b/scripts/dtc/libfdt/fdt_wip.c @@ -82,7 +82,7 @@ int fdt_setprop_inplace(void *fdt, int nodeoffset, const = char *name, int proplen; =20 propval =3D fdt_getprop(fdt, nodeoffset, name, &proplen); - if (!propval) + if (! propval) return proplen; =20 if (proplen !=3D len) @@ -107,7 +107,7 @@ int fdt_nop_property(void *fdt, int nodeoffset, const c= har *name) int len; =20 prop =3D fdt_get_property_w(fdt, nodeoffset, name, &len); - if (!prop) + if (! prop) return len; =20 _fdt_nop_region(prop, len + sizeof(*prop)); diff --git a/scripts/dtc/libfdt/libfdt.h b/scripts/dtc/libfdt/libfdt.h index 7f83023ee1..9e71bb9e03 100644 --- a/scripts/dtc/libfdt/libfdt.h +++ b/scripts/dtc/libfdt/libfdt.h @@ -143,9 +143,7 @@ /* Low-level functions (you probably don't need these) */ /**********************************************************************/ =20 -#ifndef SWIG /* This function is not useful in Python */ const void *fdt_offset_ptr(const void *fdt, int offset, unsigned int check= len); -#endif static inline void *fdt_offset_ptr_w(void *fdt, int offset, int checklen) { return (void *)(uintptr_t)fdt_offset_ptr(fdt, offset, checklen); @@ -212,6 +210,7 @@ int fdt_next_subnode(const void *fdt, int offset); /**********************************************************************/ /* General functions */ /**********************************************************************/ + #define fdt_get_header(fdt, field) \ (fdt32_to_cpu(((const struct fdt_header *)(fdt))->field)) #define fdt_magic(fdt) (fdt_get_header(fdt, magic)) @@ -355,10 +354,8 @@ int fdt_get_mem_rsv(const void *fdt, int n, uint64_t *= address, uint64_t *size); * useful for finding subnodes based on a portion of a larger string, * such as a full path. */ -#ifndef SWIG /* Not available in Python */ int fdt_subnode_offset_namelen(const void *fdt, int parentoffset, const char *name, int namelen); -#endif /** * fdt_subnode_offset - find a subnode of a given node * @fdt: pointer to the device tree blob @@ -394,9 +391,7 @@ int fdt_subnode_offset(const void *fdt, int parentoffse= t, const char *name); * Identical to fdt_path_offset(), but only consider the first namelen * characters of path as the path name. */ -#ifndef SWIG /* Not available in Python */ int fdt_path_offset_namelen(const void *fdt, const char *path, int namelen= ); -#endif =20 /** * fdt_path_offset - find a tree node by its full path @@ -555,12 +550,10 @@ const struct fdt_property *fdt_get_property_by_offset= (const void *fdt, * Identical to fdt_get_property(), but only examine the first namelen * characters of name for matching the property name. */ -#ifndef SWIG /* Not available in Python */ const struct fdt_property *fdt_get_property_namelen(const void *fdt, int nodeoffset, const char *name, int namelen, int *lenp); -#endif =20 /** * fdt_get_property - find a given property in a given node @@ -631,10 +624,8 @@ static inline struct fdt_property *fdt_get_property_w(= void *fdt, int nodeoffset, * -FDT_ERR_BADSTRUCTURE, * -FDT_ERR_TRUNCATED, standard meanings */ -#ifndef SWIG /* This function is not useful in Python */ const void *fdt_getprop_by_offset(const void *fdt, int offset, const char **namep, int *lenp); -#endif =20 /** * fdt_getprop_namelen - get property value based on substring @@ -647,7 +638,6 @@ const void *fdt_getprop_by_offset(const void *fdt, int = offset, * Identical to fdt_getprop(), but only examine the first namelen * characters of name for matching the property name. */ -#ifndef SWIG /* Not available in Python */ const void *fdt_getprop_namelen(const void *fdt, int nodeoffset, const char *name, int namelen, int *lenp); static inline void *fdt_getprop_namelen_w(void *fdt, int nodeoffset, @@ -657,7 +647,6 @@ static inline void *fdt_getprop_namelen_w(void *fdt, in= t nodeoffset, return (void *)(uintptr_t)fdt_getprop_namelen(fdt, nodeoffset, name, namelen, lenp); } -#endif =20 /** * fdt_getprop - retrieve the value of a given property @@ -718,10 +707,8 @@ uint32_t fdt_get_phandle(const void *fdt, int nodeoffs= et); * Identical to fdt_get_alias(), but only examine the first namelen * characters of name for matching the alias name. */ -#ifndef SWIG /* Not available in Python */ const char *fdt_get_alias_namelen(const void *fdt, const char *name, int namelen); -#endif =20 /** * fdt_get_alias - retrieve the path referenced by a given alias @@ -1119,12 +1106,10 @@ int fdt_size_cells(const void *fdt, int nodeoffset); * of the name. It is useful when you want to manipulate only one value of * an array and you have a string that doesn't end with \0. */ -#ifndef SWIG /* Not available in Python */ int fdt_setprop_inplace_namelen_partial(void *fdt, int nodeoffset, const char *name, int namelen, uint32_t idx, const void *val, int len); -#endif =20 /** * fdt_setprop_inplace - change a property's value, but not its size @@ -1154,10 +1139,8 @@ int fdt_setprop_inplace_namelen_partial(void *fdt, i= nt nodeoffset, * -FDT_ERR_BADSTRUCTURE, * -FDT_ERR_TRUNCATED, standard meanings */ -#ifndef SWIG /* Not available in Python */ int fdt_setprop_inplace(void *fdt, int nodeoffset, const char *name, const void *val, int len); -#endif =20 /** * fdt_setprop_inplace_u32 - change the value of a 32-bit integer property @@ -1314,22 +1297,6 @@ static inline int fdt_property_cell(void *fdt, const= char *name, uint32_t val) { return fdt_property_u32(fdt, name, val); } - -/** - * fdt_property_placeholder - add a new property and return a ptr to its v= alue - * - * @fdt: pointer to the device tree blob - * @name: name of property to add - * @len: length of property value in bytes - * @valp: returns a pointer to where where the value should be placed - * - * returns: - * 0, on success - * -FDT_ERR_BADMAGIC, - * -FDT_ERR_NOSPACE, standard meanings - */ -int fdt_property_placeholder(void *fdt, const char *name, int len, void **= valp); - #define fdt_property_string(fdt, name, str) \ fdt_property(fdt, name, str, strlen(str)+1) int fdt_end_node(void *fdt); @@ -1449,37 +1416,6 @@ int fdt_setprop(void *fdt, int nodeoffset, const cha= r *name, const void *val, int len); =20 /** - * fdt_setprop _placeholder - allocate space for a property - * @fdt: pointer to the device tree blob - * @nodeoffset: offset of the node whose property to change - * @name: name of the property to change - * @len: length of the property value - * @prop_data: return pointer to property data - * - * fdt_setprop_placeholer() allocates the named property in the given node. - * If the property exists it is resized. In either case a pointer to the - * property data is returned. - * - * This function may insert or delete data from the blob, and will - * therefore change the offsets of some existing nodes. - * - * returns: - * 0, on success - * -FDT_ERR_NOSPACE, there is insufficient free space in the blob to - * contain the new property value - * -FDT_ERR_BADOFFSET, nodeoffset did not point to FDT_BEGIN_NODE tag - * -FDT_ERR_BADLAYOUT, - * -FDT_ERR_BADMAGIC, - * -FDT_ERR_BADVERSION, - * -FDT_ERR_BADSTATE, - * -FDT_ERR_BADSTRUCTURE, - * -FDT_ERR_BADLAYOUT, - * -FDT_ERR_TRUNCATED, standard meanings - */ -int fdt_setprop_placeholder(void *fdt, int nodeoffset, const char *name, - int len, void **prop_data); - -/** * fdt_setprop_u32 - set a property to a 32-bit integer * @fdt: pointer to the device tree blob * @nodeoffset: offset of the node whose property to change @@ -1798,10 +1734,8 @@ int fdt_delprop(void *fdt, int nodeoffset, const cha= r *name); * creating subnodes based on a portion of a larger string, such as a * full path. */ -#ifndef SWIG /* Not available in Python */ int fdt_add_subnode_namelen(void *fdt, int parentoffset, const char *name, int namelen); -#endif =20 /** * fdt_add_subnode - creates a new node diff --git a/scripts/dtc/livetree.c b/scripts/dtc/livetree.c index aecd27875f..3673de07e4 100644 --- a/scripts/dtc/livetree.c +++ b/scripts/dtc/livetree.c @@ -478,8 +478,7 @@ struct node *get_node_by_path(struct node *tree, const = char *path) p =3D strchr(path, '/'); =20 for_each_child(tree, child) { - if (p && (strlen(child->name) =3D=3D p-path) && - strneq(path, child->name, p-path)) + if (p && strneq(path, child->name, p-path)) return get_node_by_path(child, p+1); else if (!p && streq(path, child->name)) return child; diff --git a/scripts/dtc/version_gen.h b/scripts/dtc/version_gen.h index b5ed715ecc..859564e8b4 100644 --- a/scripts/dtc/version_gen.h +++ b/scripts/dtc/version_gen.h @@ -1 +1 @@ -#define DTC_VERSION "DTC 1.4.4-gfe50bd1e" +#define DTC_VERSION "DTC 1.4.4" --=20 2.13.3