diff options
Diffstat (limited to 'lib/psci')
-rw-r--r-- | lib/psci/aarch64/psci_helpers.S | 12 | ||||
-rw-r--r-- | lib/psci/psci_common.c | 80 | ||||
-rw-r--r-- | lib/psci/psci_setup.c | 8 |
3 files changed, 5 insertions, 95 deletions
diff --git a/lib/psci/aarch64/psci_helpers.S b/lib/psci/aarch64/psci_helpers.S index 06d6636e..88db1c96 100644 --- a/lib/psci/aarch64/psci_helpers.S +++ b/lib/psci/aarch64/psci_helpers.S @@ -12,9 +12,6 @@ .globl psci_do_pwrdown_cache_maintenance .globl psci_do_pwrup_cache_maintenance .globl psci_power_down_wfi -#if !ERROR_DEPRECATED - .globl psci_entrypoint -#endif /* ----------------------------------------------------------------------- * void psci_do_pwrdown_cache_maintenance(unsigned int power level); @@ -131,12 +128,3 @@ func psci_power_down_wfi wfi no_ret plat_panic_handler endfunc psci_power_down_wfi - -/* ----------------------------------------------------------------------- - * void psci_entrypoint(void); - * The deprecated entry point for PSCI on warm boot for AArch64. - * ----------------------------------------------------------------------- - */ -func_deprecated psci_entrypoint - b bl31_warm_entrypoint -endfunc_deprecated psci_entrypoint diff --git a/lib/psci/psci_common.c b/lib/psci/psci_common.c index ec74a8cd..adce843a 100644 --- a/lib/psci/psci_common.c +++ b/lib/psci/psci_common.c @@ -216,7 +216,7 @@ static void psci_set_req_local_pwr_state(unsigned int pwrlvl, /****************************************************************************** * This function initializes the psci_req_local_pwr_states. *****************************************************************************/ -void psci_init_req_local_pwr_states(void) +void __init psci_init_req_local_pwr_states(void) { /* Initialize the requested state of all non CPU power domains as OFF */ unsigned int pwrlvl; @@ -938,84 +938,6 @@ int psci_secondaries_brought_up(void) return (n_valid > 1U) ? 1 : 0; } -#if ENABLE_PLAT_COMPAT -/******************************************************************************* - * PSCI Compatibility helper function to return the 'power_state' parameter of - * the PSCI CPU SUSPEND request for the current CPU. Returns PSCI_INVALID_DATA - * if not invoked within CPU_SUSPEND for the current CPU. - ******************************************************************************/ -int psci_get_suspend_powerstate(void) -{ - /* Sanity check to verify that CPU is within CPU_SUSPEND */ - if (psci_get_aff_info_state() == AFF_STATE_ON && - !is_local_state_run(psci_get_cpu_local_state())) - return psci_power_state_compat[plat_my_core_pos()]; - - return PSCI_INVALID_DATA; -} - -/******************************************************************************* - * PSCI Compatibility helper function to return the state id of the current - * cpu encoded in the 'power_state' parameter. Returns PSCI_INVALID_DATA - * if not invoked within CPU_SUSPEND for the current CPU. - ******************************************************************************/ -int psci_get_suspend_stateid(void) -{ - unsigned int power_state; - power_state = psci_get_suspend_powerstate(); - if (power_state != PSCI_INVALID_DATA) - return psci_get_pstate_id(power_state); - - return PSCI_INVALID_DATA; -} - -/******************************************************************************* - * PSCI Compatibility helper function to return the state id encoded in the - * 'power_state' parameter of the CPU specified by 'mpidr'. Returns - * PSCI_INVALID_DATA if the CPU is not in CPU_SUSPEND. - ******************************************************************************/ -int psci_get_suspend_stateid_by_mpidr(unsigned long mpidr) -{ - int cpu_idx = plat_core_pos_by_mpidr(mpidr); - - if (cpu_idx == -1) - return PSCI_INVALID_DATA; - - /* Sanity check to verify that the CPU is in CPU_SUSPEND */ - if ((psci_get_aff_info_state_by_idx(cpu_idx) == AFF_STATE_ON) && - (!is_local_state_run(psci_get_cpu_local_state_by_idx(cpu_idx)))) - return psci_get_pstate_id(psci_power_state_compat[cpu_idx]); - - return PSCI_INVALID_DATA; -} - -/******************************************************************************* - * This function returns highest affinity level which is in OFF - * state. The affinity instance with which the level is associated is - * determined by the caller. - ******************************************************************************/ -unsigned int psci_get_max_phys_off_afflvl(void) -{ - psci_power_state_t state_info; - - zeromem(&state_info, sizeof(state_info)); - psci_get_target_local_pwr_states(PLAT_MAX_PWR_LVL, &state_info); - - return psci_find_target_suspend_lvl(&state_info); -} - -/******************************************************************************* - * PSCI Compatibility helper function to return target affinity level requested - * for the CPU_SUSPEND. This function assumes affinity levels correspond to - * power domain levels on the platform. - ******************************************************************************/ -int psci_get_suspend_afflvl(void) -{ - return psci_get_suspend_pwrlvl(); -} - -#endif - /******************************************************************************* * Initiate power down sequence, by calling power down operations registered for * this CPU. diff --git a/lib/psci/psci_setup.c b/lib/psci/psci_setup.c index e59e163e..6b3081eb 100644 --- a/lib/psci/psci_setup.c +++ b/lib/psci/psci_setup.c @@ -32,7 +32,7 @@ unsigned int psci_caps; * Function which initializes the 'psci_non_cpu_pd_nodes' or the * 'psci_cpu_pd_nodes' corresponding to the power level. ******************************************************************************/ -static void psci_init_pwr_domain_node(unsigned char node_idx, +static void __init psci_init_pwr_domain_node(unsigned char node_idx, unsigned int parent_idx, unsigned char level) { @@ -80,7 +80,7 @@ static void psci_init_pwr_domain_node(unsigned char node_idx, * mapping of the CPUs to indices via plat_core_pos_by_mpidr() and * plat_my_core_pos() APIs. *******************************************************************************/ -static void psci_update_pwrlvl_limits(void) +static void __init psci_update_pwrlvl_limits(void) { int j, cpu_idx; unsigned int nodes_idx[PLAT_MAX_PWR_LVL] = {0}; @@ -107,7 +107,7 @@ static void psci_update_pwrlvl_limits(void) * informs the number of root power domains. The parent nodes of the root nodes * will point to an invalid entry(-1). ******************************************************************************/ -static void populate_power_domain_tree(const unsigned char *topology) +static void __init populate_power_domain_tree(const unsigned char *topology) { unsigned int i, j = 0U, num_nodes_at_lvl = 1U, num_nodes_at_next_lvl; unsigned int node_index = 0U, num_children; @@ -184,7 +184,7 @@ static void populate_power_domain_tree(const unsigned char *topology) * | CPU 0 | CPU 1 | CPU 2 | CPU 3 | * ------------------------------------------------ ******************************************************************************/ -int psci_setup(const psci_lib_args_t *lib_args) +int __init psci_setup(const psci_lib_args_t *lib_args) { const unsigned char *topology_tree; |