[U-Boot] [PATCH 04/10] rockchip: spl: support a 'same-as-spl'-specifier in the spl-boot-order

Dr. Philipp Tomsich philipp.tomsich at theobroma-systems.com
Wed Sep 13 08:13:37 UTC 2017


> On 13 Sep 2017, at 06:25, Simon Glass <sjg at chromium.org> wrote:
> 
> On 11 September 2017 at 05:59, Philipp Tomsich
> <philipp.tomsich at theobroma-systems.com <mailto:philipp.tomsich at theobroma-systems.com>> wrote:
>> It is often desirable to configure the spl-boot-order (i.e. the order
>> that SPL probes devices to find the FIT image containing a full U-Boot)
>> such that it contains 'the same device the SPL stage was booted from'
>> early on.  To support this, we introduce the 'same-as-spl' specifier
>> for the spl-boot-order property.
>> 
>> This commit adds:
>> - documentation for the new board_spl_was_booted_from() function that
>>   individual SoCs/boards should provide, if they can determine where
>>   the SPL was booted from
>> - implements the new board_spl_was_booted_from() stub function
>> - adds support for handling the 'same-as-spl' specifier and calling
>>   into the per-SoC/per-board support code.
>> 
>> This also updates the documentation for the 'u-boot,spl-boot-order'
>> property.
>> 
>> Signed-off-by: Philipp Tomsich <philipp.tomsich at theobroma-systems.com>
>> ---
>> 
>> arch/arm/mach-rockchip/spl-boot-order.c | 29 ++++++++++++++++++++++++++++-
>> doc/device-tree-bindings/chosen.txt     | 12 +++++++++++-
>> 2 files changed, 39 insertions(+), 2 deletions(-)
> 
> Can that weak function be declared in a header file somewhere?

I’d rather save this change for when we lift the code from spl-boot-order.c up
into the common SPL support code (when the declaration of these should end
up in spl.h): this has been always written to be useful across boards, but I had
hoped to let this stabilise in our sub-arch first.

> One day we should have SPL pass to U-Boot a structure containing this
> information and other things it wants to pass on...
> 
> Reviewed-by: Simon Glass <sjg at chromium.org <mailto:sjg at chromium.org>>



More information about the U-Boot mailing list