arm: rockchip: TPL/SPL config options minor fixes
Subsystems (3)
v2 cover arm: rockchip: TPL/SPL config options minor fixes
The series fixes some minor issues in TPL and SPL configuration options handling, improving configurations consistency. Neither functional nor binary changes intended.
---
Changes in v2:
- new patch [3/5] related to SPL_BSS_MAX_SIZE case
- simplify SPL_BSS_MAX_SIZE case solution
- update and reword commit messages
- collect tags
- rebase on next
- Link to v1: https://patch.msgid.link/[email protected]
---
Massimo Pegorer (5):
arm: rockchip: rv1126: Remove unneeded TPL_LDSCRIPT default
arm: rockchip: Avoid TPL_LDSCRIPT configuration when unneeded
arm: rockchip: Move SPL_BSS_MAX_SIZE default value defintion
arm: rockchip: Avoid SPL_BSS_START_ADDR definition if unneeded
arm: rockchip: Remove unneeded SPL_SHARES_INIT_SP_ADDR check
arch/arm/mach-rockchip/Kconfig | 8 ++------ arch/arm/mach-rockchip/px30/Kconfig | 2 +- arch/arm/mach-rockchip/rk3328/Kconfig | 2 +- arch/arm/mach-rockchip/rk3399/Kconfig | 2 +- arch/arm/mach-rockchip/rv1126/Kconfig | 3 --- common/spl/Kconfig | 1 + 6 files changed, 6 insertions(+), 12 deletions(-)
---
base-commit: d22f61a39fb68bc697e67df45f2e3103378bc7cd
change-id: 20261002-config-36524677a702
Best regards,
Signature · 1 line
Massimo Pegorer <[email protected]>
PATCH v2 1/5 arm: rockchip: rv1126: Remove unneeded TPL_LDSCRIPT default
The arch/arm/mach-rockchip/u-boot-tpl.lds linker script file does not exist. Therefore, in the end, scripts/Makefile.xpl logic fallbacks on using the arch common linker script: arch/$(ARCH)/cpu/u-boot-spl.lds. This is also the default value of TPL_LDSCRIPT option common definition in common/spl/Kconfig, thus dropping this RV1126 specific definition simplifies the configuration and has no side effect on binary outputs.
The RV1126 Kconfig file with TPL_LDSCRIPT definition has been added by ffb191e458c ("arm: rockchip: Add RV1126 arch core support") just a few days after 957848882c8 ("rk32xx: Use standard TPL linker script") that removed the arch/arm/mach-rockchip/u-boot-tpl.lds linker script file. The commit date of the second follows the author date of the first: I suppose this caused the inconsistency.
---
Changes in v2:
- collect Fixes and Reviewed-by tags
- reword commit message title
--- arch/arm/mach-rockchip/rv1126/Kconfig | 3 --- 1 file changed, 3 deletions(-)
arch/arm/mach-rockchip/rv1126/Kconfig +0 -3
@@ -43,9 +43,6 @@ config SPL_STACK config SPL_STACK_R_ADDR default 0x800000 -config TPL_LDSCRIPT - default "arch/arm/mach-rockchip/u-boot-tpl.lds" - config TPL_STACK default 0xff718000
Signature · 1 line
2.34.1
PATCH v2 2/5 arm: rockchip: Avoid TPL_LDSCRIPT configuration when unneeded
In reply to Massimo PegorerWhen CONFIG_TPL is not selected, there is no need to define a TPL linker script file through TPL_LDSCRIPT configuration option's value. Skipping it avoids an unnecessary line in the .config, and therefore in the qconfig database, without any effect on the built artifacts.
Affected board configurations are the ones related to RK3328 and RK3399 SoCs that do not include TPL. All the board configurations related to the PX30 SoC include TPL; nevertheless, align the PX30 Kconfig with this fix too.
---
Changes in v2:
- reword commit message
--- arch/arm/mach-rockchip/px30/Kconfig | 2 +- arch/arm/mach-rockchip/rk3328/Kconfig | 2 +- arch/arm/mach-rockchip/rk3399/Kconfig | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-)
arch/arm/mach-rockchip/px30/Kconfig +1 -1
@@ -75,7 +75,7 @@ config SPL_SERIAL default y config TPL_LDSCRIPT - default "arch/arm/mach-rockchip/u-boot-tpl-v8.lds" + default "arch/arm/mach-rockchip/u-boot-tpl-v8.lds" if TPL config TPL_TEXT_BASE default 0xff0e1000
arch/arm/mach-rockchip/rk3328/Kconfig +1 -1
@@ -22,7 +22,7 @@ config SYS_SOC default "rk3328" config TPL_LDSCRIPT - default "arch/arm/mach-rockchip/u-boot-tpl-v8.lds" + default "arch/arm/mach-rockchip/u-boot-tpl-v8.lds" if TPL config TPL_TEXT_BASE default 0xff091000
arch/arm/mach-rockchip/rk3399/Kconfig +1 -1
@@ -142,7 +142,7 @@ config SYS_SOC default "rk3399" config TPL_LDSCRIPT - default "arch/arm/mach-rockchip/u-boot-tpl-v8.lds" + default "arch/arm/mach-rockchip/u-boot-tpl-v8.lds" if TPL config TPL_STACK default 0xff8effff
Signature · 1 line
2.34.1
PATCH v2 3/5 arm: rockchip: Move SPL_BSS_MAX_SIZE default value defintion
In reply to Massimo PegorerAll ARCH_ROCKCHIP board configurations using SPL_BSS_MAX_SIZE have 0x8000 as the value for this option, except one, the evb-px5_defconfig, which has 0x20000 instead. Now that most Rockchip board configurations have migrated to use the same default, there is no further need for a second SPL_BSS_MAX_SIZE config statement definition, with different defaults based on complex conditions. Instead, in the common/spl/Kconfig file, declare 0x8000 as the default value for SPL_BSS_MAX_SIZE when ARCH_ROCKCHIP is selected.
---
New patch in v2:
- split from patch v1 [3/4]
--- arch/arm/mach-rockchip/Kconfig | 5 ----- common/spl/Kconfig | 1 + 2 files changed, 1 insertion(+), 5 deletions(-)
arch/arm/mach-rockchip/Kconfig +0 -5
@@ -840,11 +840,6 @@ config SPL_BSS_START_ADDR default 0x43f80000 if SPL_TEXT_BASE = 0x40000000 default 0x03f80000 if SPL_TEXT_BASE = 0x00000000 -config SPL_BSS_MAX_SIZE - default 0x8000 if SPL_BSS_START_ADDR = 0x63f80000 - default 0x8000 if SPL_BSS_START_ADDR = 0x43f80000 - default 0x8000 if SPL_BSS_START_ADDR = 0x03f80000 - config SPL_STACK_R default y if CUSTOM_SYS_INIT_SP_ADDR = 0x63f00000 default y if CUSTOM_SYS_INIT_SP_ADDR = 0x43f00000
common/spl/Kconfig +1 -0
@@ -150,6 +150,7 @@ config SPL_BSS_MAX_SIZE default 0x100000 if ARCH_MX6 || RISCV default 0x80000 if ARCH_OMAP2PLUS || ARCH_SUNXI default 0x10000 if ARCH_SC5XX + default 0x8000 if ARCH_ROCKCHIP help When non-zero, the linker checks that the actual memory used by SPL from __bss_start to __bss_end does not exceed it.
Signature · 1 line
2.34.1
PATCH v2 4/5 arm: rockchip: Avoid SPL_BSS_START_ADDR definition if unneeded
In reply to Massimo PegorerIn the common/spl/Kconfig file, the config option SPL_BSS_START_ADDR is defined under the SPL_HAS_BSS_LINKER_SECTION guard. Adding another config statement for SPL_BSS_START_ADDR without 'depends on' guard here causes this option and its value to be put in the .config file even when the guard is not selected, which is unneeded and sounds wrong. Moreover, the qconfig.py tool would report SPL_BSS_START_ADDR to be used by configurations which are not really using it.
---
Changes in v2:
- move SPL_BSS_MAX_SIZE case in a new patch of the series
- update commit message to patch content
--- arch/arm/mach-rockchip/Kconfig | 1 + 1 file changed, 1 insertion(+)
arch/arm/mach-rockchip/Kconfig +1 -0
@@ -836,6 +836,7 @@ config SPL_HAS_BSS_LINKER_SECTION default y if ARM64 config SPL_BSS_START_ADDR + depends on SPL_HAS_BSS_LINKER_SECTION default 0x63f80000 if SPL_TEXT_BASE = 0x60000000 default 0x43f80000 if SPL_TEXT_BASE = 0x40000000 default 0x03f80000 if SPL_TEXT_BASE = 0x00000000
Signature · 1 line
2.34.1
PATCH v2 5/5 arm: rockchip: Remove unneeded SPL_SHARES_INIT_SP_ADDR check
In reply to Massimo PegorerThe ROCKCHIP_COMMON_STACK_ADDR configuration option depends on SPL_SHARES_INIT_SP_ADDR, therefore the logical AND of the two options values is equal to the to value of ROCKCHIP_COMMON_STACK_ADDR.
---
Changes in v2:
- collect Fixes and Reviewed-by tags
- reword commit message title
--- arch/arm/mach-rockchip/Kconfig | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
arch/arm/mach-rockchip/Kconfig +1 -1
@@ -798,7 +798,7 @@ source "arch/arm/mach-rockchip/rk3588/Kconfig" source "arch/arm/mach-rockchip/rv1108/Kconfig" source "arch/arm/mach-rockchip/rv1126/Kconfig" -if ROCKCHIP_COMMON_STACK_ADDR && SPL_SHARES_INIT_SP_ADDR +if ROCKCHIP_COMMON_STACK_ADDR config CUSTOM_SYS_INIT_SP_ADDR default 0x63f00000 if SPL_TEXT_BASE = 0x60000000
Signature · 1 line
2.34.1