diff mbox series

[02/10] rockchip: Use common bss and stack addresses on PX30

Message ID 20240521-px30-2024-07-rc-v1-2-62109c84d44f@cherry.de
State Superseded
Delegated to: Kever Yang
Headers show
Series rockchip: px30: migrate to common bss and stack addresses + UART fixes for evb-px30 | expand

Commit Message

Quentin Schulz May 21, 2024, 5:39 p.m. UTC
From: Quentin Schulz <quentin.schulz@cherry.de>

See commit 008ba0d56d00 ("rockchip: Add common default bss and stack
addresses") for memory layout. This migrates PX30 to use the new layout,
except for TPL. Indeed, PX30 is extremely limited in SRAM, so we need to
be extra careful about what goes into the TPL and how much we can
allocate there, so let's keep the current value for
TPL_SYS_MALLOC_F_LEN (already present in the PX30-specific Kconfig, from
an earlier commit).

This will allow us to use the same memory layout on one more Rockchip
SoC, which is always a nice thing. Additionally, this will make it
easier to fix U-Boot proper pre-reloc running out of memory on PX30 in a
subsequent commit.

Signed-off-by: Quentin Schulz <quentin.schulz@cherry.de>
---
 arch/arm/mach-rockchip/px30/Kconfig | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)

Comments

Kever Yang May 23, 2024, 3:48 a.m. UTC | #1
On 2024/5/22 01:39, Quentin Schulz wrote:
> From: Quentin Schulz <quentin.schulz@cherry.de>
>
> See commit 008ba0d56d00 ("rockchip: Add common default bss and stack
> addresses") for memory layout. This migrates PX30 to use the new layout,
> except for TPL. Indeed, PX30 is extremely limited in SRAM, so we need to
> be extra careful about what goes into the TPL and how much we can
> allocate there, so let's keep the current value for
> TPL_SYS_MALLOC_F_LEN (already present in the PX30-specific Kconfig, from
> an earlier commit).
>
> This will allow us to use the same memory layout on one more Rockchip
> SoC, which is always a nice thing. Additionally, this will make it
> easier to fix U-Boot proper pre-reloc running out of memory on PX30 in a
> subsequent commit.
>
> Signed-off-by: Quentin Schulz <quentin.schulz@cherry.de>
Reviewed-by: Kever Yang <kever.yang@rock-chips.com>

Thanks,
- Kever
> ---
>   arch/arm/mach-rockchip/px30/Kconfig | 5 ++++-
>   1 file changed, 4 insertions(+), 1 deletion(-)
>
> diff --git a/arch/arm/mach-rockchip/px30/Kconfig b/arch/arm/mach-rockchip/px30/Kconfig
> index e39472604c3..dcf9eb8144b 100644
> --- a/arch/arm/mach-rockchip/px30/Kconfig
> +++ b/arch/arm/mach-rockchip/px30/Kconfig
> @@ -68,8 +68,11 @@ config ROCKCHIP_STIMER_BASE
>   config SYS_SOC
>   	default "px30"
>   
> +config ROCKCHIP_COMMON_STACK_ADDR
> +	default y
> +
>   config SYS_MALLOC_F_LEN
> -	default 0x400
> +	default 0x400 if !SPL_SHARES_INIT_SP_ADDR
>   
>   config SPL_SERIAL
>   	default y
>
diff mbox series

Patch

diff --git a/arch/arm/mach-rockchip/px30/Kconfig b/arch/arm/mach-rockchip/px30/Kconfig
index e39472604c3..dcf9eb8144b 100644
--- a/arch/arm/mach-rockchip/px30/Kconfig
+++ b/arch/arm/mach-rockchip/px30/Kconfig
@@ -68,8 +68,11 @@  config ROCKCHIP_STIMER_BASE
 config SYS_SOC
 	default "px30"
 
+config ROCKCHIP_COMMON_STACK_ADDR
+	default y
+
 config SYS_MALLOC_F_LEN
-	default 0x400
+	default 0x400 if !SPL_SHARES_INIT_SP_ADDR
 
 config SPL_SERIAL
 	default y