PSCI: Invoke PM hooks only for the highest level

This patch optimizes the invocation of the platform power management hooks for
ON, OFF and SUSPEND such that they are called only for the highest affinity
level which will be powered off/on. Earlier, the hooks were being invoked for
all the intermediate levels as well.

This patch requires that the platforms migrate to the new semantics of the PM
hooks.  It also removes the `state` parameter from the pm hooks as the `afflvl`
parameter now indicates the highest affinity level for which power management
operations are required.

Change-Id: I57c87931d8a2723aeade14acc710e5b78ac41732
diff --git a/services/std_svc/psci1.0/psci_main.c b/services/std_svc/psci1.0/psci_main.c
index b389287..9741fb6 100644
--- a/services/std_svc/psci1.0/psci_main.c
+++ b/services/std_svc/psci1.0/psci_main.c
@@ -46,7 +46,7 @@
 
 {
 	int rc;
-	unsigned int start_afflvl, end_afflvl;
+	unsigned int end_afflvl;
 	entry_point_info_t ep;
 
 	/* Determine if the cpu exists of not */
@@ -73,18 +73,14 @@
 	if (rc != PSCI_E_SUCCESS)
 		return rc;
 
-
 	/*
 	 * To turn this cpu on, specify which affinity
 	 * levels need to be turned on
 	 */
-	start_afflvl = MPIDR_AFFLVL0;
 	end_afflvl = PLATFORM_MAX_AFFLVL;
 	rc = psci_afflvl_on(target_cpu,
 			    &ep,
-			    start_afflvl,
 			    end_afflvl);
-
 	return rc;
 }
 
@@ -160,7 +156,6 @@
 	 * enter the final wfi which will power down this CPU.
 	 */
 	psci_afflvl_suspend(&ep,
-			    MPIDR_AFFLVL0,
 			    target_afflvl);
 
 	/* Reset PSCI power state parameter for the core. */
@@ -235,7 +230,7 @@
 	 * management is done immediately followed by cpu, cluster ...
 	 * ..target_afflvl specific actions as this function unwinds back.
 	 */
-	rc = psci_afflvl_off(MPIDR_AFFLVL0, target_afflvl);
+	rc = psci_afflvl_off(target_afflvl);
 
 	/*
 	 * The only error cpu_off can return is E_DENIED. So check if that's