summaryrefslogtreecommitdiff
path: root/include/plat
diff options
context:
space:
mode:
authorSoby Mathew <soby.mathew@arm.com>2016-10-21 11:34:59 +0100
committerSoby Mathew <soby.mathew@arm.com>2016-12-07 12:45:55 +0000
commitb12a2b493e4dc162ab8bf8fc2353cf6a403a19b3 (patch)
treeabccacfb8e6db3249c71ed113ebe46e162958007 /include/plat
parentc59428b1502f37c9b2f551613da1b491c4226d10 (diff)
Introduce SCP power management abstraction
This patch introduces an additional layer of abstraction between CSS power management hooks and the SCPI driver. A new set of APIs are introduced in order to abstract out power management operations from underlying communication mechanism with the SCP. The SCPI and the associated MHU drivers are moved into a `drivers` folder in CSS. The new SCP communication abstraction layer is added in the `drivers/scp` folder. The existing CSS power management uses the new APIs to reflect this abstraction. Change-Id: I7d775129fc0558e9703c2724523fb8f0a916838c Signed-off-by: Soby Mathew <soby.mathew@arm.com>
Diffstat (limited to 'include/plat')
-rw-r--r--include/plat/arm/css/common/css_pm.h8
1 files changed, 7 insertions, 1 deletions
diff --git a/include/plat/arm/css/common/css_pm.h b/include/plat/arm/css/common/css_pm.h
index 4a6ca816..489275e9 100644
--- a/include/plat/arm/css/common/css_pm.h
+++ b/include/plat/arm/css/common/css_pm.h
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2015, ARM Limited and Contributors. All rights reserved.
+ * Copyright (c) 2015-2016, 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:
@@ -35,6 +35,12 @@
#include <psci.h>
#include <types.h>
+/* 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 > ARM_PWR_LVL1) ?\
+ (state)->pwr_domain_state[ARM_PWR_LVL2] : 0)
+
int css_pwr_domain_on(u_register_t mpidr);
void css_pwr_domain_on_finish(const psci_power_state_t *target_state);
void css_pwr_domain_off(const psci_power_state_t *target_state);