public inbox for u-boot@lists.denx.de
 help / color / mirror / Atom feed
* [PATCH 0/8] env: mmc: improvements and corrections
@ 2022-11-10 10:48 Patrick Delaunay
  2022-11-10 10:48 ` [PATCH 1/8] env: mmc: introduced ENV_MMC_OFFSET Patrick Delaunay
                   ` (9 more replies)
  0 siblings, 10 replies; 20+ messages in thread
From: Patrick Delaunay @ 2022-11-10 10:48 UTC (permalink / raw)
  To: u-boot
  Cc: Patrick Delaunay, Jaehoon Chung, Joe Hershberger, Patrice Chotard,
	Peng Fan, U-Boot STM32, Wolfgang Denk


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.

Regards

Patrick



Patrick Delaunay (8):
  env: mmc: introduced ENV_MMC_OFFSET
  env: mcc: Drop unnecessary #ifdefs
  env: mcc: fix compilation error with ENV_IS_EMBEDDED
  env: mmc: add CONFIG_ENV_MMC_USE_DT
  configs: stm32mp: activate CONFIG_ENV_MMC_USE_DT
  env: mmc: select GPT env partition by type guid
  env: mmc: add debug message when mmc-env-partition is not found
  env: mmc: cosmetic: remove unused macro STR(X)

 configs/stm32mp13_defconfig         |   1 +
 configs/stm32mp15_basic_defconfig   |   1 +
 configs/stm32mp15_defconfig         |   1 +
 configs/stm32mp15_trusted_defconfig |   1 +
 env/Kconfig                         |  16 +++
 env/mmc.c                           | 182 ++++++++++++++++++----------
 6 files changed, 135 insertions(+), 67 deletions(-)

-- 
2.25.1


^ permalink raw reply	[flat|nested] 20+ messages in thread

end of thread, other threads:[~2023-01-10 19:51 UTC | newest]

Thread overview: 20+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
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
2023-01-10 19:51 ` Tom Rini

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox