diff options
author | Andrew Davis <afd@ti.com> | 2023-04-06 11:38:15 -0500 |
---|---|---|
committer | Tom Rini <trini@konsulko.com> | 2023-04-24 13:18:48 -0400 |
commit | 2aee173ba0622d49c328566628d5b7dd1cda5811 (patch) | |
tree | 90e9fa8ee7891b0ce5fc68ca447d8848fc6a2abf /arch/arm/mach-k3/j721e_init.c | |
parent | b4d10f0ae593402ac077c3fc9d34bf3c05dd439d (diff) | |
download | u-boot-2aee173ba0622d49c328566628d5b7dd1cda5811.tar.gz |
arm: mach-k3: Make release_resources_for_core_shutdown() common
This function is the same for each device when it needs to shutdown
the R5 core. Move this to the common section and move the remaining
device specific ID list to the device hardware include.
Signed-off-by: Andrew Davis <afd@ti.com>
Reviewed-by: Christian Gmeiner <christian.gmeiner@gmail.com>
Diffstat (limited to 'arch/arm/mach-k3/j721e_init.c')
-rw-r--r-- | arch/arm/mach-k3/j721e_init.c | 55 |
1 files changed, 0 insertions, 55 deletions
diff --git a/arch/arm/mach-k3/j721e_init.c b/arch/arm/mach-k3/j721e_init.c index 9cae3ac67e..8176ab8a49 100644 --- a/arch/arm/mach-k3/j721e_init.c +++ b/arch/arm/mach-k3/j721e_init.c @@ -378,58 +378,3 @@ u32 spl_boot_device(void) else return __get_backup_bootmedia(main_devstat); } - -#ifdef CONFIG_SYS_K3_SPL_ATF - -#define J721E_DEV_MCU_RTI0 262 -#define J721E_DEV_MCU_RTI1 263 -#define J721E_DEV_MCU_ARMSS0_CPU0 250 -#define J721E_DEV_MCU_ARMSS0_CPU1 251 - -void release_resources_for_core_shutdown(void) -{ - struct ti_sci_handle *ti_sci; - struct ti_sci_dev_ops *dev_ops; - struct ti_sci_proc_ops *proc_ops; - int ret; - u32 i; - - const u32 put_device_ids[] = { - J721E_DEV_MCU_RTI0, - J721E_DEV_MCU_RTI1, - }; - - ti_sci = get_ti_sci_handle(); - dev_ops = &ti_sci->ops.dev_ops; - proc_ops = &ti_sci->ops.proc_ops; - - /* Iterate through list of devices to put (shutdown) */ - for (i = 0; i < ARRAY_SIZE(put_device_ids); i++) { - u32 id = put_device_ids[i]; - - ret = dev_ops->put_device(ti_sci, id); - if (ret) - panic("Failed to put device %u (%d)\n", id, ret); - } - - const u32 put_core_ids[] = { - J721E_DEV_MCU_ARMSS0_CPU1, - J721E_DEV_MCU_ARMSS0_CPU0, /* Handle CPU0 after CPU1 */ - }; - - /* Iterate through list of cores to put (shutdown) */ - for (i = 0; i < ARRAY_SIZE(put_core_ids); i++) { - u32 id = put_core_ids[i]; - - /* - * Queue up the core shutdown request. Note that this call - * needs to be followed up by an actual invocation of an WFE - * or WFI CPU instruction. - */ - ret = proc_ops->proc_shutdown_no_wait(ti_sci, id); - if (ret) - panic("Failed sending core %u shutdown message (%d)\n", - id, ret); - } -} -#endif |