[PATCH 0/2] dm: core: Add support for filling script_offset_f/script_size_f from DT

Michal Simek michal.simek at amd.com
Thu Aug 3 15:36:27 CEST 2023


The commit https://github.com/devicetree-org/dt-schema/pull/105 added
support for reading memory location where bootscript should be loaded.
This is follow up series on reading information from DT where boot script
is placed in flash memory.

Patches are based on

I didn't send pull request to dt-schema yet because I want to check logic
around it and DT variable names bootscr-flash-offset and bootscr-flash-size
are correct.

Also there should be follow up patch to remove CONFIG_BOOT_SCRIPT_OFFSET
Kconfig symbol and remove variable script_size_f setup from config file.

Also keep in mind that this is pretty much just 1:1 conversion between DT
and variable. Upstream code is using it for QSPI only and we are also using
in for NAND devices too. But the same approach could be used for DISKs,
EEPROMs or SD RAW. That's why I pretty much think that DT description
should be done a little bit differently.
For example:
bootscr-location = <&nvmem offset size>;


Michal Simek (2):
  dm: core: ofnode: Add ofnode_read_bootscript_flash()
  xilinx: board: Add support to pick bootscr flash offset/size from DT

 arch/sandbox/dts/test.dts   |  2 ++
 board/xilinx/common/board.c | 13 +++++++++++--
 drivers/core/ofnode.c       | 34 ++++++++++++++++++++++++++++++++++
 include/dm/ofnode.h         | 27 +++++++++++++++++++++++++++
 test/dm/ofnode.c            |  9 +++++++--
 5 files changed, 81 insertions(+), 4 deletions(-)


More information about the U-Boot mailing list