From: Carlo Caione <ccaione@baylibre.com>
To: David Lechner <dlechner@baylibre.com>
Cc: GSS_MTK_Uboot_upstream <GSS_MTK_Uboot_upstream@mediatek.com>,
u-boot@lists.u-boot-project.org, "Tom Rini" <trini@konsulko.com>,
"Ilias Apalodimas" <ilias.apalodimas@linaro.org>,
"Ryder Lee" <ryder.lee@mediatek.com>,
"Weijie Gao" <weijie.gao@mediatek.com>,
"Chunfeng Yun" <chunfeng.yun@mediatek.com>,
"Igor Belwon" <igor.belwon@mentallysanemainliners.org>,
"Julien Stephan" <jstephan@baylibre.com>,
"Julien Masson" <jmasson@baylibre.com>,
"Johan Jonker" <jbx6244@gmail.com>,
"Macpaul Lin" <macpaul.lin@mediatek.com>,
"Chris-QJ Chen" <chris-qj.chen@mediatek.com>,
"Neil Armstrong" <neil.armstrong@linaro.org>,
"Bastien Curutchet" <bastien.curutchet@bootlin.com>,
"Alexey Charkov" <alchark@gmail.com>,
"Vitor Sato Eschholz" <vsatoes@baylibre.com>,
"Pablo Sun (孫毓翔)" <pablo.sun@mediatek.com>,
"Arnaud Ferraris" <arnaud.ferraris@collabora.com>,
"Suhrid Subramaniam" <Suhrid.Subramaniam@mediatek.com>
Subject: Re: [PATCH 2/3] arm: mediatek: enable U-Boot fastboot DAs on Genio 510 and 700
Date: Wed, 23 Sep 2026 16:25:07 +0200 [thread overview]
Message-ID: <arPe_JbLjVvUXjRM@macbook> (raw)
In-Reply-To: <6070e105-ef8c-41bd-9dcb-29f6f0b92af2@baylibre.com>
On Tue, Sep 22, 2026 at 11:27:35 +0100, David Lechner wrote:
> On 9/14/26 8:35 AM, Carlo Caione wrote:
> > Some provisioning flows need U-Boot's command support in addition to
> > fastboot. Provide a U-Boot-based download agent for Genio 510 and 700 so
> > these flows can run without relying on firmware already stored on the
> > board.
>
> So this is providing the same utility as in the previous patch, but also
> uses U-Boot proper? Why do we need both?
I'll explain that better in the next respin but basically U-Boot proper
is preferred when the complete agent fits BootROM's SRAM download area
before DRAM initialization (it is preferred because well, you have the
full U-Boot at your disposal).
The SPL alternative is useful for tighter payload budgets, because it
avoids the space required by BL31 and U-Boot proper (an external DDR
loader is still required).
So it is just matter of space really: if you have enough SRAM usable as
download area it is better to go with proper U-Boot, if space is tight
SPL is your only option.
> > diff --git a/arch/arm/mach-mediatek/spl.c b/arch/arm/mach-mediatek/spl.c
> > index 6f1ec052b95..75b51f4986e 100644
> > --- a/arch/arm/mach-mediatek/spl.c
> > +++ b/arch/arm/mach-mediatek/spl.c
> > @@ -33,6 +33,9 @@ void board_init_f(ulong dummy)
> >
> > u32 spl_boot_device(void)
> > {
> > + if (CONFIG_IS_ENABLED(RAM_DEVICE))
> > + return BOOT_DEVICE_RAM;
> > +
>
> It seems like this could unintentionally affect other MediaTek targets since
> they all share this code. Should we also check one of the FASTBOOT config
> options here?
Uh, good eye. Thanks for spotting this.
> > #if defined(CONFIG_SPL_SPI)
> > return BOOT_DEVICE_SPI;
> > #elif defined(CONFIG_SPL_MMC)
> Should we have a precursor patch to clean up the existing entries to also
> use CONFIG_IS_ENABLED() to keep this consistent?
I'll clean it up in this set, no need to have a precursor patch.
> (And I assume in the config from the first patch, this would fall though to
> BOOT_DEVICE_NONE since there is no u-boot proper in that case?)
mmh no, spl_boot_device() returns BOOT_DEVICE_MMC1, not
BOOT_DEVICE_NONE. The point is that there is no U-Boot proper inside the
SPL DA, but SPL can load it from eMMC.
Thank you for the review,
--
Carlo Caione
next prev parent reply other threads:[~2026-09-23 14:25 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-09-14 13:35 [PATCH 0/3] Add Genio 510 and 700 BootROM download agents Carlo Caione
2026-09-14 13:35 ` [PATCH 1/3] arm: mediatek: enable SPL fastboot DAs on Genio 510 and 700 Carlo Caione
2026-09-22 16:27 ` David Lechner
2026-09-23 14:15 ` Carlo Caione
2026-09-14 13:35 ` [PATCH 2/3] arm: mediatek: enable U-Boot " Carlo Caione
2026-09-22 16:27 ` David Lechner
2026-09-23 14:25 ` Carlo Caione [this message]
2026-09-23 14:55 ` David Lechner
2026-09-23 16:14 ` Carlo Caione
2026-09-14 13:35 ` [PATCH 3/3] doc: board: mediatek: document Genio download agents Carlo Caione
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=arPe_JbLjVvUXjRM@macbook \
--to=ccaione@baylibre.com \
--cc=GSS_MTK_Uboot_upstream@mediatek.com \
--cc=Suhrid.Subramaniam@mediatek.com \
--cc=alchark@gmail.com \
--cc=arnaud.ferraris@collabora.com \
--cc=bastien.curutchet@bootlin.com \
--cc=chris-qj.chen@mediatek.com \
--cc=chunfeng.yun@mediatek.com \
--cc=dlechner@baylibre.com \
--cc=igor.belwon@mentallysanemainliners.org \
--cc=ilias.apalodimas@linaro.org \
--cc=jbx6244@gmail.com \
--cc=jmasson@baylibre.com \
--cc=jstephan@baylibre.com \
--cc=macpaul.lin@mediatek.com \
--cc=neil.armstrong@linaro.org \
--cc=pablo.sun@mediatek.com \
--cc=ryder.lee@mediatek.com \
--cc=trini@konsulko.com \
--cc=u-boot@lists.u-boot-project.org \
--cc=vsatoes@baylibre.com \
--cc=weijie.gao@mediatek.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