From: Mattijs Korpershoek <mkorpershoek@kernel.org>
To: Carlo Caione <ccaione@baylibre.com>,
u-boot@lists.u-boot-project.org,
GSS_MTK_Uboot_upstream <GSS_MTK_Uboot_upstream@mediatek.com>
Cc: "Suhrid Subramaniam" <Suhrid.Subramaniam@mediatek.com>,
"Macpaul Lin (林智斌)" <Macpaul.Lin@mediatek.com>,
"Pablo Sun (孫毓翔)" <pablo.sun@mediatek.com>,
"Arnaud Ferraris" <arnaud.ferraris@collabora.com>,
"Tom Rini" <trini@konsulko.com>, "Simon Glass" <sjg@chromium.org>,
"Sam Day" <me@samcday.com>,
"Quentin Schulz" <quentin.schulz@cherry.de>,
"Carlo Caione" <ccaione@baylibre.com>,
"David Lechner" <dlechner@baylibre.com>,
"Vitor Sato Eschholz" <vsatoes@baylibre.com>,
"Lukasz Majewski" <lukma@denx.de>, "Marek Vasut" <marex@denx.de>,
"Peng Fan" <peng.fan@nxp.com>,
"Jaehoon Chung" <jh80.chung@samsung.com>,
"Neil Armstrong" <neil.armstrong@linaro.org>,
"Julien Masson" <jmasson@baylibre.com>,
"Alexey Charkov" <alchark@gmail.com>,
"Adrian Freihofer" <adrian.freihofer@siemens.com>,
"Francois Berder" <fberder@outlook.fr>,
"Ilias Apalodimas" <ilias.apalodimas@linaro.org>,
"Marek Vasut" <marek.vasut+renesas@mailbox.org>,
"Vincent Jardin" <vjardin@free.fr>,
"Peter Robinson" <pbrobinson@gmail.com>
Subject: Re: [PATCH RFC v3 3/5] fastboot: make shared configuration checks phase-aware
Date: Mon, 17 Aug 2026 11:11:37 +0200 [thread overview]
Message-ID: <87cxvhi01i.fsf@kernel.org> (raw)
In-Reply-To: <20260731-ccaione-upstream-spl-fastboot-v3-3-dbea3ff4529e@baylibre.com>
Hi Carlo,
Thank you for the patch.
On Fri, Jul 31, 2026 at 10:29, Carlo Caione <ccaione@baylibre.com> wrote:
> Fastboot currently builds only for U-Boot proper, so its source and
> Makefile rules test CONFIG_FASTBOOT_* directly. The same checks would
> select U-Boot-proper options when these files are compiled for another
> phase, potentially compiling unavailable backends or using the wrong
> configuration values.
>
> Use CONFIG_IS_ENABLED(), CONFIG_VAL() and CONFIG_$(PHASE_) consistently
> for code and object selection. The empty phase prefix preserves the
> existing U-Boot-proper configuration and behavior while making the
> shared implementation safe to reuse from SPL.
>
> Signed-off-by: Julien Masson <jmasson@baylibre.com>
> Signed-off-by: Vitor Sato Eschholz <vsatoes@baylibre.com>
> Signed-off-by: Carlo Caione <ccaione@baylibre.com>
Sorry for the review delays.
> ---
> drivers/Makefile | 2 +-
> drivers/fastboot/Makefile | 8 ++++----
> drivers/fastboot/fb_block.c | 9 ++++-----
> drivers/fastboot/fb_command.c | 31 +++++++++++++++++--------------
> drivers/fastboot/fb_common.c | 4 ++--
> drivers/fastboot/fb_getvar.c | 14 +++++++-------
> drivers/fastboot/fb_mmc.c | 36 ++++++++++++++++++------------------
Shouldn't the newly created drivers/fastboot/fb_usb.c be converted as
well?
From what I can see in there, we have:
IS_ENABLED(CONFIG_CMD_FASTBOOT_ABORT_KEYED) which should become:
CONFIG_IS_ENABLED(CMD_FASTBOOT_ABORT_KEYED)
> 7 files changed, 53 insertions(+), 51 deletions(-)
>
> diff --git a/drivers/Makefile b/drivers/Makefile
> index 43d0ba33281..43d03479146 100644
> --- a/drivers/Makefile
> +++ b/drivers/Makefile
> @@ -12,6 +12,7 @@ obj-$(CONFIG_$(PHASE_)DMA) += dma/
> obj-$(CONFIG_$(PHASE_)DMA_LEGACY) += dma/
> obj-$(CONFIG_$(PHASE_)DFU) += dfu/
> obj-$(CONFIG_$(PHASE_)EXTCON) += extcon/
> +obj-$(CONFIG_$(PHASE_)FASTBOOT) += fastboot/
> obj-$(CONFIG_$(PHASE_)GPIO) += gpio/
> obj-$(CONFIG_$(PHASE_)DRIVERS_MISC) += misc/
> obj-$(CONFIG_$(PHASE_)SYSRESET) += sysreset/
> @@ -93,7 +94,6 @@ obj-y += block/
> obj-y += cache/
> obj-$(CONFIG_CPU) += cpu/
> obj-y += crypto/
> -obj-$(CONFIG_FASTBOOT) += fastboot/
> obj-$(CONFIG_FWU_MDATA) += fwu-mdata/
> obj-y += misc/
> obj-$(CONFIG_MMC) += mmc/
> diff --git a/drivers/fastboot/Makefile b/drivers/fastboot/Makefile
> index 32e8e072c88..12008ac05e2 100644
> --- a/drivers/fastboot/Makefile
> +++ b/drivers/fastboot/Makefile
> @@ -4,8 +4,8 @@ obj-y += fb_common.o
> obj-y += fb_getvar.o
> obj-y += fb_command.o
> obj-$(CONFIG_USB_FUNCTION_FASTBOOT) += fb_usb.o
Same question here, should CONFIG_USB_FUNCTION_FASTBOOT move to a phase
specific as well?
The rest looks good.
Thanks
Mattijs
next prev parent reply other threads:[~2026-08-17 9:11 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-07-31 8:29 [PATCH RFC v3 0/5] Add fastboot to SPL Carlo Caione
2026-07-31 8:29 ` [PATCH RFC v3 1/5] fastboot: factor out the USB session runner Carlo Caione
2026-08-17 8:49 ` Mattijs Korpershoek
2026-07-31 8:29 ` [PATCH RFC v3 2/5] fastboot: use the common handler for USB reboot Carlo Caione
2026-08-17 8:56 ` Mattijs Korpershoek
2026-07-31 8:29 ` [PATCH RFC v3 3/5] fastboot: make shared configuration checks phase-aware Carlo Caione
2026-08-17 9:11 ` Mattijs Korpershoek [this message]
2026-07-31 8:29 ` [PATCH RFC v3 4/5] image: sparse: add phase-aware SPL support Carlo Caione
2026-08-17 9:34 ` Mattijs Korpershoek
2026-07-31 8:29 ` [PATCH RFC v3 5/5] fastboot: add " Carlo Caione
2026-08-17 12:35 ` Mattijs Korpershoek
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=87cxvhi01i.fsf@kernel.org \
--to=mkorpershoek@kernel.org \
--cc=GSS_MTK_Uboot_upstream@mediatek.com \
--cc=Macpaul.Lin@mediatek.com \
--cc=Suhrid.Subramaniam@mediatek.com \
--cc=adrian.freihofer@siemens.com \
--cc=alchark@gmail.com \
--cc=arnaud.ferraris@collabora.com \
--cc=ccaione@baylibre.com \
--cc=dlechner@baylibre.com \
--cc=fberder@outlook.fr \
--cc=ilias.apalodimas@linaro.org \
--cc=jh80.chung@samsung.com \
--cc=jmasson@baylibre.com \
--cc=lukma@denx.de \
--cc=marek.vasut+renesas@mailbox.org \
--cc=marex@denx.de \
--cc=me@samcday.com \
--cc=neil.armstrong@linaro.org \
--cc=pablo.sun@mediatek.com \
--cc=pbrobinson@gmail.com \
--cc=peng.fan@nxp.com \
--cc=quentin.schulz@cherry.de \
--cc=sjg@chromium.org \
--cc=trini@konsulko.com \
--cc=u-boot@lists.u-boot-project.org \
--cc=vjardin@free.fr \
--cc=vsatoes@baylibre.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox