From patchwork Mon Sep 22 18:00:53 2025 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Simon Glass X-Patchwork-Id: 393 Return-Path: X-Original-To: u-boot-concept@u-boot.org Delivered-To: u-boot-concept@u-boot.org DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=u-boot.org; s=default; t=1758564125; bh=reMevOO9+uxrCDN8jjjLmzpeokhPBlqDR9ykad2hh64=; h=From:To:Date:In-Reply-To:References:CC:Subject:List-Id: List-Archive:List-Help:List-Owner:List-Post:List-Subscribe: List-Unsubscribe:From; b=Fj29z27q0LP/EEdNp1BQB2QKGtk1+Iui0IXjYSitSkkZx7wdQEz1sTK0o3DSy/7Ja Vnw7b+AZOlEJq8AiPctORZHV3eDBFI5RUvnTWtXfRbDGDF/UfXpH9KPc1MPmNXHOdF ZwlF841VPhvdYjy/effpc0DaOj5S0RteRo0KRSu+5/8vrO6rfA+fVTDTBDB/FEk/hK XhnVKtAeENTxZO9I+RTNIQB3fx+UFZ/V+LW0zCBStHgNAlCBsiymgD/SiDGUrnIdqD l9qRpc0+eKWInFRRfJx0VhR6FGfAu4wV51ZgrfOwYOWis2LgcAVjbdVrv00Z4xFudK MyRZuIifBq6tQ== Received: from localhost (localhost [127.0.0.1]) by mail.u-boot.org (Postfix) with ESMTP id 49C6F67CB2 for ; Mon, 22 Sep 2025 12:02:05 -0600 (MDT) X-Virus-Scanned: Debian amavis at Received: from mail.u-boot.org ([127.0.0.1]) by localhost (mail.u-boot.org [127.0.0.1]) (amavis, port 10024) with ESMTP id hN1anQzdaUrM for ; Mon, 22 Sep 2025 12:02:05 -0600 (MDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=u-boot.org; s=default; t=1758564125; bh=reMevOO9+uxrCDN8jjjLmzpeokhPBlqDR9ykad2hh64=; h=From:To:Date:In-Reply-To:References:CC:Subject:List-Id: List-Archive:List-Help:List-Owner:List-Post:List-Subscribe: List-Unsubscribe:From; b=Fj29z27q0LP/EEdNp1BQB2QKGtk1+Iui0IXjYSitSkkZx7wdQEz1sTK0o3DSy/7Ja Vnw7b+AZOlEJq8AiPctORZHV3eDBFI5RUvnTWtXfRbDGDF/UfXpH9KPc1MPmNXHOdF ZwlF841VPhvdYjy/effpc0DaOj5S0RteRo0KRSu+5/8vrO6rfA+fVTDTBDB/FEk/hK XhnVKtAeENTxZO9I+RTNIQB3fx+UFZ/V+LW0zCBStHgNAlCBsiymgD/SiDGUrnIdqD l9qRpc0+eKWInFRRfJx0VhR6FGfAu4wV51ZgrfOwYOWis2LgcAVjbdVrv00Z4xFudK MyRZuIifBq6tQ== Received: from mail.u-boot.org (localhost [127.0.0.1]) by mail.u-boot.org (Postfix) with ESMTP id 28F525FE1A for ; Mon, 22 Sep 2025 12:02:05 -0600 (MDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=u-boot.org; s=default; t=1758564122; bh=TiDxWponpaOjEb/5BbXBy/zBXmroQ6OcKnGcH/8LcJ4=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=mak/hH6iP4Dql5FuNqpXd/uQ0vW7R6aEWwZYWBMXZOP6GqfVSdZsb2ng9p48iO1eQ qPM9IXh3DRQMbWlboPTaal3cou3hLa8Jv8nKJlQ/4s1LfYeEmUeXgjc53uF52mIOG6 JG6Yk0+0dhijuLf7q0OgrhsyTAMFcMnLXKvFTlka1xESUer7a3cWQ4NbqAh0fPQCao FBaCATjjBzCtELzjxS7u0eaCYvy5PI9xC9LWKB8PlSvEAE+usk435TTCez1IEsWJKT 2E56sXi3CD8KgWqcIb/w2d6grUXu8r9NVUcLNKYTz1wBUG27CbsY59/ZoZCK6a4aN6 vSwXokDxgivWA== Received: from localhost (localhost [127.0.0.1]) by mail.u-boot.org (Postfix) with ESMTP id D589D67CA9; Mon, 22 Sep 2025 12:02:02 -0600 (MDT) X-Virus-Scanned: Debian amavis at Received: from mail.u-boot.org ([127.0.0.1]) by localhost (mail.u-boot.org [127.0.0.1]) (amavis, port 10026) with ESMTP id WPNR74-GaWPD; Mon, 22 Sep 2025 12:02:02 -0600 (MDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=u-boot.org; s=default; t=1758564121; bh=qTsvo/smK4q1bjSGD+EMi/jugyFn2GtBrFrEaAsP4u4=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=ZP693pjTKgML83iti6vXrC3rRNSDJisf2TgP2gVRfgZMUJ6VO9Ds8uV9+OoUVeGCI Ndj5cePJEE1F3vGlINIfqwfxqWiD4Or3I/kVrwvx61WMG98p+lHXlzSRKBnKErBJgQ jFWSD/0RokzTFR7we6CNiGb/g7DmIh8Kjdm3aN6KIWu0FvJcBhh6MOFL0Ww15kYcKk a4nXJnTtkSxOchId7PA4+soInXl3BL2pc3DyFNGR/Ja6Qs18QJCZrY1nxQhzOEs2Cx PpAW8jJOoXLX7RUbF1GmUWHxWQFsKuuU0HCRPddD8Z+mqZdtErPhsEomDDSj8PtowV kszozYslHQDBA== Received: from u-boot.org (unknown [73.34.74.121]) by mail.u-boot.org (Postfix) with ESMTPSA id 1913A5FE1A; Mon, 22 Sep 2025 12:02:01 -0600 (MDT) From: Simon Glass To: U-Boot Concept Date: Mon, 22 Sep 2025 12:00:53 -0600 Message-ID: <20250922180116.3088502-10-sjg@u-boot.org> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20250922180116.3088502-1-sjg@u-boot.org> References: <20250922180116.3088502-1-sjg@u-boot.org> MIME-Version: 1.0 Message-ID-Hash: MKX3OYHVK5I54T4JG4HGNIGEHYPHJZYS X-Message-ID-Hash: MKX3OYHVK5I54T4JG4HGNIGEHYPHJZYS X-MailFrom: sjg@u-boot.org X-Mailman-Rule-Misses: dmarc-mitigation; no-senders; approved; loop; banned-address; emergency; member-moderation; nonmember-moderation; administrivia; implicit-dest; max-recipients; max-size; news-moderation; no-subject; digests; suspicious-header CC: Heinrich Schuchardt , Simon Glass X-Mailman-Version: 3.3.10 Precedence: list Subject: [Concept] [PATCH 09/24] boot: Tidy up the bootflow flags List-Id: Discussion and patches related to U-Boot Concept Archived-At: List-Archive: List-Help: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: From: Simon Glass Use a BIT() macro to specify the flags. Fix an extra space in the comment while we are here. Signed-off-by: Simon Glass --- include/bootflow.h | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/include/bootflow.h b/include/bootflow.h index 422fd32a3ca..c8f5d6e0859 100644 --- a/include/bootflow.h +++ b/include/bootflow.h @@ -42,18 +42,21 @@ enum bootflow_state_t { /** * enum bootflow_flags_t - flags for bootflows * + * These flags are set up by the bootmeth when the bootflow is created, except + * for BOOTFLOWF_FAKE which can be set later. + * * @BOOTFLOWF_USE_PRIOR_FDT: Indicates that an FDT was not found by the bootmeth * and it is using the prior-stage FDT, which is the U-Boot control FDT. * This is only possible with the EFI bootmeth (distro-efi) and only when * CONFIG_OF_HAS_PRIOR_STAGE is enabled * @BOOTFLOWF_STATIC_BUF: Indicates that @bflow->buf is statically set, rather * than being allocated by malloc(). - * @BOOTFLOWF_USE_BUILTIN_FDT : Indicates that current bootflow uses built-in FDT + * @BOOTFLOWF_USE_BUILTIN_FDT: Indicates that current bootflow uses built-in FDT */ enum bootflow_flags_t { - BOOTFLOWF_USE_PRIOR_FDT = 1 << 0, - BOOTFLOWF_STATIC_BUF = 1 << 1, - BOOTFLOWF_USE_BUILTIN_FDT = 1 << 2, + BOOTFLOWF_USE_PRIOR_FDT = BIT(0), + BOOTFLOWF_STATIC_BUF = BIT(1), + BOOTFLOWF_USE_BUILTIN_FDT = BIT(2), }; /**