[U-Boot] [PATCH v2 0/3] Add generic FDT memory bank decoding and gd initialization
Nathan Rossi
nathan at nathanrossi.com
Mon Dec 12 08:14:54 CET 2016
Currently most boards that have static memory config (which cannot be
detected automatically) use CONFIG_SYS_SDRAM_SIZE to define the size of
memory which is hard coded into U-Boot. With the addition of device tree
support into U-Boot, boards that have device tree data can instead query
the memory bank information from the embedded or appended device tree.
This allows for more dynamic memory configuration and avoids the need to
hard code memory configuration into U-Boot.
The first patch of this series adds two helper functions for handling
the memory bank decoding and initialization of global data which can be
used by boards in their dram_init and dram_init_banksize functions. The
purpose of these helper functions is to provide generic functions that
handle the decoding and setup of memory and memory banks for boards that
intend to use this mechanism.
The series also changes the zynq and zynqmp board implementations to use
these functions to resolve a issue with static variable use.
Changes in v2:
* Make fdtdec_setup_memory_banksize() return value consistent
* Add more detail into the function documentation
Nathan Rossi (3):
fdt: add memory bank decoding functions for board setup
ARM: zynq: Replace board specific with generic memory bank decoding
ARM64: zynqmp: Replace board specific with generic memory bank
decoding
board/xilinx/zynq/board.c | 112 ++-----------------------------------------
board/xilinx/zynqmp/zynqmp.c | 112 ++-----------------------------------------
include/fdtdec.h | 34 +++++++++++++
lib/fdtdec.c | 54 +++++++++++++++++++++
4 files changed, 94 insertions(+), 218 deletions(-)
--
2.10.2
More information about the U-Boot
mailing list