public inbox for u-boot@lists.denx.de
 help / color / mirror / Atom feed
From: Peng Fan <peng.fan@oss.nxp.com>
To: William MARTIN <william.martin@muxen.fr>
Cc: Peng Fan <peng.fan@nxp.com>,
	"u-boot@lists.denx.de" <u-boot@lists.denx.de>,
	herve codina <herve.codina@bootlin.com>,
	Fabio Estevam <festevam@gmail.com>,
	Stefano Babic <sbabic@nabladev.com>,
	"Ye Li (OSS)" <ye.li@oss.nxp.com>, Tom Rini <trini@konsulko.com>,
	dl-uboot-imx <uboot-imx@nxp.com>
Subject: Re: [PATCH v3] arm: imx8m: add boot_device and boot_instance env variables
Date: Thu, 12 Feb 2026 11:42:53 +0800	[thread overview]
Message-ID: <aY1MPWlsprTWKn+S@shlinux89> (raw)
In-Reply-To: <97f029a0-ac83-42d0-87c7-fd09f88f1807@muxen.fr>

On Wed, Feb 11, 2026 at 02:18:28PM +0100, William MARTIN wrote:
>
>Le 11/02/2026 à 12:49, Peng Fan a écrit :
>> Hi William,
>> 
>> Thanks for your patch!
>> 
>> > Subject: [PATCH v3] arm: imx8m: add boot_device and boot_instance
>> > env variables
>> > 
>> > Some SoCs have supports for 'boot_device' and 'boot_instance'
>> > environment variable. Those variables help to choose the right boot
>> > media during the execution of the boot command.
>> > 
>> > The i.MX8M SoC doesn't have support for those variables but provides
>> > internally all the needed information to create those variables.
>> > 
>> > Fill this lack adding support for those variables in the i.MX8M SoC.
>> > 
>> > Signed-off-by: William MARTIN <william.martin@muxen.fr>
>> > ---
>> No change log here.
>I will add in next patch
>> 
>> >   arch/arm/mach-imx/imx8m/soc.c | 72
>> > +++++++++++++++++++++++++++++++++++
>> >   1 file changed, 72 insertions(+)
>> > 
>> > diff --git a/arch/arm/mach-imx/imx8m/soc.c b/arch/arm/mach-
>> > imx/imx8m/soc.c index 1fe083ae94f..498b565183b 100644
>> > --- a/arch/arm/mach-imx/imx8m/soc.c
>> > +++ b/arch/arm/mach-imx/imx8m/soc.c
>> > @@ -1472,6 +1472,76 @@ void reset_cpu(void)  #endif
>> > 
>> >   #if IS_ENABLED(CONFIG_ARCH_MISC_INIT)
>> > +static void setup_boot_mode(void)
>> > +{
>> > +       enum boot_device dev = get_boot_device();
>> > +
>> > +       log_debug("setup_boot_mode = %u\n", dev);
>> > +
>> > +       switch (dev) {
>> > +       case USB_BOOT:
>> > +               env_set("boot_device", "usb");
>> > +               env_set("boot_instance", "0");
>> > +               break;
>> > +
>> > +       case USB2_BOOT:
>> > +               env_set("boot_device", "usb");
>> > +               env_set("boot_instance", "1");
>> > +               break;
>> > +
>> > +       case QSPI_BOOT:
>> > +               env_set("boot_device", "flexspi");
>> i.MX8MQ does not have flexspi. It is qspi.
>> i.MX8MM/N/P has flexspi.
>> 
>> Regards
>> Peng.
>
>Thanks for your feedback.
>
>Does the use of IS_ENABLED(CONFIG_IMX8MQ) to change boot_device from flexspi
>to qspi is enought ?
>

if (IS_ENABLED(CONFIG_IMX8MQ))
	env_set("boot_device", "qspi");
else
	env_set("boot_device", "flexspi");

Regards
Peng

      reply	other threads:[~2026-02-12  3:41 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-02-11 10:31 [PATCH v3] arm: imx8m: add boot_device and boot_instance env variables William MARTIN
2026-02-11 11:49 ` Peng Fan
2026-02-11 13:18   ` William MARTIN
2026-02-12  3:42     ` Peng Fan [this message]

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=aY1MPWlsprTWKn+S@shlinux89 \
    --to=peng.fan@oss.nxp.com \
    --cc=festevam@gmail.com \
    --cc=herve.codina@bootlin.com \
    --cc=peng.fan@nxp.com \
    --cc=sbabic@nabladev.com \
    --cc=trini@konsulko.com \
    --cc=u-boot@lists.denx.de \
    --cc=uboot-imx@nxp.com \
    --cc=william.martin@muxen.fr \
    --cc=ye.li@oss.nxp.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