[U-Boot] [RFC PATCH 08/11] sunxi: SPL: add FIT config selector for Pine64 boards

Maxime Ripard maxime.ripard at free-electrons.com
Fri Jan 20 22:35:07 CET 2017


Hi,

On Fri, Jan 20, 2017 at 01:53:28AM +0000, Andre Przywara wrote:
> For a board or platform to support FIT loading in the SPL, it has to
> provide a board_fit_config_name_match() routine, which helps to select
> one of possibly multiple DTBs contained in a FIT image.
> Provide a simple function to cover the two different Pine64 models,
> which can be easily told apart by looking at the amount of installed
> RAM.
> 
> Signed-off-by: Andre Przywara <andre.przywara at arm.com>
> ---
>  board/sunxi/board.c | 13 +++++++++++++
>  1 file changed, 13 insertions(+)
> 
> diff --git a/board/sunxi/board.c b/board/sunxi/board.c
> index 5365638..bbbb826 100644
> --- a/board/sunxi/board.c
> +++ b/board/sunxi/board.c
> @@ -726,3 +726,16 @@ int ft_board_setup(void *blob, bd_t *bd)
>  #endif
>  	return 0;
>  }
> +
> +#ifdef CONFIG_SPL_LOAD_FIT
> +int board_fit_config_name_match(const char *name)
> +{
> +#ifdef CONFIG_MACH_SUN50I
> +	if ((gd->ram_size > 512 * 1024 * 1024))
> +		return !strcmp(name, "sun50i-a64-pine64-plus");
> +	else
> +		return !strcmp(name, "sun50i-a64-pine64");
> +#endif
> +	return -1;
> +}

That looks fishy. It means that any A64 board with CONFIG_SPL_LOAD_FIT
enabled will be considered a pine64 board?

Maxime


-- 
Maxime Ripard, Free Electrons
Embedded Linux and Kernel engineering
http://free-electrons.com
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 801 bytes
Desc: not available
URL: <http://lists.denx.de/pipermail/u-boot/attachments/20170120/d1e235d5/attachment.sig>


More information about the U-Boot mailing list