Revert "binman: Add a temporary hack for duplicate phandles"

The affected boards have been fixed, so drop this hack.

This reverts commit 288ae53cb7.

Signed-off-by: Simon Glass <sjg@chromium.org>
Acked-by: Tim Harvey <tharvey@gateworks.com>
This commit is contained in:
Simon Glass 2023-08-23 19:18:02 -06:00 committed by Tom Rini
parent 98244a8550
commit bbbf04cc7d
4 changed files with 4 additions and 21 deletions

View file

@ -1328,11 +1328,6 @@ u-boot.ldr: u-boot
# Use 'make BINMAN_VERBOSE=3' to set vebosity level # Use 'make BINMAN_VERBOSE=3' to set vebosity level
default_dt := $(if $(DEVICE_TREE),$(DEVICE_TREE),$(CONFIG_DEFAULT_DEVICE_TREE)) default_dt := $(if $(DEVICE_TREE),$(DEVICE_TREE),$(CONFIG_DEFAULT_DEVICE_TREE))
# Temporary workaround for Venice boards
ifneq ($(CONFIG_TARGET_IMX8MM_VENICE),$(CONFIG_TARGET_IMX8MN_VENICE),$(CONFIG_TARGET_IMX8MP_VENICE),)
ignore_dups := --ignore-dup-phandles
endif
quiet_cmd_binman = BINMAN $@ quiet_cmd_binman = BINMAN $@
cmd_binman = $(srctree)/tools/binman/binman $(if $(BINMAN_DEBUG),-D) \ cmd_binman = $(srctree)/tools/binman/binman $(if $(BINMAN_DEBUG),-D) \
$(foreach f,$(BINMAN_TOOLPATHS),--toolpath $(f)) \ $(foreach f,$(BINMAN_TOOLPATHS),--toolpath $(f)) \
@ -1354,7 +1349,6 @@ cmd_binman = $(srctree)/tools/binman/binman $(if $(BINMAN_DEBUG),-D) \
-a spl-dtb=$(CONFIG_SPL_OF_REAL) \ -a spl-dtb=$(CONFIG_SPL_OF_REAL) \
-a tpl-dtb=$(CONFIG_TPL_OF_REAL) \ -a tpl-dtb=$(CONFIG_TPL_OF_REAL) \
-a pre-load-key-path=${PRE_LOAD_KEY_PATH} \ -a pre-load-key-path=${PRE_LOAD_KEY_PATH} \
$(ignore_dups) \
$(BINMAN_$(@F)) $(BINMAN_$(@F))
OBJCOPYFLAGS_u-boot.ldr.hex := -I binary -O ihex OBJCOPYFLAGS_u-boot.ldr.hex := -I binary -O ihex

View file

@ -126,8 +126,6 @@ controlled by a description in the board device tree.'''
help='Comma-separated list of bintools to consider missing (for testing)') help='Comma-separated list of bintools to consider missing (for testing)')
build_parser.add_argument('-i', '--image', type=str, action='append', build_parser.add_argument('-i', '--image', type=str, action='append',
help='Image filename to build (if not specified, build all)') help='Image filename to build (if not specified, build all)')
build_parser.add_argument('--ignore-dup-phandles', action='store_true',
help='Temporary option to ignore duplicate phandles')
build_parser.add_argument('-I', '--indir', action='append', build_parser.add_argument('-I', '--indir', action='append',
help='Add a path to the list of directories to use for input files') help='Add a path to the list of directories to use for input files')
build_parser.add_argument('-m', '--map', action='store_true', build_parser.add_argument('-m', '--map', action='store_true',

View file

@ -22,7 +22,6 @@ from binman import bintool
from binman import cbfs_util from binman import cbfs_util
from binman import elf from binman import elf
from binman import entry from binman import entry
from dtoc import fdt
from dtoc import fdt_util from dtoc import fdt_util
from u_boot_pylib import command from u_boot_pylib import command
from u_boot_pylib import tools from u_boot_pylib import tools
@ -817,10 +816,6 @@ def Binman(args):
cbfs_util.VERBOSE = args.verbosity > 2 cbfs_util.VERBOSE = args.verbosity > 2
state.use_fake_dtb = args.fake_dtb state.use_fake_dtb = args.fake_dtb
# Temporary hack
if args.ignore_dup_phandles: # pragma: no cover
fdt.IGNORE_DUP_PHANDLES = True
# Normally we replace the 'u-boot' etype with 'u-boot-expanded', etc. # Normally we replace the 'u-boot' etype with 'u-boot-expanded', etc.
# When running tests this can be disabled using this flag. When not # When running tests this can be disabled using this flag. When not
# updating the FDT in image, it is not needed by binman, but we use it # updating the FDT in image, it is not needed by binman, but we use it

View file

@ -15,9 +15,6 @@ from libfdt import QUIET_NOTFOUND
from u_boot_pylib import tools from u_boot_pylib import tools
from u_boot_pylib import tout from u_boot_pylib import tout
# Temporary hack
IGNORE_DUP_PHANDLES = False
# This deals with a device tree, presenting it as an assortment of Node and # This deals with a device tree, presenting it as an assortment of Node and
# Prop objects, representing nodes and properties, respectively. This file # Prop objects, representing nodes and properties, respectively. This file
# contains the base classes and defines the high-level API. You can use # contains the base classes and defines the high-level API. You can use
@ -342,10 +339,9 @@ class Node:
if phandle: if phandle:
dup = self._fdt.phandle_to_node.get(phandle) dup = self._fdt.phandle_to_node.get(phandle)
if dup: if dup:
if not IGNORE_DUP_PHANDLES:
raise ValueError( raise ValueError(
f'Duplicate phandle {phandle} in nodes {dup.path} and {self.path}') f'Duplicate phandle {phandle} in nodes {dup.path} and {self.path}')
else:
self._fdt.phandle_to_node[phandle] = self self._fdt.phandle_to_node[phandle] = self
offset = fdt_obj.first_subnode(self.Offset(), QUIET_NOTFOUND) offset = fdt_obj.first_subnode(self.Offset(), QUIET_NOTFOUND)