From 5f3a60301ef7a455f1c74e71e286b89cb0c97f7d Mon Sep 17 00:00:00 2001 From: Soby Mathew Date: Fri, 8 May 2015 10:18:59 +0100 Subject: CSS: Implement topology support for System power domain This patch implements the necessary topology changes for supporting system power domain on CSS platforms. The definition of PLAT_MAX_PWR_LVL and PLAT_NUM_PWR_DOMAINS macros are removed from arm_def.h and are made platform specific. In addition, the `arm_power_domain_tree_desc[]` and `arm_pm_idle_states[]` are modified to support the system power domain at level 2. With this patch, even though the power management operations involving the system power domain will not return any error, the platform layer will silently ignore any operations to the power domain. The actual power management support for the system power domain will be added later. Change-Id: I791867eded5156754fe898f9cdc6bba361e5a379 --- plat/arm/css/common/css_pm.c | 25 +++++++++++++++---------- 1 file changed, 15 insertions(+), 10 deletions(-) (limited to 'plat/arm/css/common/css_pm.c') diff --git a/plat/arm/css/common/css_pm.c b/plat/arm/css/common/css_pm.c index c0c615b9..2d0e9019 100644 --- a/plat/arm/css/common/css_pm.c +++ b/plat/arm/css/common/css_pm.c @@ -51,18 +51,23 @@ * The table must be terminated by a NULL entry. */ const unsigned int arm_pm_idle_states[] = { - /* State-id - 0x01 */ - arm_make_pwrstate_lvl1(ARM_LOCAL_STATE_RUN, ARM_LOCAL_STATE_RET, - ARM_PWR_LVL0, PSTATE_TYPE_STANDBY), - /* State-id - 0x02 */ - arm_make_pwrstate_lvl1(ARM_LOCAL_STATE_RUN, ARM_LOCAL_STATE_OFF, - ARM_PWR_LVL0, PSTATE_TYPE_POWERDOWN), - /* State-id - 0x22 */ - arm_make_pwrstate_lvl1(ARM_LOCAL_STATE_OFF, ARM_LOCAL_STATE_OFF, - ARM_PWR_LVL1, PSTATE_TYPE_POWERDOWN), + /* State-id - 0x001 */ + arm_make_pwrstate_lvl2(ARM_LOCAL_STATE_RUN, ARM_LOCAL_STATE_RUN, + ARM_LOCAL_STATE_RET, ARM_PWR_LVL0, PSTATE_TYPE_STANDBY), + /* State-id - 0x002 */ + arm_make_pwrstate_lvl2(ARM_LOCAL_STATE_RUN, ARM_LOCAL_STATE_RUN, + ARM_LOCAL_STATE_OFF, ARM_PWR_LVL0, PSTATE_TYPE_POWERDOWN), + /* State-id - 0x022 */ + arm_make_pwrstate_lvl2(ARM_LOCAL_STATE_RUN, ARM_LOCAL_STATE_OFF, + ARM_LOCAL_STATE_OFF, ARM_PWR_LVL1, PSTATE_TYPE_POWERDOWN), +#if PLAT_MAX_PWR_LVL > ARM_PWR_LVL1 + /* State-id - 0x222 */ + arm_make_pwrstate_lvl2(ARM_LOCAL_STATE_OFF, ARM_LOCAL_STATE_OFF, + ARM_LOCAL_STATE_OFF, ARM_PWR_LVL2, PSTATE_TYPE_POWERDOWN), +#endif 0, }; -#endif +#endif /* __ARM_RECOM_STATE_ID_ENC__ */ /******************************************************************************* * Handler called when a power domain is about to be turned on. The -- cgit