summaryrefslogtreecommitdiff
path: root/plat/juno/plat_pm.c
diff options
context:
space:
mode:
Diffstat (limited to 'plat/juno/plat_pm.c')
-rw-r--r--plat/juno/plat_pm.c80
1 files changed, 40 insertions, 40 deletions
diff --git a/plat/juno/plat_pm.c b/plat/juno/plat_pm.c
index 2ced99c40..358114466 100644
--- a/plat/juno/plat_pm.c
+++ b/plat/juno/plat_pm.c
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2013, ARM Limited and Contributors. All rights reserved.
+ * Copyright (c) 2013-2015, ARM Limited and Contributors. All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are met:
@@ -64,10 +64,10 @@ int32_t juno_validate_power_state(unsigned int power_state)
/* Sanity check the requested state */
if (psci_get_pstate_type(power_state) == PSTATE_TYPE_STANDBY) {
/*
- * It's possible to enter standby only on affinity level 0 i.e.
- * a cpu on the Juno. Ignore any other affinity level.
+ * It's possible to enter standby only at power level 0 i.e.
+ * a cpu on the Juno. Ignore any other power level.
*/
- if (psci_get_pstate_afflvl(power_state) != MPIDR_AFFLVL0)
+ if (psci_get_pstate_pwrlvl(power_state) != JUNO_PWR_LVL0)
return PSCI_E_INVALID_PARAMS;
}
@@ -82,18 +82,18 @@ int32_t juno_validate_power_state(unsigned int power_state)
/*******************************************************************************
- * Juno handler called when an affinity instance is about to be turned on. The
- * level and mpidr determine the affinity instance.
+ * Juno handler called when a power domain is about to be turned on. The
+ * level and mpidr determine the power domain.
******************************************************************************/
-int32_t juno_affinst_on(uint64_t mpidr,
+int32_t juno_pwr_domain_on(uint64_t mpidr,
uint64_t sec_entrypoint,
- uint32_t afflvl)
+ uint32_t pwrlvl)
{
/*
- * SCP takes care of powering up higher affinity levels so we
+ * SCP takes care of powering up parent power domains so we
* only need to care about level 0
*/
- assert(afflvl == MPIDR_AFFLVL0);
+ assert(pwrlvl == JUNO_PWR_LVL0);
/*
* Setup mailbox with address for CPU entrypoint when it next powers up
@@ -107,14 +107,14 @@ int32_t juno_affinst_on(uint64_t mpidr,
}
/*******************************************************************************
- * Juno handler called when an affinity instance has just been powered on after
+ * Juno handler called when a power level has just been powered on after
* being turned off earlier.
******************************************************************************/
-void juno_affinst_on_finish(uint32_t afflvl)
+void juno_pwr_domain_on_finish(uint32_t pwrlvl)
{
unsigned long mpidr;
- assert(afflvl <= MPIDR_AFFLVL1);
+ assert(pwrlvl <= JUNO_PWR_LVL1);
/* Get the mpidr for this cpu */
mpidr = read_mpidr_el1();
@@ -123,7 +123,7 @@ void juno_affinst_on_finish(uint32_t afflvl)
* Perform the common cluster specific operations i.e enable coherency
* if this cluster was off.
*/
- if (afflvl != MPIDR_AFFLVL0)
+ if (pwrlvl != JUNO_PWR_LVL0)
cci_enable_snoop_dvm_reqs(MPIDR_AFFLVL1_VAL(mpidr));
/* Enable the gic cpu interface */
@@ -137,12 +137,12 @@ void juno_affinst_on_finish(uint32_t afflvl)
}
/*******************************************************************************
- * Common function called while turning a cpu off or suspending it. It is called
- * from juno_off() or juno_suspend() when these functions in turn are called for
- * the highest affinity level which will be powered down. It performs the
- * actions common to the OFF and SUSPEND calls.
+ * Common function called while turning a cpu off or suspending it. It is
+ * called from juno_off() or juno_suspend() when these functions in turn are
+ * called for power domain at the highest power level which will be powered
+ * down. It performs the actions common to the OFF and SUSPEND calls.
******************************************************************************/
-static void juno_power_down_common(uint32_t afflvl)
+static void juno_power_down_common(uint32_t pwrlvl)
{
uint32_t cluster_state = scpi_power_on;
@@ -150,7 +150,7 @@ static void juno_power_down_common(uint32_t afflvl)
arm_gic_cpuif_deactivate();
/* Cluster is to be turned off, so disable coherency */
- if (afflvl > MPIDR_AFFLVL0) {
+ if (pwrlvl > JUNO_PWR_LVL0) {
cci_disable_snoop_dvm_reqs(MPIDR_AFFLVL1_VAL(read_mpidr()));
cluster_state = scpi_power_off;
}
@@ -166,40 +166,40 @@ static void juno_power_down_common(uint32_t afflvl)
}
/*******************************************************************************
- * Handler called when an affinity instance is about to be turned off.
+ * Handler called when a power domain is about to be turned off.
******************************************************************************/
-static void juno_affinst_off(uint32_t afflvl)
+static void juno_pwr_domain_off(uint32_t pwrlvl)
{
- assert(afflvl <= MPIDR_AFFLVL1);
+ assert(pwrlvl <= JUNO_PWR_LVL1);
- juno_power_down_common(afflvl);
+ juno_power_down_common(pwrlvl);
}
/*******************************************************************************
- * Handler called when an affinity instance is about to be suspended.
+ * Handler called when a power domain is about to be suspended.
******************************************************************************/
-static void juno_affinst_suspend(uint64_t sec_entrypoint,
- uint32_t afflvl)
+static void juno_pwr_domain_suspend(uint64_t sec_entrypoint,
+ uint32_t pwrlvl)
{
- assert(afflvl <= MPIDR_AFFLVL1);
+ assert(pwrlvl <= JUNO_PWR_LVL1);
/*
* Setup mailbox with address for CPU entrypoint when it next powers up.
*/
juno_program_mailbox(read_mpidr_el1(), sec_entrypoint);
- juno_power_down_common(afflvl);
+ juno_power_down_common(pwrlvl);
}
/*******************************************************************************
- * Juno handler called when an affinity instance has just been powered on after
+ * Juno handler called when a power domain has just been powered on after
* having been suspended earlier.
* TODO: At the moment we reuse the on finisher and reinitialize the secure
* context. Need to implement a separate suspend finisher.
******************************************************************************/
-static void juno_affinst_suspend_finish(uint32_t afflvl)
+static void juno_pwr_domain_suspend_finish(uint32_t pwrlvl)
{
- juno_affinst_on_finish(afflvl);
+ juno_pwr_domain_on_finish(pwrlvl);
}
/*******************************************************************************
@@ -238,9 +238,9 @@ static void __dead2 juno_system_reset(void)
}
/*******************************************************************************
- * Handler called when an affinity instance is about to enter standby.
+ * Handler called when a power domain is about to enter standby.
******************************************************************************/
-void juno_affinst_standby(unsigned int power_state)
+void juno_pwr_domain_standby(unsigned int power_state)
{
unsigned int scr;
@@ -262,12 +262,12 @@ void juno_affinst_standby(unsigned int power_state)
* Export the platform handlers to enable psci to invoke them
******************************************************************************/
static const plat_pm_ops_t juno_ops = {
- .affinst_on = juno_affinst_on,
- .affinst_on_finish = juno_affinst_on_finish,
- .affinst_off = juno_affinst_off,
- .affinst_standby = juno_affinst_standby,
- .affinst_suspend = juno_affinst_suspend,
- .affinst_suspend_finish = juno_affinst_suspend_finish,
+ .pwr_domain_on = juno_pwr_domain_on,
+ .pwr_domain_on_finish = juno_pwr_domain_on_finish,
+ .pwr_domain_off = juno_pwr_domain_off,
+ .pwr_domain_standby = juno_pwr_domain_standby,
+ .pwr_domain_suspend = juno_pwr_domain_suspend,
+ .pwr_domain_suspend_finish = juno_pwr_domain_suspend_finish,
.system_off = juno_system_off,
.system_reset = juno_system_reset,
.validate_power_state = juno_validate_power_state