From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from phobos.denx.de (phobos.denx.de [85.214.62.61]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id A4EF4C636D3 for ; Wed, 1 Feb 2023 22:57:56 +0000 (UTC) Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id 9C37285E37; Wed, 1 Feb 2023 23:57:14 +0100 (CET) Authentication-Results: phobos.denx.de; dmarc=pass (p=none dis=none) header.from=chromium.org Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=u-boot-bounces@lists.denx.de Authentication-Results: phobos.denx.de; dkim=pass (1024-bit key; unprotected) header.d=chromium.org header.i=@chromium.org header.b="DYp1sDSi"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id 911BF85E53; Wed, 1 Feb 2023 23:56:12 +0100 (CET) Received: from mail-il1-x135.google.com (mail-il1-x135.google.com [IPv6:2607:f8b0:4864:20::135]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits)) (No client certificate requested) by phobos.denx.de (Postfix) with ESMTPS id 62C0C85DEE for ; Wed, 1 Feb 2023 23:54:44 +0100 (CET) Authentication-Results: phobos.denx.de; dmarc=pass (p=none dis=none) header.from=chromium.org Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=sjg@chromium.org Received: by mail-il1-x135.google.com with SMTP id l7so128103ilf.0 for ; Wed, 01 Feb 2023 14:54:44 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=chromium.org; s=google; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=2IUrbfKAzlADQzZaAmzrdorOfcGp2C17L8G1lfDLZX4=; b=DYp1sDSiNpYX24zMfvKEo4i48MZGWEK/zRinekCHs56KXKDVBLnKCcHTPyt7DMN/Uz QcC1zRaTtsAqrjXwFPK0JOM/dAY76dlmmZW7FzkRWzlPL3RHEqRZBIeDJftfjiKRxbTi Gym0ZPcbBUPgIT6DJCaVcWlCf5J+pDxzkc75s= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=2IUrbfKAzlADQzZaAmzrdorOfcGp2C17L8G1lfDLZX4=; b=3xHmbhOveXlm86mLiKeTsqD/wMkSTv5rnSG84t4GCA8c3I7QYeLvJviSKMREP42KFv 9tLtb0bAfwdgtrigTm0abwxvYbHK6IY/RoIaj13zWtJe4jcbbMh6A7MdV8ZCLf0y7/x4 cUO3zoX98+PnHByDblFqqE7Vy/2Js5e1HUt3zmQXtpcznU7nIuSDqG1OuHzuqTR8QiAK EfBY2xEnGuHFG4zYy75ihDiEynD059qoOi2dqfQJjnhx5cSm7ke3B1PycTn11Y5tp2V5 8EXmjUTelQRgDRX2v2KoDsmN9u7AA2U6iPYZ8QowlWqd3s3jb0INaDLCBycEWFp0CNNT SY8A== X-Gm-Message-State: AO0yUKXkdC01Q0VULGddzgyxiXMqaPx6z6DFHUW7TzvPMGOgKH3O19KJ Hupfg4SnRex8hUH3ErDEvhUqSyQGHGzE86AN X-Google-Smtp-Source: AK7set/z3laDMbgLSS6GFbqbPlHUSfA6l/xuYLPIN1KWcDs8qRe2CqanttQ9qv3XPps2sTIkXjK3nw== X-Received: by 2002:a92:7d01:0:b0:312:7ca2:fee6 with SMTP id y1-20020a927d01000000b003127ca2fee6mr632566ilc.30.1675292080796; Wed, 01 Feb 2023 14:54:40 -0800 (PST) Received: from kea.bld.corp.google.com ([2620:15c:183:200:1fda:cca0:9a42:148c]) by smtp.gmail.com with ESMTPSA id b21-20020a029a15000000b00374fa5b600csm6964474jal.0.2023.02.01.14.54.40 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 01 Feb 2023 14:54:40 -0800 (PST) From: Simon Glass To: u-boot@lists.denx.de Cc: U-Boot Custodians , Tom Rini , Simon Glass Subject: [PATCH v3 6/8] dm: treewide: Complete migration to new driver model schema Date: Wed, 1 Feb 2023 15:54:26 -0700 Message-Id: <20230201225428.2001161-7-sjg@chromium.org> X-Mailer: git-send-email 2.39.1.456.gfc5497dd1b-goog In-Reply-To: <20230201225428.2001161-1-sjg@chromium.org> References: <20230201225428.2001161-1-sjg@chromium.org> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.39 Precedence: list List-Id: U-Boot discussion List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: u-boot-bounces@lists.denx.de Sender: "U-Boot" X-Virus-Scanned: clamav-milter 0.103.6 at phobos.denx.de X-Virus-Status: Clean Update various build and test components to use the new schema. Signed-off-by: Simon Glass --- (no changes since v1) drivers/core/ofnode.c | 10 +++++----- drivers/video/video-uclass.c | 4 ++-- dts/Kconfig | 2 +- include/dm/device.h | 2 +- include/dm/ofnode.h | 10 +++++----- scripts/Makefile.lib | 12 ++++++------ test/dm/test-fdt.c | 2 +- test/py/tests/test_ofplatdata.py | 8 ++++---- tools/binman/binman.rst | 3 +-- tools/dtoc/test_fdt.py | 8 ++++---- 10 files changed, 30 insertions(+), 31 deletions(-) diff --git a/drivers/core/ofnode.c b/drivers/core/ofnode.c index 4d56b1a7675..5249a60639b 100644 --- a/drivers/core/ofnode.c +++ b/drivers/core/ofnode.c @@ -1265,22 +1265,22 @@ bool ofnode_pre_reloc(ofnode node) { #if defined(CONFIG_SPL_BUILD) || defined(CONFIG_TPL_BUILD) /* for SPL and TPL the remaining nodes after the fdtgrep 1st pass - * had property dm-pre-reloc or u-boot,dm-spl/tpl. + * had property bootph-all or bootph-pre-sram/bootph-pre-ram. * They are removed in final dtb (fdtgrep 2nd pass) */ return true; #else - if (ofnode_read_bool(node, "u-boot,dm-pre-reloc")) + if (ofnode_read_bool(node, "bootph-all")) return true; - if (ofnode_read_bool(node, "u-boot,dm-pre-proper")) + if (ofnode_read_bool(node, "bootph-some-ram")) return true; /* * In regular builds individual spl and tpl handling both * count as handled pre-relocation for later second init. */ - if (ofnode_read_bool(node, "u-boot,dm-spl") || - ofnode_read_bool(node, "u-boot,dm-tpl")) + if (ofnode_read_bool(node, "bootph-pre-ram") || + ofnode_read_bool(node, "bootph-pre-sram")) return true; return false; diff --git a/drivers/video/video-uclass.c b/drivers/video/video-uclass.c index 0ce376ca3f1..17c47f546a1 100644 --- a/drivers/video/video-uclass.c +++ b/drivers/video/video-uclass.c @@ -529,8 +529,8 @@ static int video_post_bind(struct udevice *dev) addr = uc_priv->video_ptr; size = alloc_fb(dev, &addr); if (addr < gd->video_bottom) { - /* Device tree node may need the 'u-boot,dm-pre-reloc' or - * 'u-boot,dm-pre-proper' tag + /* Device tree node may need the 'bootph-all' or + * 'bootph-some-ram' tag */ printf("Video device '%s' cannot allocate frame buffer memory -ensure the device is set up before relocation\n", dev->name); diff --git a/dts/Kconfig b/dts/Kconfig index bc5f22029ff..d7206641c34 100644 --- a/dts/Kconfig +++ b/dts/Kconfig @@ -352,7 +352,7 @@ config OF_SPL_REMOVE_PROPS help Since SPL normally runs in a reduced memory space, the device tree is cut down to only what is needed to load and start U-Boot. Only - nodes marked with the property "u-boot,dm-pre-reloc" will be + nodes marked with the property "bootph-all" will be included. In addition, some properties are not used by U-Boot and can be discarded. This option defines the list of properties to discard. diff --git a/include/dm/device.h b/include/dm/device.h index e9460386ca9..b86bf90609b 100644 --- a/include/dm/device.h +++ b/include/dm/device.h @@ -1070,7 +1070,7 @@ static inline bool device_is_on_pci_bus(const struct udevice *dev) * sub-nodes and binds drivers for each node where a driver can be found. * * If this is called prior to relocation, only pre-relocation devices will be - * bound (those marked with u-boot,dm-pre-reloc in the device tree, or where + * bound (those marked with bootph-all in the device tree, or where * the driver has the DM_FLAG_PRE_RELOC flag set). Otherwise, all devices will * be bound. * diff --git a/include/dm/ofnode.h b/include/dm/ofnode.h index fa9865602d8..793ad37ff2c 100644 --- a/include/dm/ofnode.h +++ b/include/dm/ofnode.h @@ -1176,12 +1176,12 @@ int ofnode_read_simple_size_cells(ofnode node); * determine if a node was bound in one of SPL/TPL stages. * * There are 4 settings currently in use - * - u-boot,dm-pre-proper: U-Boot proper pre-relocation only - * - u-boot,dm-pre-reloc: legacy and indicates any of TPL or SPL + * - bootph-some-ram: U-Boot proper pre-relocation only + * - bootph-all: all phases * Existing platforms only use it to indicate nodes needed in - * SPL. Should probably be replaced by u-boot,dm-spl for new platforms. - * - u-boot,dm-spl: SPL and U-Boot pre-relocation - * - u-boot,dm-tpl: TPL and U-Boot pre-relocation + * SPL. Should probably be replaced by bootph-pre-ram for new platforms. + * - bootph-pre-ram: SPL and U-Boot pre-relocation + * - bootph-pre-sram: TPL and U-Boot pre-relocation * * @node: node to check * Return: true if node is needed in SPL/TL, false otherwise diff --git a/scripts/Makefile.lib b/scripts/Makefile.lib index ac45a884785..8f251831307 100644 --- a/scripts/Makefile.lib +++ b/scripts/Makefile.lib @@ -585,24 +585,24 @@ cmd_mkimage = $(objtree)/tools/mkimage $(MKIMAGEFLAGS_$(@F)) -d $< $@ \ # --------------------------------------------------------------------------- # Pass the original device tree file through fdtgrep twice. The first pass # removes any unwanted nodes (i.e. those which don't have the -# 'u-boot,dm-pre-reloc' property and thus are not needed by SPL. The second +# 'bootph-all' property and thus are not needed by SPL. The second # pass removes various unused properties from the remaining nodes. # The output is typically a much smaller device tree file. ifeq ($(CONFIG_VPL_BUILD),y) -fdtgrep_props := -b u-boot,dm-pre-reloc -b u-boot,dm-vpl +fdtgrep_props := -b bootph-all -b bootph-verify else ifeq ($(CONFIG_TPL_BUILD),y) -fdtgrep_props := -b u-boot,dm-pre-reloc -b u-boot,dm-tpl +fdtgrep_props := -b bootph-all -b bootph-pre-sram else -fdtgrep_props := -b u-boot,dm-pre-reloc -b u-boot,dm-spl +fdtgrep_props := -b bootph-all -b bootph-pre-ram endif endif quiet_cmd_fdtgrep = FDTGREP $@ cmd_fdtgrep = $(objtree)/tools/fdtgrep $(fdtgrep_props) -RT $< \ -n /chosen -n /config -O dtb | \ $(objtree)/tools/fdtgrep -r -O dtb - -o $@ \ - -P u-boot,dm-pre-reloc -P u-boot,dm-spl -P u-boot,dm-tpl \ - -P u-boot,dm-vpl \ + -P bootph-all -P bootph-pre-ram -P bootph-pre-sram \ + -P bootph-verify \ $(addprefix -P ,$(subst $\",,$(CONFIG_OF_SPL_REMOVE_PROPS))) # fdt_rm_props diff --git a/test/dm/test-fdt.c b/test/dm/test-fdt.c index 7cd2d046122..9e19ce7345c 100644 --- a/test/dm/test-fdt.c +++ b/test/dm/test-fdt.c @@ -214,7 +214,7 @@ static int dm_test_fdt_pre_reloc(struct unit_test_state *uts) /* * These are 2 pre-reloc devices: - * one with "u-boot,dm-pre-reloc" property (a-test node), and the other + * one with "bootph-all" property (a-test node), and the other * one whose driver marked with DM_FLAG_PRE_RELOC flag (h-test node). */ ut_asserteq(2, list_count_items(&uc->dev_head)); diff --git a/test/py/tests/test_ofplatdata.py b/test/py/tests/test_ofplatdata.py index e9cce4daf48..51a188454f3 100644 --- a/test/py/tests/test_ofplatdata.py +++ b/test/py/tests/test_ofplatdata.py @@ -13,10 +13,10 @@ def test_spl_devicetree(u_boot_console): fdtgrep = cons.config.build_dir + '/tools/fdtgrep' output = util.run_and_log(cons, [fdtgrep, '-l', dtb]) - assert "u-boot,dm-pre-reloc" not in output - assert "u-boot,dm-pre-proper" not in output - assert "u-boot,dm-spl" not in output - assert "u-boot,dm-tpl" not in output + assert "bootph-all" not in output + assert "bootph-some-ram" not in output + assert "bootph-pre-ram" not in output + assert "bootph-pre-sram" not in output assert "spl-test5" not in output assert "spl-test6" not in output diff --git a/tools/binman/binman.rst b/tools/binman/binman.rst index 03a99a19bc6..2bcb7d3886f 100644 --- a/tools/binman/binman.rst +++ b/tools/binman/binman.rst @@ -1122,8 +1122,7 @@ It is sometimes inconvenient to add a 'binman' node to the .dts file for each board. This can be done by using #include to bring in a common file. Another approach supported by the U-Boot build system is to automatically include a common header. You can then put the binman node (and anything else that is -specific to U-Boot, such as u-boot,dm-pre-reloc properies) in that header -file. +specific to U-Boot, such as bootph-all properies) in that header file. Binman will search for the following files in arch//dts:: diff --git a/tools/dtoc/test_fdt.py b/tools/dtoc/test_fdt.py index 1c33b888830..dffa86fc190 100755 --- a/tools/dtoc/test_fdt.py +++ b/tools/dtoc/test_fdt.py @@ -132,10 +132,10 @@ class TestFdt(unittest.TestCase): """Tests obtaining a list of properties""" node = self.dtb.GetNode('/spl-test') props = self.dtb.GetProps(node) - self.assertEqual(['boolval', 'bytearray', 'byteval', 'compatible', - 'int64val', 'intarray', 'intval', 'longbytearray', - 'maybe-empty-int', 'notstring', 'stringarray', - 'stringval', 'bootph-all'], + self.assertEqual(['boolval', 'bootph-all', 'bytearray', 'byteval', + 'compatible', 'int64val', 'intarray', 'intval', + 'longbytearray', 'maybe-empty-int', 'notstring', + 'stringarray', 'stringval', ], sorted(props.keys())) def test_check_error(self): -- 2.39.1.456.gfc5497dd1b-goog