All of lore.kernel.org
 help / color / mirror / Atom feed
From: Michael Nazzareno Trimarchi <michael@amarulasolutions.com>
To: Adam Ford <aford173@gmail.com>
Cc: Fabio Estevam <festevam@denx.de>,
	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>
Subject: Re: [PATCH 2/2] imx8mn/8mp: Select ENV_IS_NOWHERE
Date: Thu, 21 Apr 2022 19:01:13 +0200	[thread overview]
Message-ID: <CAOf5uw=06ifuGcmtm7Xywxwab3jNoMcreOy29UsSQYb3DT1LYA@mail.gmail.com> (raw)
In-Reply-To: <CAHCN7xLeGA5bkuiFwiJfzfS7_g6nMEEdtCWQQo60LRBa0C46Cg@mail.gmail.com>

Hi

On Thu, Apr 21, 2022 at 6:51 PM Adam Ford <aford173@gmail.com> wrote:
>
> On Thu, Apr 21, 2022 at 11:47 AM Fabio Estevam <festevam@denx.de> wrote:
> >
> > 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
> >
>
> I believe those were applied today.  I haven't verified it yet, but I
> think I saw the e-mail go by.
>
> > Is this the mechanism that you are looking for?

I have seen those patches already but the cost of a function pointer
and a call is more readable. If they get applied, I will be fine with
them ;)

Michael



-- 
Michael Nazzareno Trimarchi
Co-Founder & Chief Executive Officer
M. +39 347 913 2170
michael@amarulasolutions.com
__________________________________

Amarula Solutions BV
Joop Geesinkweg 125, 1114 AB, Amsterdam, NL
T. +31 (0)85 111 9172
info@amarulasolutions.com
www.amarulasolutions.com

  reply	other threads:[~2022-04-21 17:01 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
2022-04-21 16:51                   ` Adam Ford
2022-04-21 17:01                     ` Michael Nazzareno Trimarchi [this message]
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='CAOf5uw=06ifuGcmtm7Xywxwab3jNoMcreOy29UsSQYb3DT1LYA@mail.gmail.com' \
    --to=michael@amarulasolutions.com \
    --cc=aford173@gmail.com \
    --cc=festevam@denx.de \
    --cc=festevam@gmail.com \
    --cc=marex@denx.de \
    --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 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.