[U-Boot] [PATCH] splash: add support for loading splash from a FIT image
Tomas Melin
tomas.melin at vaisala.com
Fri Nov 25 10:34:00 CET 2016
Hi Simon,
On 11/24/2016 04:20 AM, Simon Glass wrote:
>> diff --git a/common/splash_source.c b/common/splash_source.c
>> index 72df2c1..d72aee1 100644
>> --- a/common/splash_source.c
>> +++ b/common/splash_source.c
>> @@ -16,6 +16,7 @@
>> #include <sata.h>
>> #include <bmp_layout.h>
>> #include <fs.h>
>> +#include <fdt_support.h>
>
> Can you please add a new patch to sort the includes?
Yes, will do.
>
> http://www.denx.de/wiki/U-Boot/CodingStyle
>
>>
>> DECLARE_GLOBAL_DATA_PTR;
>>
>> @@ -295,6 +296,74 @@ static struct splash_location *select_splash_location(
>> return NULL;
>> }
>>
>> +#ifdef CONFIG_FIT
>> +static int splash_load_fit(struct splash_location *location, u32 bmp_load_addr)
>
> Is it possible to use fit_image_load() here instead of writing a new
> function? I suppose not, since you need to load the data from an
> external source. Can we at least put the code to read the details into
> image.c, in a new function? Then this file can call it - it can return
> a struct with the info, or a few parameters, perhaps.
I'm assuming you meant image-fit.c. I added helpers for getting the
details into image-fit.c and now this file is calling those. I considered squashing
all calls to fit_image_ functions from here into one call, but I think using them one-by-one
from here looks cleaner. I can rework if you disagree.
>
> Also please see spl_load_simple_fit() where you might find some common code.
I checked both fit_image_load() and that, they do closely related things, but to me,
it looks as they cannot really be reused for this purpose.
>> }
>> diff --git a/include/splash.h b/include/splash.h
>> index 136eac7..af4e61f 100644
>> --- a/include/splash.h
>> +++ b/include/splash.h
>> @@ -35,6 +35,7 @@ enum splash_storage {
>> enum splash_flags {
>> SPLASH_STORAGE_RAW,
>> SPLASH_STORAGE_FS,
>> + SPLASH_STORAGE_FIT,
>> };
>
> Can you comment that enum please?
Adding comments. I'll send out a v2 of this patch shortly.
BR,
Tomas
>
>>
>> struct splash_location {
>> --
>> 2.1.4
>>
>
> Regards,
> Simon
>
More information about the U-Boot
mailing list