[PATCH v2] xilinx: board: Add support to pick bootscr address from DT

Michal Simek michal.simek at amd.com
Fri Jul 14 08:19:25 CEST 2023



On 7/13/23 22:51, Simon Glass wrote:
> Hi Michal,
> 
> On Thu, 13 Jul 2023 at 06:54, Michal Simek <michal.simek at amd.com> wrote:
>>
>> From: Algapally Santosh Sagar <santoshsagar.algapally at amd.com>
>>
>> The bootscript is expected at a default address specific to each
>> platform.
>> When high speed memory like Programmable Logic Double Data Rate RAM
>> (PL DDR RAM) or Higher Bandwidth Memory RAM (HBM) is used the boot.scr
>> may be loaded at a different offset. The offset needs to be set through
>> setenv. Due to the default values in some cases the boot.scr is falling
>> in between the kernel partition.
>>
>> The bootscript address or the bootscript offset is fetched directly from
>> the DT and updated in the environment making it easier for automated
>> flows.
>>
>> Signed-off-by: Algapally Santosh Sagar <santoshsagar.algapally at amd.com>
>> Signed-off-by: Michal Simek <michal.simek at amd.com>
>> ---
>>
>> Changes in v2:
>> - s/bootscr-offset-from-ram-start/bootscr-ram-offset/
>> - Aligned with https://github.com/devicetree-org/dt-schema/pull/105
>>
>>   board/xilinx/common/board.c | 43 ++++++++++++++++++++++++++++++++++---
>>   1 file changed, 40 insertions(+), 3 deletions(-)
> 
> How about we start a new 'options' API in /common to read things from
> /options? You could have opt_bootscript_addr() as the first member?

Actually I was thinking if make sense to pretty much move this code to generic 
common location that it can be reused by others.
Not sure if make sense to create new functions for all DT options properties 
because they should be read only once not multiple times.
Or do you see the reason to call them multiple times?

Thanks,
Michal



More information about the U-Boot mailing list