Commit dfe05787 authored by Rob Herring (Arm)'s avatar Rob Herring (Arm)
Browse files

scripts/dtc: Update to upstream version v1.7.2-62-ga26ef6400bd8



This adds the following commits from upstream:

a26ef6400bd8 Restore phandle references from __fixups__ node
05c524db44ff Restore phandle references from __local_fixups__ node
db65a3a3f4f0 Restore labels from __symbols__ node
64330c682cac Improve type guessing when compiling to dts format
cbb48690c697 Set DTSF_PLUGIN if needed when compiling from dtb
ef3b1baf6370 Emit /plugin/ when compiling to .dts with DTSF_PLUGIN set
7c78c8542d73 Added empty node name check
14dd76b96732 fdtdump: Change FDT_PROP prob handling to ease future addition
9a1c801a1a3c Fix discarded const qualifiers
194ac9422ac9 libfdt: fdt_get_name: Add can_assume(VALID_DTB) check
39cae0bd0031 libfdt: Improve size savings in FDT_RO_PROBE slightly
b12692473298 libfdt: libfdt_internal.h correct final comment in ASSUME block
7f3184a6c550 libfdt: Remove old MacOS strnlen workaround
9197f1ccd95c checks: Do not check overlays for alias paths
e1284ee5dc20 livetree: Add only new data to fixup nodes instead of complete regeneration
cba90ce82064 checks: Remove check for graph child addresses
763c6ab4189c livetree: Simplify append_to_property()
739403f22242 libfdt: Drop including string.h from libfdt_internal.h
1c6c51e51b29 Consider drive letters when checking for absolute paths on Windows.
617f3d9b60f7 ci: Add Cirrus CI configuration for FreeBSD testing
04f948e83fef ci: Add GitLab CI configuration for Linux builds
e89680263137 ci: Tweaks to GitHub Actions setup
2ad738722b79 build: Add FreeBSD and non-GNU linker compatibility
4132ac08ba95 libfdt: Document most remaining functions
33e66ec845b8 tests: Add compatibility with uutils
a0dd7b608102 fdtput: Use strtol() in preference to sscanf()
5b71660724d7 tests: Work around limitation in FreeBSD's printf(1)

The graph_child_address check has been removed from upstream. Drop it
from the makefiles.

Signed-off-by: default avatarRob Herring (Arm) <robh@kernel.org>
parent e2bafe4d
Loading
Loading
Loading
Loading
+0 −1
Original line number Diff line number Diff line
@@ -56,7 +56,6 @@ DT_DOCS = $(patsubst $(srctree)/%,%,$(shell $(find_all_cmd)))

override DTC_FLAGS := \
	-Wno-avoid_unnecessary_addr_size \
	-Wno-graph_child_address \
	-Wno-unique_unit_address \
	-Wunique_unit_address_if_enabled

+0 −1
Original line number Diff line number Diff line
@@ -105,7 +105,6 @@ ifeq ($(findstring 1,$(KBUILD_EXTRA_WARN)),)
DTC_FLAGS += -Wno-unit_address_vs_reg \
             -Wno-avoid_unnecessary_addr_size \
             -Wno-alias_paths \
             -Wno-graph_child_address \
             -Wno-interrupt_map \
             -Wno-simple_bus_reg
else
+14 −28
Original line number Diff line number Diff line
@@ -340,6 +340,14 @@ static void check_node_name_format(struct check *c, struct dt_info *dti,
}
ERROR(node_name_format, check_node_name_format, NULL, &node_name_chars);

static void check_node_name_not_empty(struct check *c, struct dt_info *dti,
				      struct node *node)
{
	if (node->basenamelen == 0 && node->parent != NULL)
		FAIL(c, dti, node, "Empty node name");
}
ERROR(node_name_not_empty, check_node_name_not_empty, NULL, &node_name_chars);

static void check_node_name_vs_property_name(struct check *c,
					     struct dt_info *dti,
					     struct node *node)
@@ -718,11 +726,14 @@ static void check_alias_paths(struct check *c, struct dt_info *dti,
			continue;
		}

		if (!prop->val.val || !get_node_by_path(dti->dt, prop->val.val)) {
		/* This check does not work for overlays with external paths */
		if (!(dti->dtsflags & DTSF_PLUGIN) &&
		    (!prop->val.val || !get_node_by_path(dti->dt, prop->val.val))) {
			FAIL_PROP(c, dti, node, prop, "aliases property is not a valid node (%s)",
				  prop->val.val);
			continue;
		}

		if (strspn(prop->name, LOWERCASE DIGITS "-") != strlen(prop->name))
			FAIL(c, dti, node, "aliases property name must include only lowercase and '-'");
	}
@@ -1894,34 +1905,9 @@ static void check_graph_endpoint(struct check *c, struct dt_info *dti,
}
WARNING(graph_endpoint, check_graph_endpoint, NULL, &graph_nodes);

static void check_graph_child_address(struct check *c, struct dt_info *dti,
				      struct node *node)
{
	int cnt = 0;
	struct node *child;

	if (node->bus != &graph_ports_bus && node->bus != &graph_port_bus)
		return;

	for_each_child(node, child) {
		struct property *prop = get_property(child, "reg");

		/* No error if we have any non-zero unit address */
                if (prop && propval_cell(prop) != 0 )
			return;

		cnt++;
	}

	if (cnt == 1 && node->addr_cells != -1)
		FAIL(c, dti, node, "graph node has single child node '%s', #address-cells/#size-cells are not necessary",
		     node->children->name);
}
WARNING(graph_child_address, check_graph_child_address, NULL, &graph_nodes, &graph_port, &graph_endpoint);

static struct check *check_table[] = {
	&duplicate_node_names, &duplicate_property_names,
	&node_name_chars, &node_name_format, &property_name_chars,
	&node_name_chars, &node_name_format, &node_name_not_empty, &property_name_chars,
	&name_is_string, &name_properties, &node_name_vs_property_name,

	&duplicate_label,
@@ -2005,7 +1991,7 @@ static struct check *check_table[] = {

	&alias_paths,

	&graph_nodes, &graph_child_address, &graph_port, &graph_endpoint,
	&graph_nodes, &graph_port, &graph_endpoint,

	&always_fail,
};
+5 −0
Original line number Diff line number Diff line
@@ -338,9 +338,14 @@ int main(int argc, char *argv[])
	if (auto_label_aliases)
		generate_label_tree(dti, "aliases", false);

	generate_labels_from_tree(dti, "__symbols__");

	if (generate_symbols)
		generate_label_tree(dti, "__symbols__", true);

	fixup_phandles(dti, "__fixups__");
	local_fixup_phandles(dti, "__local_fixups__");

	if (generate_fixups) {
		generate_fixups_tree(dti, "__fixups__");
		generate_local_fixups_tree(dti, "__local_fixups__");
+6 −0
Original line number Diff line number Diff line
@@ -339,9 +339,12 @@ struct dt_info *build_dt_info(unsigned int dtsflags,
			      struct reserve_info *reservelist,
			      struct node *tree, uint32_t boot_cpuid_phys);
void sort_tree(struct dt_info *dti);
void generate_labels_from_tree(struct dt_info *dti, const char *name);
void generate_label_tree(struct dt_info *dti, const char *name, bool allocph);
void generate_fixups_tree(struct dt_info *dti, const char *name);
void fixup_phandles(struct dt_info *dti, const char *name);
void generate_local_fixups_tree(struct dt_info *dti, const char *name);
void local_fixup_phandles(struct dt_info *dti, const char *name);

/* Checks */

@@ -357,6 +360,9 @@ struct dt_info *dt_from_blob(const char *fname);

/* Tree source */

void property_add_marker(struct property *prop,
			 enum markertype type, unsigned int offset, char *ref);
void add_phandle_marker(struct dt_info *dti, struct property *prop, unsigned int offset);
void dt_to_source(FILE *f, struct dt_info *dti);
struct dt_info *dt_from_source(const char *f);

Loading