From: Fabio Estevam <festevam@denx.de>
To: Michael Nazzareno Trimarchi <michael@amarulasolutions.com>
Cc: Fabio Estevam <festevam@gmail.com>, Marek Vasut <marex@denx.de>,
Stefano Babic <sbabic@denx.de>, Peng Fan <peng.fan@nxp.com>,
U-Boot-Denx <u-boot@lists.denx.de>,
Adam Ford <aford173@gmail.com>
Subject: Re: [PATCH 2/2] imx8mn/8mp: Select ENV_IS_NOWHERE
Date: Thu, 21 Apr 2022 13:47:09 -0300 [thread overview]
Message-ID: <c22c61c4ab67ebc3f1b2d00bfe3adaeb@denx.de> (raw)
In-Reply-To: <CAOf5uwkt9UbV1Fo+A9YzTQ5fo220Hp3vAHfZ+9Lc=HbY1Rquxg@mail.gmail.com>
Hi Michael,
On 21/04/2022 13:34, Michael Nazzareno Trimarchi wrote:
> That function should drop. There is not other architecture that does
> it. What about:
I implemented your suggestion like this:
--- a/arch/arm/mach-imx/imx8m/soc.c
+++ b/arch/arm/mach-imx/imx8m/soc.c
@@ -1536,6 +1536,14 @@ enum env_location arch_env_get_location(enum
env_operation op, int prio)
return ENVL_UNKNOWN;
switch (dev) {
+ case USB_BOOT:
+ if (IS_ENABLED(CONFIG_ENV_IS_IN_SPI_FLASH))
+ return ENVL_SPI_FLASH;
+ if (IS_ENABLED(CONFIG_ENV_IS_IN_NAND))
+ return ENVL_NAND;
+ if (IS_ENABLED(CONFIG_ENV_IS_IN_MMC))
+ return ENVL_MMC;
+ return ENVL_NOWHERE;
case QSPI_BOOT:
case SPI_NOR_BOOT:
if (IS_ENABLED(CONFIG_ENV_IS_IN_SPI_FLASH))
This still allows me to save the env into the eMMC when U-Boot
is loaded from USB.
> register_enviroment_hook()
> deregister_enviroment_hook()
>
> This can replace the one default with board/arch etc
Marek submitted these patches:
https://source.denx.de/u-boot/u-boot/-/commit/de70e8879bb253f4d2a9ba9149cd41cb38b94ed8
https://source.denx.de/u-boot/u-boot/-/commit/e4dc2d0620851d6e0e784d4ef0a50f26e1e73857
Is this the mechanism that you are looking for?
next prev parent reply other threads:[~2022-04-21 16:47 UTC|newest]
Thread overview: 16+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-04-20 21:07 [PATCH 1/2] imx8mn_ddr4_evk: Add USB Mass Storage support Fabio Estevam
2022-04-20 21:07 ` [PATCH 2/2] imx8mn/8mp: Select ENV_IS_NOWHERE Fabio Estevam
2022-04-20 21:42 ` Marek Vasut
2022-04-20 22:03 ` Fabio Estevam
2022-04-20 22:15 ` Marek Vasut
2022-04-21 14:17 ` Fabio Estevam
2022-04-21 14:34 ` Michael Nazzareno Trimarchi
2022-04-21 16:18 ` Fabio Estevam
2022-04-21 16:34 ` Michael Nazzareno Trimarchi
2022-04-21 16:47 ` Fabio Estevam [this message]
2022-04-21 16:51 ` Adam Ford
2022-04-21 17:01 ` Michael Nazzareno Trimarchi
2022-04-21 17:03 ` Fabio Estevam
2022-04-21 17:10 ` Michael Nazzareno Trimarchi
2022-04-21 17:13 ` Fabio Estevam
2022-04-21 14:38 ` Marek Vasut
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=c22c61c4ab67ebc3f1b2d00bfe3adaeb@denx.de \
--to=festevam@denx.de \
--cc=aford173@gmail.com \
--cc=festevam@gmail.com \
--cc=marex@denx.de \
--cc=michael@amarulasolutions.com \
--cc=peng.fan@nxp.com \
--cc=sbabic@denx.de \
--cc=u-boot@lists.denx.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox