public inbox for u-boot@lists.denx.de
 help / color / mirror / Atom feed
From: Andre Przywara <andre.przywara@arm.com>
To: Samuel Holland <samuel@sholland.org>
Cc: Jagan Teki <jagan@amarulasolutions.com>,
	u-boot@lists.denx.de, Icenowy Zheng <icenowy@aosc.io>,
	Jesse Taube <Mr.Bossman075@gmail.com>
Subject: Re: [PATCH v3 3/4] sunxi: binman: Support FIT generation for 32-bit SoCs
Date: Fri, 8 Dec 2023 01:26:28 +0000	[thread overview]
Message-ID: <20231208012628.690bbdb3@slackpad.lan> (raw)
In-Reply-To: <20231031051805.62430-4-samuel@sholland.org>

On Tue, 31 Oct 2023 00:17:40 -0500
Samuel Holland <samuel@sholland.org> wrote:

Hi,

> Some 32-bit SoCs can use SCP firmware to implement additional PSCI
> functionality, such as system suspend. In order to load this firmware
> from SPL, we need to generate and use a FIT instead of a legacy image.
> 
> Adjust the binman FIT definition so it does not rely on TF-A BL31, as
> this is not used on 32-bit SoCs. Instead, after loading the firmware,
> U-Boot proper is executed directly.

I like that it removes the artificial restriction to use a FIT image
only on arm64 builds, and indeed hinges that on the relevant
CONFIG_SPL_LOAD_FIT variable.
The changes look alright, even "uboot" being mentioned twice (once as
firmware, once as loadable): the SPL code can cope with that.

> Signed-off-by: Samuel Holland <samuel@sholland.org>

Reviewed-by: Andre Przywara <andre.przywara@arm.com>

Cheers,
Andre

> ---
> 
> (no changes since v2)
> 
> Changes in v2:
>  - Rely on binman min-size instead of using explicit offsets
>  - Use Kconfig for firmware addresses instead of an #ifdef staircase
> 
>  arch/arm/dts/sunxi-u-boot.dtsi | 23 ++++++++++++++++++-----
>  1 file changed, 18 insertions(+), 5 deletions(-)
> 
> diff --git a/arch/arm/dts/sunxi-u-boot.dtsi b/arch/arm/dts/sunxi-u-boot.dtsi
> index 7a8764e463b..ed1cb91eeb5 100644
> --- a/arch/arm/dts/sunxi-u-boot.dtsi
> +++ b/arch/arm/dts/sunxi-u-boot.dtsi
> @@ -1,5 +1,11 @@
>  #include <config.h>
>  
> +#ifdef CONFIG_ARM64
> +#define ARCH "arm64"
> +#else
> +#define ARCH "arm"
> +#endif
> +
>  / {
>  	aliases {
>  		mmc0 = &mmc0;
> @@ -34,30 +40,32 @@
>  			filename = "spl/sunxi-spl.bin";
>  		};
>  
> -#ifdef CONFIG_ARM64
> +#ifdef CONFIG_SPL_LOAD_FIT
>  		fit {
> -			description = "Configuration to load ATF before U-Boot";
> +			description = "Configuration to load U-Boot and firmware";
>  			#address-cells = <1>;
>  			fit,fdt-list = "of-list";
>  
>  			images {
>  				uboot {
> -					description = "U-Boot (64-bit)";
> +					description = "U-Boot";
>  					type = "standalone";
>  					os = "u-boot";
> -					arch = "arm64";
> +					arch = ARCH;
>  					compression = "none";
>  					load = <CONFIG_TEXT_BASE>;
> +					entry = <CONFIG_TEXT_BASE>;
>  
>  					u-boot-nodtb {
>  					};
>  				};
>  
> +#if CONFIG_SUNXI_BL31_BASE
>  				atf {
>  					description = "ARM Trusted Firmware";
>  					type = "firmware";
>  					os = "arm-trusted-firmware";
> -					arch = "arm64";
> +					arch = ARCH;
>  					compression = "none";
>  					load = <CONFIG_SUNXI_BL31_BASE>;
>  					entry = <CONFIG_SUNXI_BL31_BASE>;
> @@ -67,6 +75,7 @@
>  						missing-msg = "atf-bl31-sunxi";
>  					};
>  				};
> +#endif
>  
>  #if CONFIG_SUNXI_SCP_BASE
>  				scp {
> @@ -95,7 +104,11 @@
>  
>  				@config-SEQ {
>  					description = "NAME";
> +#if CONFIG_SUNXI_BL31_BASE
>  					firmware = "atf";
> +#else
> +					firmware = "uboot";
> +#endif
>  #if CONFIG_SUNXI_SCP_BASE
>  					loadables = "scp", "uboot";
>  #else


  parent reply	other threads:[~2023-12-08  1:41 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-10-31  5:17 [PATCH v3 0/4] sunxi: SPL FIT support for 32-bit sunxi SoCs Samuel Holland
2023-10-31  5:17 ` [PATCH v3 1/4] sunxi: spl: Disable padding from SPL_PAD_TO Samuel Holland
2023-12-08  0:25   ` Andre Przywara
2023-10-31  5:17 ` [PATCH v3 2/4] sunxi: binman: Move BL31 and SCP firmware addresses to Kconfig Samuel Holland
2023-12-08  0:33   ` Andre Przywara
2023-10-31  5:17 ` [PATCH v3 3/4] sunxi: binman: Support FIT generation for 32-bit SoCs Samuel Holland
2023-11-02 22:46   ` Simon Glass
2023-12-08  1:26   ` Andre Przywara [this message]
2024-01-29 16:58   ` Andre Przywara
2023-10-31  5:17 ` [PATCH v3 4/4] sunxi: Enable SPL FIT loading " Samuel Holland
2023-11-02 22:46   ` Simon Glass
2023-12-08  1:39   ` Andre Przywara
2024-01-17  0:19     ` Andre Przywara
2024-01-29 16:19       ` Andre Przywara
2023-11-01 17:11 ` [PATCH v3 0/4] sunxi: SPL FIT support for 32-bit sunxi SoCs Jesse T

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20231208012628.690bbdb3@slackpad.lan \
    --to=andre.przywara@arm.com \
    --cc=Mr.Bossman075@gmail.com \
    --cc=icenowy@aosc.io \
    --cc=jagan@amarulasolutions.com \
    --cc=samuel@sholland.org \
    --cc=u-boot@lists.denx.de \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox