Cleanup MAIN R5F boot from R5 SPL
Subsystems (2)
cover Cleanup MAIN R5F boot from R5 SPL
Hi Lokesh,
The following series cleans up the code related to booting of Main R5FSS0 Core0 from R5 SPL, and moves it to A72 U-Boot on J721E SoCs. This is no longer supported after the R5 SPL re-architecture that splits the System Firmware functionality onto two separate processors. This functionality has been merged post v2021.07 tag towards v2021.10-rc1. The Main R5FSS0 Core0 is already being booted on A72 U-Boot on J7200 SoCs, the other SoC family that follows this split system firmware architecture.
Following is the patch summary:
- Patch 1 skips the booting of Main R5FSS in R5 SPL and moves it to be supported on A72 U-Boot.
- Patches 2 and 3 cleanup the start_non_linux_remote_cores() code
- Patch 4 removes the Main R5F nodes from R5 SPL dtb
- Patch 5 disables the K3 R5F remoteproc driver to be built in R5 SPL (tiboot3.bin size reduces by about 5K).
regards
Suman
Suman Anna (5):
arm: mach-k3: j721e: Move booting of Main R5FSS Core0 to A72 U-Boot
arm: mach-k3: j721e: Cleanup MAIN R5 boot code from R5 SPL
arm: mach-k3: Cleanup common start_non_linux_remote_cores()
arm: dts: k3-j721e-r5: Remove MAIN R5FSS0 cluster from SPL
configs: j721e_evm_r5: Disable K3 R5F remoteproc
.../k3-j721e-r5-common-proc-board-u-boot.dtsi | 14 -------- .../arm/dts/k3-j721e-r5-common-proc-board.dts | 2 -- arch/arm/mach-k3/common.c | 5 --- arch/arm/mach-k3/common.h | 1 - arch/arm/mach-k3/j721e_init.c | 36 ------------------- configs/j721e_evm_r5_defconfig | 1 - include/configs/j721e_evm.h | 3 +- 7 files changed, 1 insertion(+), 61 deletions(-)
Signature · 1 line
2.32.0
PATCH 1/5 arm: mach-k3: j721e: Move booting of Main R5FSS Core0 to A72 U-Boot
The Main R5FSS Core0 on J721E SoCs is originally booted from R5 SPL itself to achieve certain product-level early-boot metrics. This is no longer supported after the R5 SPL re-architecture (support merged for v2021.10-rc1). Move the booting of this core altogether from R5 SPL to A72 U-Boot.
The env variables are left as is for now, and will be cleaned up in a subsequent patch.
--- arch/arm/mach-k3/j721e_init.c | 6 +++++- include/configs/j721e_evm.h | 1 + 2 files changed, 6 insertions(+), 1 deletion(-)
arch/arm/mach-k3/j721e_init.c +5 -1
@@ -377,7 +377,11 @@ void start_non_linux_remote_cores(void)int size =0 , ret;u32 loadaddr =0 ; -if (!soc_is_j721e ()) +/* +* Skip booting of Main R5FSS Core0 in R5 SPL. This is no longer +* supported after the R5 SPL re-architecture. +*/ +if (soc_is_j721e () ||soc_is_j7200 ())return ; size = load_firmware("name_mainr5f0_0fw", "addr_mainr5f0_0load",
include/configs/j721e_evm.h +1 -0
@@ -129,6 +129,7 @@#ifdef CONFIG_TARGET_J721E_A72_EVM #define DEFAULT_RPROCS "" \ + "2 /lib/firmware/j7-main-r5f0_0-fw " \ "3 /lib/firmware/j7-main-r5f0_1-fw " \ "4 /lib/firmware/j7-main-r5f1_0-fw " \ "5 /lib/firmware/j7-main-r5f1_1-fw " \
Signature · 1 line
2.32.0
PATCH 2/5 arm: mach-k3: j721e: Cleanup MAIN R5 boot code from R5 SPL
In reply to Suman AnnaThe common J7 specific start_non_linux_remote_cores() override function implements the logic to load and boot the Main R5FSS Core0 from R5 SPL. This won't be supported any more for either J721E or J7200 after the R5 SPL rearchitecture for the System Firmware split into TI Foundation Security (TIFS) and Device Management (DM) firmwares. So, cleanup the corresponding code and the related SPL env variables.
--- arch/arm/mach-k3/j721e_init.c | 40 ----------------------------------- include/configs/j721e_evm.h | 2 -- 2 files changed, 42 deletions(-)
arch/arm/mach-k3/j721e_init.c +0 -40
@@ -370,43 +370,3 @@ void release_resources_for_core_shutdown(void) } }#endif - -#ifdef CONFIG_SYS_K3_SPL_ATF -void start_non_linux_remote_cores (void ) -{ -int size =0 , ret; -u32 loadaddr =0 ; - -/* -* Skip booting of Main R5FSS Core0 in R5 SPL. This is no longer -* supported after the R5 SPL re-architecture. -*/ -if (soc_is_j721e () ||soc_is_j7200 ()) -return ; - - size =load_firmware ("name_mainr5f0_0fw" ,"addr_mainr5f0_0load" , - &loadaddr); -if (size <=0 ) - goto err_load; - -/* assuming remoteproc 2 is aliased for the needed remotecore */ - ret =rproc_load (2 , loadaddr, size); -if (ret) { -printf ("Firmware failed to start on rproc (%d)\n" , ret); - goto err_load; - } - - ret =rproc_start (2 ); -if (ret) { -printf ("Firmware init failed on rproc (%d)\n" , ret); - goto err_load; - } - -printf ("Remoteproc 2 started successfully\n" ); - -return ; - -err_load: -rproc_reset (2 ); -} -#endif
include/configs/j721e_evm.h +0 -2
@@ -82,8 +82,6 @@#ifdef CONFIG_SYS_K3_SPL_ATF #if defined(CONFIG_TARGET_J721E_R5_EVM )#define EXTRA_ENV_R5_SPL_RPROC_FW_ARGS_MMC \ - "addr_mainr5f0_0load=0x88000000\0" \ - "name_mainr5f0_0fw=/lib/firmware/j7-main-r5f0_0-fw\0" \ "addr_mcur5f0_0load=0x89000000\0" \ "name_mcur5f0_0fw=/lib/firmware/j7-mcu-r5f0_0-fw\0"#elif defined(CONFIG_TARGET_J7200_R5_EVM )
Signature · 1 line
2.32.0
PATCH 3/5 arm: mach-k3: Cleanup common start_non_linux_remote_cores()
In reply to Suman AnnaThe mach-k3 common code defined a weak start_non_linux_remote_cores() function so that the proper implementation can be plugged in the SoC-specific source files. This won't be needed anymore, so remove the the common code.
--- arch/arm/mach-k3/common.c | 5 ----- arch/arm/mach-k3/common.h | 1 - 2 files changed, 6 deletions(-)
arch/arm/mach-k3/common.c +0 -5
@@ -193,10 +193,6 @@ int load_firmware(char *name_fw, char *name_loadaddr, u32 *loadaddr) }#endif -__weak void start_non_linux_remote_cores (void ) -{ -} -void __noreturn jump_to_image_no_args (struct spl_image_info *spl_image) {typedef void __noreturn (*image_entry_noargs_t )(void );
@@ -214,7 +210,6 @@ void __noreturn jump_to_image_no_args(struct spl_image_info *spl_image)init_env ();if (!fit_image_info[IMAGE_ID_DM_FW ].image_start) { -start_non_linux_remote_cores (); size =load_firmware ("name_mcur5f0_0fw" ,"addr_mcur5f0_0load" , &loadaddr); }
arch/arm/mach-k3/common.h +0 -1
@@ -22,7 +22,6 @@ void setup_k3_mpu_regions(void);int early_console_init (void );void disable_linefill_optimization (void );void remove_fwl_configs (struct fwl_data *fwl_data,size_t fwl_data_size); -void start_non_linux_remote_cores (void );int load_firmware (char *name_fw,char *name_loadaddr,u32 *loadaddr);void k3_sysfw_print_ver (void );void spl_enable_dcache (void );
Signature · 1 line
2.32.0
PATCH 4/5 arm: dts: k3-j721e-r5: Remove MAIN R5FSS0 cluster from SPL
In reply to Suman AnnaThe MAIN R5FSS0 cluster and corresponding nodes are no longer required to be enabled in R5 SPL after removing the support for booting any core from this cluster on R5 SPL. So, remove these from the relevant dts files.
This is essentially a revert of the additions done in commit 2984b82b3b76 ("arm: dts: k3-j721e-r5: Enable r5fss0 cluster in SPL").
--- .../dts/k3-j721e-r5-common-proc-board-u-boot.dtsi | 14 -------------- arch/arm/dts/k3-j721e-r5-common-proc-board.dts | 2 -- 2 files changed, 16 deletions(-)
arch/arm/dts/k3-j721e-r5-common-proc-board-u-boot.dtsi +0 -14
@@ -13,8 +13,6 @@ aliases { remoteproc0 = &sysctrler; remoteproc1 = &a72_0; - remoteproc2 = &main_r5fss0_core0; - remoteproc3 = &main_r5fss0_core1; }; fs_loader0: fs_loader@0 {
@@ -23,18 +21,6 @@ }; }; -&main_r5fss0 { - u-boot,dm-spl; -}; - -&main_r5fss0_core0 { - u-boot,dm-spl; -}; - -&main_r5fss0_core1 { - u-boot,dm-spl; -}; - &tps659413a { esm: esm { compatible = "ti,tps659413-esm";
arch/arm/dts/k3-j721e-r5-common-proc-board.dts +0 -2
@@ -13,8 +13,6 @@ aliases { remoteproc0 = &sysctrler; remoteproc1 = &a72_0; - remoteproc2 = &main_r5fss0_core0; - remoteproc3 = &main_r5fss0_core1; }; chosen {
Signature · 1 line
2.32.0
PATCH 5/5 configs: j721e_evm_r5: Disable K3 R5F remoteproc
In reply to Suman AnnaThe J721E R5 SPL will no longer support booting of the Main R5FSS Core0 after the R5 SPL re-architecture for System Firmware split. The MCU R5F branch-only boot does not use the K3 R5F remoteproc driver, and relies only on the filesystem (FS) support for now. The K3 R5F remoteproc driver is therefore no longer needed in R5 SPL, so drop it from the J721E R5 defconfig.
--- configs/j721e_evm_r5_defconfig | 1 - 1 file changed, 1 deletion(-)
configs/j721e_evm_r5_defconfig +0 -1
@@ -112,7 +112,6 @@ CONFIG_SPL_DM_REGULATOR=y CONFIG_DM_REGULATOR_TPS65941=y CONFIG_K3_SYSTEM_CONTROLLER=y CONFIG_REMOTEPROC_TI_K3_ARM64=y -CONFIG_REMOTEPROC_TI_K3_R5F=y CONFIG_DM_RESET=y CONFIG_RESET_TI_SCI=y CONFIG_DM_SERIAL=y
Signature · 1 line
2.32.0
Quoted 11 lines · Suman Anna
Hi Lokesh,
The following series cleans up the code related to booting of Main R5FSS0 Core0 from R5 SPL, and moves it to A72 U-Boot on J721E SoCs. This is no longer supported after the R5 SPL re-architecture that splits the System Firmware functionality onto two separate processors. This functionality has been merged post v2021.07 tag towards v2021.10-rc1. The Main R5FSS0 Core0 is already being booted on A72 U-Boot on J7200 SoCs, the other SoC family that follows this split system firmware architecture.
Quoted 8 lines
Following is the patch summary:
- Patch 1 skips the booting of Main R5FSS in R5 SPL and moves it to be supported on A72 U-Boot.
- Patches 2 and 3 cleanup thestart_non_linux_remote_cores()code
- Patch 4 removes the Main R5F nodes from R5 SPL dtb
- Patch 5 disables the K3 R5F remoteproc driver to be built in R5 SPL (tiboot3.bin size reduces by about 5K).
Forgot to mention that patches are on top of your for-rc HEAD, commit cd096aa47423 ("configs: am335x_evm: Support GbE PHYs")
regards
Suman
Quoted 19 lines
regards
SumanSuman Anna (5):
arm: mach-k3: j721e: Move booting of Main R5FSS Core0 to A72 U-Boot
arm: mach-k3: j721e: Cleanup MAIN R5 boot code from R5 SPL
arm: mach-k3: Cleanup commonstart_non_linux_remote_cores()
arm: dts: k3-j721e-r5: Remove MAIN R5FSS0 cluster from SPL
configs:j721e_evm_r5: Disable K3 R5F remoteproc.../k3-j721e-r5-common-proc-board-u-boot.dtsi | 14 -------- .../arm/dts/k3-j721e-r5-common-proc-board.dts | 2 -- arch/arm/mach-k3/common.c | 5 --- arch/arm/mach-k3/common.h | 1 - arch/arm/mach-k3/j721e_init.c | 36 ------------------- configs/j721e_evm_r5_defconfig | 1 - include/configs/j721e_evm.h | 3 +- 7 files changed, 1 insertion(+), 61 deletions(-)
Quoted 10 lines · Suman Anna
The following series cleans up the code related to booting of Main R5FSS0 Core0 from R5 SPL, and moves it to A72 U-Boot on J721E SoCs. This is no longer supported after the R5 SPL re-architecture that splits the System Firmware functionality onto two separate processors. This functionality has been merged post v2021.07 tag towards v2021.10-rc1. The Main R5FSS0 Core0 is already being booted on A72 U-Boot on J7200 SoCs, the other SoC family that follows this split system firmware architecture.
[...]
Applied to https://source.denx.de/u-boot/custodians/u-boot-ti.git for-rc, thanks! [1/5] arm: mach-k3: j721e: Move booting of Main R5FSS Core0 to A72 U-Boot
https://source.denx.de/u-boot/custodians/u-boot-ti/-/commit/05e858aefe [2/5] arm: mach-k3: j721e: Cleanup MAIN R5 boot code from R5 SPL https://source.denx.de/u-boot/custodians/u-boot-ti/-/commit/536f633d8a [3/5] arm: mach-k3: Cleanup common start_non_linux_remote_cores() https://source.denx.de/u-boot/custodians/u-boot-ti/-/commit/ea985f6d92 [4/5] arm: dts: k3-j721e-r5: Remove MAIN R5FSS0 cluster from SPL https://source.denx.de/u-boot/custodians/u-boot-ti/-/commit/24f3fb6547 [5/5] configs: j721e_evm_r5: Disable K3 R5F remoteproc https://source.denx.de/u-boot/custodians/u-boot-ti/-/commit/bcad620f68
--
Thanks and Regards,
Lokesh