From: Tom Rini <trini@konsulko.com>
To: Carlo Caione <ccaione@baylibre.com>
Cc: u-boot@lists.u-boot-project.org,
uboot-stm32@st-md-mailman.stormreply.com,
"Peng Fan" <peng.fan@nxp.com>,
"Jaehoon Chung" <jh80.chung@samsung.com>,
"Neil Armstrong" <neil.armstrong@linaro.org>,
"Bastien Curutchet" <bastien.curutchet@bootlin.com>,
"Alexey Charkov" <alchark@gmail.com>,
"Johan Jonker" <jbx6244@gmail.com>,
"Richard Genoud" <richard.genoud@bootlin.com>,
"João Marcos Costa" <joaomarcos.costa@bootlin.com>,
"Miquel Raynal" <miquel.raynal@bootlin.com>,
"David Lechner" <dlechner@baylibre.com>,
"Julien Stephan" <jstephan@baylibre.com>,
"Ilias Apalodimas" <ilias.apalodimas@linaro.org>,
"Patrick Delaunay" <patrick.delaunay@foss.st.com>,
"Patrice Chotard" <patrice.chotard@foss.st.com>,
"Heinrich Schuchardt" <xypron.glpk@gmx.de>
Subject: Re: [PATCH v3 1/2] spl: mmc: select the boot partition after device initialization
Date: Mon, 14 Sep 2026 10:35:57 -0600 [thread overview]
Message-ID: <20260914163557.GA1764417@bill-the-cat> (raw)
In-Reply-To: <20260914-ccaione-upstream-part-dynamic-v3-1-a38c19e74563@baylibre.com>
[-- Attachment #1: Type: text/plain, Size: 1967 bytes --]
On Mon, Sep 14, 2026 at 10:31:37AM +0200, Carlo Caione wrote:
> Boards may need to read boot metadata before choosing the partition
> containing U-Boot. The partition hook currently runs before the MMC
> device is initialized, so it cannot do this reliably.
>
> Defer selection until the raw partition load and provide the initialized
> device to the existing hook. Explicit partition loads keep their supplied
> coordinates, and a successful Falcon boot needs no U-Boot selection.
>
> Signed-off-by: Carlo Caione <ccaione@baylibre.com>
[snip]
> diff --git a/include/spl.h b/include/spl.h
> index 5078d7525ab..08a84536f51 100644
> --- a/include/spl.h
> +++ b/include/spl.h
> @@ -595,18 +595,20 @@ u32 spl_mmc_boot_mode(struct mmc *mmc, const u32 boot_device);
>
> /**
> * spl_mmc_boot_partition() - MMC partition to load U-Boot from.
> + * @mmc: Initialized MMC device
> * @boot_device: ID of the device which the MMC driver wants to load
> * U-Boot from.
> *
> - * This function should return the partition number which the SPL
> - * should load U-Boot from (on the given boot_device) when
> - * CONFIG_SYS_MMCSD_RAW_MODE_U_BOOT_USE_PARTITION is set.
> + * Called before loading U-Boot in raw partition mode, after any Falcon
> + * attempt. The hook may select the hardware area containing the image;
> + * it must leave that area selected. It may run for each MMC load attempt.
> *
> * If not overridden, it is weakly defined in common/spl/spl_mmc.c.
> + *
> + * Return: Partition number to load U-Boot from.
> */
> -int spl_mmc_boot_partition(const u32 boot_device);
> +int spl_mmc_boot_partition(struct mmc *mmc, const u32 boot_device);
>
> -struct mmc;
Have you thrown this through CI? We have that forward declaration
because it's not otherwise defined, and we wanted to avoid pulling in a
big header chain here to declare it. So I worry something is going to
fail to build now.
--
Tom
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 228 bytes --]
next prev parent reply other threads:[~2026-09-14 16:36 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-09-14 8:31 [PATCH v3 0/2] Support board-selected raw partitions Carlo Caione
2026-09-14 8:31 ` [PATCH v3 1/2] spl: mmc: select the boot partition after device initialization Carlo Caione
2026-09-14 16:35 ` Tom Rini [this message]
2026-09-14 20:56 ` Carlo Caione
2026-09-14 21:33 ` Tom Rini
2026-09-21 20:05 ` Carlo Caione
2026-09-21 20:32 ` Tom Rini
2026-09-14 8:31 ` [PATCH v3 2/2] spl: mmc: make raw partition selection a choice Carlo Caione
2026-09-14 16:40 ` Tom Rini
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=20260914163557.GA1764417@bill-the-cat \
--to=trini@konsulko.com \
--cc=alchark@gmail.com \
--cc=bastien.curutchet@bootlin.com \
--cc=ccaione@baylibre.com \
--cc=dlechner@baylibre.com \
--cc=ilias.apalodimas@linaro.org \
--cc=jbx6244@gmail.com \
--cc=jh80.chung@samsung.com \
--cc=joaomarcos.costa@bootlin.com \
--cc=jstephan@baylibre.com \
--cc=miquel.raynal@bootlin.com \
--cc=neil.armstrong@linaro.org \
--cc=patrice.chotard@foss.st.com \
--cc=patrick.delaunay@foss.st.com \
--cc=peng.fan@nxp.com \
--cc=richard.genoud@bootlin.com \
--cc=u-boot@lists.u-boot-project.org \
--cc=uboot-stm32@st-md-mailman.stormreply.com \
--cc=xypron.glpk@gmx.de \
/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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.