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>,
Simon Glass <sjg@chromium.org>
Subject: Re: [PATCH v3 2/4] sunxi: binman: Move BL31 and SCP firmware addresses to Kconfig
Date: Fri, 8 Dec 2023 00:33:48 +0000 [thread overview]
Message-ID: <20231208003348.0ab40d80@slackpad.lan> (raw)
In-Reply-To: <20231031051805.62430-3-samuel@sholland.org>
On Tue, 31 Oct 2023 00:17:39 -0500
Samuel Holland <samuel@sholland.org> wrote:
Hi Samuel,
> This is easier to read than the #ifdef staircase, provides better
> visibility into the memory map (alongside the other Kconfig
> definitions), and allows these addresses to be reused from code.
This is indeed much nicer, and simplifies adding more SoCs.
I checked that the addresses are the same:
> Reviewed-by: Simon Glass <sjg@chromium.org>
> 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:
> - New patch for v2, split from the .dtsi changes
>
> arch/arm/dts/sunxi-u-boot.dtsi | 24 +++++++-----------------
> arch/arm/mach-sunxi/Kconfig | 17 +++++++++++++++++
> 2 files changed, 24 insertions(+), 17 deletions(-)
>
> diff --git a/arch/arm/dts/sunxi-u-boot.dtsi b/arch/arm/dts/sunxi-u-boot.dtsi
> index a0c8abb7033..7a8764e463b 100644
> --- a/arch/arm/dts/sunxi-u-boot.dtsi
> +++ b/arch/arm/dts/sunxi-u-boot.dtsi
> @@ -1,15 +1,5 @@
> #include <config.h>
>
> -#ifdef CONFIG_MACH_SUN50I_H6
> -#define BL31_ADDR 0x104000
> -#define SCP_ADDR 0x114000
> -#elif defined(CONFIG_MACH_SUN50I_H616)
> -#define BL31_ADDR 0x40000000
> -#else
> -#define BL31_ADDR 0x44000
> -#define SCP_ADDR 0x50000
> -#endif
> -
> / {
> aliases {
> mmc0 = &mmc0;
> @@ -69,8 +59,8 @@
> os = "arm-trusted-firmware";
> arch = "arm64";
> compression = "none";
> - load = <BL31_ADDR>;
> - entry = <BL31_ADDR>;
> + load = <CONFIG_SUNXI_BL31_BASE>;
> + entry = <CONFIG_SUNXI_BL31_BASE>;
>
> atf-bl31 {
> filename = "bl31.bin";
> @@ -78,13 +68,13 @@
> };
> };
>
> -#ifdef SCP_ADDR
> +#if CONFIG_SUNXI_SCP_BASE
> scp {
> description = "SCP firmware";
> type = "firmware";
> arch = "or1k";
> compression = "none";
> - load = <SCP_ADDR>;
> + load = <CONFIG_SUNXI_SCP_BASE>;
>
> scp {
> filename = "scp.bin";
> @@ -106,10 +96,10 @@
> @config-SEQ {
> description = "NAME";
> firmware = "atf";
> -#ifndef SCP_ADDR
> - loadables = "uboot";
> -#else
> +#if CONFIG_SUNXI_SCP_BASE
> loadables = "scp", "uboot";
> +#else
> + loadables = "uboot";
> #endif
> fdt = "fdt-SEQ";
> };
> diff --git a/arch/arm/mach-sunxi/Kconfig b/arch/arm/mach-sunxi/Kconfig
> index a10e4c06b6a..b0fbda0aa09 100644
> --- a/arch/arm/mach-sunxi/Kconfig
> +++ b/arch/arm/mach-sunxi/Kconfig
> @@ -155,6 +155,23 @@ config SUNXI_RVBAR_ALTERNATIVE
> for all other SoCs, so the content of the SRAM_VER_REG becomes
> irrelevant there, and we can use the same code.
>
> +config SUNXI_BL31_BASE
> + hex
> + default 0x00044000 if MACH_SUN50I || MACH_SUN50I_H5
> + default 0x00104000 if MACH_SUN50I_H6
> + default 0x40000000 if MACH_SUN50I_H616
> + default 0x0
> + help
> + Address where BL31 (TF-A) is loaded, or zero if BL31 is not used.
> +
> +config SUNXI_SCP_BASE
> + hex
> + default 0x00050000 if MACH_SUN50I || MACH_SUN50I_H5
> + default 0x00114000 if MACH_SUN50I_H6
> + default 0x0
> + help
> + Address where SCP firmware is loaded, or zero if it is not used.
> +
> config SUNXI_A64_TIMER_ERRATUM
> bool
>
next prev 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 [this message]
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
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=20231208003348.0ab40d80@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=sjg@chromium.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