summaryrefslogtreecommitdiff
path: root/services/std_svc/psci/psci_afflvl_on.c
diff options
context:
space:
mode:
authordanh-arm <dan.handley@arm.com>2015-01-26 12:46:55 +0000
committerdanh-arm <dan.handley@arm.com>2015-01-26 12:46:55 +0000
commit126866f0110c6096256cd580bc778539d16b06fd (patch)
tree850b407b7cfbfe76f8c6822fd26d85e2cf81147f /services/std_svc/psci/psci_afflvl_on.c
parent860331aa15ab251c515c396a5c095662de4ae5e6 (diff)
parentb234b2c4a06169aa965b77dd40c17be454a9f609 (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_on.c')
-rw-r--r--services/std_svc/psci/psci_afflvl_on.c18
1 files changed, 7 insertions, 11 deletions
diff --git a/services/std_svc/psci/psci_afflvl_on.c b/services/std_svc/psci/psci_afflvl_on.c
index ad212b65..0ee03cb5 100644
--- a/services/std_svc/psci/psci_afflvl_on.c
+++ b/services/std_svc/psci/psci_afflvl_on.c
@@ -75,8 +75,6 @@ static int psci_afflvl0_on(unsigned long target_cpu,
/* Set the secure world (EL3) re-entry point after BL1 */
psci_entrypoint = (unsigned long) psci_aff_on_finish_entry;
- assert(psci_plat_pm_ops->affinst_on);
-
/*
* Plat. management: Give the platform the current state
* of the target cpu to allow it to perform the necessary
@@ -107,8 +105,6 @@ static int psci_afflvl1_on(unsigned long target_cpu,
/* State management: Is not required while turning a cluster on */
- assert(psci_plat_pm_ops->affinst_on);
-
/*
* Plat. management: Give the platform the current state
* of the target cpu to allow it to perform the necessary
@@ -141,8 +137,6 @@ static int psci_afflvl2_on(unsigned long target_cpu,
/* State management: Is not required while turning a system on */
- assert(psci_plat_pm_ops->affinst_on);
-
/*
* Plat. management: Give the platform the current state
* of the target cpu to allow it to perform the necessary
@@ -219,6 +213,13 @@ int psci_afflvl_on(unsigned long target_cpu,
mpidr_aff_map_nodes_t target_cpu_nodes;
/*
+ * This function must only be called on platforms where the
+ * CPU_ON platform hooks have been implemented.
+ */
+ assert(psci_plat_pm_ops->affinst_on &&
+ psci_plat_pm_ops->affinst_on_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
@@ -313,7 +314,6 @@ static void psci_afflvl0_on_finish(aff_map_node_t *cpu_node)
* register. The actual state of this cpu has already been
* changed.
*/
- assert(psci_plat_pm_ops->affinst_on_finish);
/* Get the physical state of this cpu */
plat_state = get_phys_state(state);
@@ -357,8 +357,6 @@ static void psci_afflvl1_on_finish(aff_map_node_t *cluster_node)
assert(cluster_node->level == MPIDR_AFFLVL1);
- assert(psci_plat_pm_ops->affinst_on_finish);
-
/*
* Plat. management: Perform the platform specific actions
* as per the old state of the cluster e.g. enabling
@@ -380,8 +378,6 @@ static void psci_afflvl2_on_finish(aff_map_node_t *system_node)
/* Cannot go beyond this affinity level */
assert(system_node->level == MPIDR_AFFLVL2);
- assert(psci_plat_pm_ops->affinst_on_finish);
-
/*
* Currently, there are no architectural actions to perform
* at the system level.