diff options
author | danh-arm <dan.handley@arm.com> | 2015-01-26 12:46:55 +0000 |
---|---|---|
committer | danh-arm <dan.handley@arm.com> | 2015-01-26 12:46:55 +0000 |
commit | 126866f0110c6096256cd580bc778539d16b06fd (patch) | |
tree | 850b407b7cfbfe76f8c6822fd26d85e2cf81147f /services/std_svc/psci/psci_afflvl_suspend.c | |
parent | 860331aa15ab251c515c396a5c095662de4ae5e6 (diff) | |
parent | b234b2c4a06169aa965b77dd40c17be454a9f609 (diff) |
Merge pull request #244 from danh-arm/sm/psci_mig_feat
Rework PSCI migrate APIs and implement the FEATURES API v2
Diffstat (limited to 'services/std_svc/psci/psci_afflvl_suspend.c')
-rw-r--r-- | services/std_svc/psci/psci_afflvl_suspend.c | 18 |
1 files changed, 7 insertions, 11 deletions
diff --git a/services/std_svc/psci/psci_afflvl_suspend.c b/services/std_svc/psci/psci_afflvl_suspend.c index 9ede65d0..dad0cefd 100644 --- a/services/std_svc/psci/psci_afflvl_suspend.c +++ b/services/std_svc/psci/psci_afflvl_suspend.c @@ -119,8 +119,6 @@ static void psci_afflvl0_suspend(aff_map_node_t *cpu_node) */ psci_do_pwrdown_cache_maintenance(MPIDR_AFFLVL0); - assert(psci_plat_pm_ops->affinst_suspend); - /* * Plat. management: Allow the platform to perform the * necessary actions to turn off this cpu e.g. set the @@ -146,8 +144,6 @@ static void psci_afflvl1_suspend(aff_map_node_t *cluster_node) */ psci_do_pwrdown_cache_maintenance(MPIDR_AFFLVL1); - assert(psci_plat_pm_ops->affinst_suspend); - /* * Plat. Management. Allow the platform to do its cluster specific * bookeeping e.g. turn off interconnect coherency, program the power @@ -188,7 +184,6 @@ static void psci_afflvl2_suspend(aff_map_node_t *system_node) * Plat. Management : Allow the platform to do its bookeeping * at this affinity level */ - assert(psci_plat_pm_ops->affinst_suspend); /* * Sending the psci entrypoint is currently redundant @@ -262,6 +257,13 @@ void psci_afflvl_suspend(entry_point_info_t *ep, unsigned int max_phys_off_afflvl; /* + * This function must only be called on platforms where the + * CPU_SUSPEND platform hooks have been implemented. + */ + assert(psci_plat_pm_ops->affinst_suspend && + psci_plat_pm_ops->affinst_suspend_finish); + + /* * Collect the pointers to the nodes in the topology tree for * each affinity instance in the mpidr. If this function does * not return successfully then either the mpidr or the affinity @@ -370,8 +372,6 @@ static void psci_afflvl0_suspend_finish(aff_map_node_t *cpu_node) * situation. */ - assert(psci_plat_pm_ops->affinst_suspend_finish); - /* Get the physical state of this cpu */ plat_state = get_phys_state(state); psci_plat_pm_ops->affinst_suspend_finish(cpu_node->level, @@ -428,8 +428,6 @@ static void psci_afflvl1_suspend_finish(aff_map_node_t *cluster_node) * situation. */ - assert(psci_plat_pm_ops->affinst_suspend_finish); - /* Get the physical state of this cpu */ plat_state = psci_get_phys_state(cluster_node); psci_plat_pm_ops->affinst_suspend_finish(cluster_node->level, @@ -458,8 +456,6 @@ static void psci_afflvl2_suspend_finish(aff_map_node_t *system_node) * situation. */ - assert(psci_plat_pm_ops->affinst_suspend_finish); - /* Get the physical state of the system */ plat_state = psci_get_phys_state(system_node); psci_plat_pm_ops->affinst_suspend_finish(system_node->level, |