aboutsummaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
authorDimitris Papastamos <dimitris.papastamos@arm.com>2018-06-25 13:38:29 +0100
committerGitHub <noreply@github.com>2018-06-25 13:38:29 +0100
commita455173969be53f11dea5d0ab39a9ece63cffdac (patch)
tree41ad3d1c990fc48edafc1c394b43d0fb16abbc25 /include
parent562e0e8ae871f14c2c0b00be8631b8e1d10bb0ab (diff)
parent8e26307db63b1da1029713ba5d22b3428a2dab4b (diff)
downloadplatform_external_arm-trusted-firmware-a455173969be53f11dea5d0ab39a9ece63cffdac.tar.gz
platform_external_arm-trusted-firmware-a455173969be53f11dea5d0ab39a9ece63cffdac.tar.bz2
platform_external_arm-trusted-firmware-a455173969be53f11dea5d0ab39a9ece63cffdac.zip
Merge pull request #1448 from npoushin/npoushin/sgi575-coverity-fixes
npoushin/sgi575 coverity fixes
Diffstat (limited to 'include')
-rw-r--r--include/plat/arm/css/common/css_pm.h12
1 files changed, 9 insertions, 3 deletions
diff --git a/include/plat/arm/css/common/css_pm.h b/include/plat/arm/css/common/css_pm.h
index 0f92e60b3..e834fffc6 100644
--- a/include/plat/arm/css/common/css_pm.h
+++ b/include/plat/arm/css/common/css_pm.h
@@ -17,9 +17,15 @@
/* Macros to read the CSS power domain state */
#define CSS_CORE_PWR_STATE(state) (state)->pwr_domain_state[ARM_PWR_LVL0]
#define CSS_CLUSTER_PWR_STATE(state) (state)->pwr_domain_state[ARM_PWR_LVL1]
-#define CSS_SYSTEM_PWR_STATE(state) \
- ((PLAT_MAX_PWR_LVL == CSS_SYSTEM_PWR_DMN_LVL) ?\
- (state)->pwr_domain_state[CSS_SYSTEM_PWR_DMN_LVL] : 0)
+
+static inline unsigned int css_system_pwr_state(const psci_power_state_t *state)
+{
+#if (PLAT_MAX_PWR_LVL == CSS_SYSTEM_PWR_DMN_LVL)
+ return state->pwr_domain_state[CSS_SYSTEM_PWR_DMN_LVL];
+#else
+ return 0;
+#endif
+}
int css_pwr_domain_on(u_register_t mpidr);
void css_pwr_domain_on_finish(const psci_power_state_t *target_state);