public inbox for u-boot@lists.denx.de
 help / color / mirror / Atom feed
From: Tom Rini <trini@konsulko.com>
To: Simon Glass <sjg@chromium.org>
Cc: Patrick Delaunay <patrick.delaunay@foss.st.com>,
	u-boot@lists.denx.de, Jaehoon Chung <jh80.chung@samsung.com>,
	Joe Hershberger <joe.hershberger@ni.com>,
	Patrice Chotard <patrice.chotard@foss.st.com>,
	Peng Fan <peng.fan@nxp.com>,
	U-Boot STM32 <uboot-stm32@st-md-mailman.stormreply.com>,
	Wolfgang Denk <wd@denx.de>
Subject: Re: [PATCH 0/8] env: mmc: improvements and corrections
Date: Sat, 12 Nov 2022 14:21:16 -0500	[thread overview]
Message-ID: <20221112192116.GK7282@bill-the-cat> (raw)
In-Reply-To: <CAPnjgZ2TKaQZJk4bGnLVZ9uqFLEfMQt+qm=q5FBn-sJKhaOKPw@mail.gmail.com>

[-- Attachment #1: Type: text/plain, Size: 2326 bytes --]

On Thu, Nov 10, 2022 at 01:40:32PM -0700, Simon Glass wrote:
> Hi Patrick,
> 
> On Thu, 10 Nov 2022 at 03:49, Patrick Delaunay
> <patrick.delaunay@foss.st.com> wrote:
> >
> >
> > Update in U-Boot env mmc backend with several cosmetic changes or
> > corrections and 2 new features:
> >
> > 1/ CONFIG_ENV_MMC_USE_DT = no more use CONFIG_ENV_OFFSET
> >    in the mmc ENV backend when this config is activated.
> >
> >    Requested by the STM32MP STMicroelectronics boards which activate
> >    several ENV_IS_IN_XXX; the value of CONFIG_ENV_OFFSET is invalid for
> >    SD-Card / eMMC boot; this offset should only used in SPIFlash backend
> >    (sf.c) for SPI-NOR boot.
> >
> >    If this offset is used on mmc backend, when partition name in GPT is
> >    not aligned with  U-Boot DT: "u-boot,mmc-env-partition", the behavior
> >    is difficult to debug: a partition is corrupted on 'env save' command.
> >
> > 2/ selects the GPT env partition by the "u-boot-env" type GUID introduced
> >    by the commit c0364ce1c695 ("doc/README.gpt: define partition
> >    type GUID for U-Boot environment")
> >
> >    This feature can also avoid issue when 'u-boot-env' partition name
> >    change in GPT partitioning but not in the U-Boot DT with
> >    "u-boot,mmc-env-partition"
> >
> > Few check patch warnings remained in the series,
> > but after check I can't remove them :
> >
> > - IS_ENABLED(ENV_MMC_HWPART_REDUND) is normally used as
> >   IS_ENABLED(CONFIG_ENV_MMC_HWPART_REDUND)
> >   => ENV_MMC_HWPART_REDUND is locally defined in this file it is not
> >      a real CONFIG but I can use the IS_ENABLED() macro as it is defined
> >      to 1
> >
> > - Use 'if (IS_ENABLED(CONFIG...))' instead of '#if or #ifdef' where
> >   possible
> >   + CONFIG_PARTITION_TYPE_GUID => info.type_guid existence
> >   + CONFIG_ENV_OFFSET_REDUND and CONFIG_ENV_MMC_USE_DT => only for define
> >
> > As I miss the merge window, not targeted for v2023.01 but for next
> > v2023.04.
> 
> Shouldn't this all move to device tree? Using CONFIG options is such a
> mess. We have the devices in DT so can indicate which ones have an
> environment and what the parameters are for each.

And there's already the
Documentation/devicetree/bindings/nvmem/u-boot,env.yaml to build upon.

-- 
Tom

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 659 bytes --]

  reply	other threads:[~2022-11-12 19:21 UTC|newest]

Thread overview: 20+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-11-10 10:48 [PATCH 0/8] env: mmc: improvements and corrections Patrick Delaunay
2022-11-10 10:48 ` [PATCH 1/8] env: mmc: introduced ENV_MMC_OFFSET Patrick Delaunay
2022-12-06  8:11   ` [Uboot-stm32] " Patrice CHOTARD
2022-11-10 10:48 ` [PATCH 2/8] env: mcc: Drop unnecessary #ifdefs Patrick Delaunay
2022-12-06  8:11   ` [Uboot-stm32] " Patrice CHOTARD
2022-11-10 10:49 ` [PATCH 3/8] env: mcc: fix compilation error with ENV_IS_EMBEDDED Patrick Delaunay
2022-12-06  8:11   ` [Uboot-stm32] " Patrice CHOTARD
2022-11-10 10:49 ` [PATCH 4/8] env: mmc: add CONFIG_ENV_MMC_USE_DT Patrick Delaunay
2022-12-06  8:11   ` [Uboot-stm32] " Patrice CHOTARD
2022-11-10 10:49 ` [PATCH 5/8] configs: stm32mp: activate CONFIG_ENV_MMC_USE_DT Patrick Delaunay
2022-12-06  8:17   ` Patrice CHOTARD
2022-11-10 10:49 ` [PATCH 6/8] env: mmc: select GPT env partition by type guid Patrick Delaunay
2022-12-06  8:11   ` [Uboot-stm32] " Patrice CHOTARD
2022-11-10 10:49 ` [PATCH 7/8] env: mmc: add debug message when mmc-env-partition is not found Patrick Delaunay
2022-12-06  8:16   ` [Uboot-stm32] " Patrice CHOTARD
2022-11-10 10:49 ` [PATCH 8/8] env: mmc: cosmetic: remove unused macro STR(X) Patrick Delaunay
2022-12-06  8:16   ` [Uboot-stm32] " Patrice CHOTARD
2022-11-10 20:40 ` [PATCH 0/8] env: mmc: improvements and corrections Simon Glass
2022-11-12 19:21   ` Tom Rini [this message]
2023-01-10 19:51 ` 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=20221112192116.GK7282@bill-the-cat \
    --to=trini@konsulko.com \
    --cc=jh80.chung@samsung.com \
    --cc=joe.hershberger@ni.com \
    --cc=patrice.chotard@foss.st.com \
    --cc=patrick.delaunay@foss.st.com \
    --cc=peng.fan@nxp.com \
    --cc=sjg@chromium.org \
    --cc=u-boot@lists.denx.de \
    --cc=uboot-stm32@st-md-mailman.stormreply.com \
    --cc=wd@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