[U-Boot] [PATCH 0/3] Add generic FDT memory bank decoding and gd initialization
Nathan Rossi
nathan at nathanrossi.com
Sun Dec 11 17:47:35 CET 2016
On 12 December 2016 at 01:08, Igor Grinberg <grinberg at compulab.co.il> wrote:
> Hi Nathan,
>
> On 12/11/16 15:58, Nathan Rossi wrote:
>> This series adds two functions for handling the memory bank decoding and
>> initialization of global data for use by boards in their dram_init and
>> dram_init_banksize functions.
>
> I might have missed some discussions on this meter,
> can you please provide the use cases for this?
> IMO, the bootloader's job is to initialize the DRAM, detect its size, and pass
> the detected DRAM configuration on to an OS.
Hi Igor,
I do not think there have been any discussions on this (at least none
that I am aware of).
Some boards (like Zynq and ZynqMP ones) are using
CONFIG_SYS_SDRAM_SIZE to define the amount of memory that is available
(since detection is not possible). However with the introduction of
dtbs for some boards they are also capable of loading the size of
memory from the embedded/appended dtb (instead of hardcoded). This
allows for more of the board config to be loaded from the device tree
instead of from include/configs/*.h. This however is up to the
individual board to implement in its dram_init* functions.
The first patch of the series is only adding some decoding helper
functions to make this generic between the Zynq and ZynqMP boards as
well as to allow for any other boards that may want to use the same
mechanism to get the memory size from the fdt. There is no requirement
for boards to use these functions.
Regards,
Nathan
>
>>
>> The series also changes the zynq and zynqmp board implementations to use
>> these functions to resolve a issue with static variable use.
>>
>> 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 | 25 ++++++++++
>> lib/fdtdec.c | 54 +++++++++++++++++++++
>> 4 files changed, 85 insertions(+), 218 deletions(-)
>>
>
> --
> Regards,
> Igor.
More information about the U-Boot
mailing list