U-Boot Archive on lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH v4 0/3] env: Access Environment in SPI flashes before relocation
@ 2020-10-10  8:28 Heiko Schocher
  2020-10-10  8:28 ` [PATCH v4 1/3] env: split env_import_redund() into 2 functions Heiko Schocher
                   ` (2 more replies)
  0 siblings, 3 replies; 13+ messages in thread
From: Heiko Schocher @ 2020-10-10  8:28 UTC (permalink / raw)
  To: u-boot

Add the possibility to access Environment stored in SPI NOR
Flash before relocation. This is used in DM/DTS rework for
the aristainetos boards. There mutliple DTS are packed into
a FIT image and through a variable in the Environment
the correct DTS will be selected. For this we need very
early access to the Environment. Also may this is good
for selecting the console baudrate again through Environment
which I think currently does not work for any board based on
DM/DTS and with Environment in SPI NOR flash.

Add this to aristainetos board, as aristainetos DM board
updates are now in mainline.

travis build:
https://travis-ci.org/github/hsdenx/u-boot-test/builds/733559949

Changes in v4:
- rebased to current master 5dcf7cc590

Changes in v3:
- env_sf_init_early() always return 0 now. If we do not return
  0 in this function, env_set_inited() never get called,
  which has the consequence that env_load/save/erase never
  work, because they check if the init bit is set.
- add comment from Simon Glass
  - add missing function comments
  - use if(IS_ENABLED...)
  - drop extra brackets
  - let env_sf_init() decide, which function to call
    add comment that it is necessary to return env_sf_init()
    with 0.
- new in v3 as aristainetos board DM changes are in
  mainline now

Changes in v2:
- patch "env: split env_import_redund into 2 functions"
  is new in version 2. Idea is to not duplicate too much
  code as Simon suggested.

Heiko Schocher (3):
  env: split env_import_redund() into 2 functions
  env: Access Environment in SPI flashes before relocation
  imx6: enable early spi environment access on aristainetos boards

 configs/aristainetos2_defconfig     |   1 +
 configs/aristainetos2b_defconfig    |   1 +
 configs/aristainetos2bcsl_defconfig |   1 +
 configs/aristainetos2c_defconfig    |   1 +
 env/Kconfig                         |   8 +++
 env/common.c                        |  42 +++++++++---
 env/sf.c                            | 100 +++++++++++++++++++++++++++-
 include/env.h                       |  18 +++++
 8 files changed, 159 insertions(+), 13 deletions(-)

-- 
2.25.4

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

end of thread, other threads:[~2020-11-02  5:20 UTC | newest]

Thread overview: 13+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2020-10-10  8:28 [PATCH v4 0/3] env: Access Environment in SPI flashes before relocation Heiko Schocher
2020-10-10  8:28 ` [PATCH v4 1/3] env: split env_import_redund() into 2 functions Heiko Schocher
2020-10-12  3:35   ` Simon Glass
2020-10-30 18:46   ` Tom Rini
2020-10-10  8:28 ` [PATCH v4 2/3] env: Access Environment in SPI flashes before relocation Heiko Schocher
2020-10-12  3:35   ` Simon Glass
2020-10-30 18:46   ` Tom Rini
2020-10-30 23:51   ` Michael Walle
2020-10-31  0:07     ` Tom Rini
2020-10-31  0:25       ` Michael Walle
2020-11-02  5:20       ` Heiko Schocher
2020-10-10  8:28 ` [PATCH v4 3/3] imx6: enable early spi environment access on aristainetos boards Heiko Schocher
2020-10-30 18:46   ` Tom Rini

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