summaryrefslogtreecommitdiff
path: root/include/plat/common
diff options
context:
space:
mode:
authorSoby Mathew <soby.mathew@arm.com>2015-06-10 13:49:59 +0100
committerAchin Gupta <achin.gupta@arm.com>2015-08-13 20:08:19 +0100
commit32bc85f2d5234fbc4d1f724db3d033b8e1be5dd3 (patch)
tree3f225586e975d04f768dc3126e0544abe929f39d /include/plat/common
parenteb975f52ea2e70216d214efcff3154f3cf081cb0 (diff)
PSCI: Implement platform compatibility layer
The new PSCI topology framework and PSCI extended State framework introduces a breaking change in the platform port APIs. To ease the migration of the platform ports to the new porting interface, a compatibility layer is introduced which essentially defines the new platform API in terms of the old API. The old PSCI helpers to retrieve the power-state, its associated fields and the highest coordinated physical OFF affinity level of a core are also implemented for compatibility. This allows the existing platform ports to work with the new PSCI framework without significant rework. This layer will be enabled by default once the switch to the new PSCI framework is done and is controlled by the build flag ENABLE_PLAT_COMPAT. Change-Id: I4b17cac3a4f3375910a36dba6b03d8f1700d07e3
Diffstat (limited to 'include/plat/common')
-rw-r--r--include/plat/common/psci1.0/platform.h26
1 files changed, 24 insertions, 2 deletions
diff --git a/include/plat/common/psci1.0/platform.h b/include/plat/common/psci1.0/platform.h
index d29fcfc2..f054cd0a 100644
--- a/include/plat/common/psci1.0/platform.h
+++ b/include/plat/common/psci1.0/platform.h
@@ -31,8 +31,10 @@
#ifndef __PLATFORM_H__
#define __PLATFORM_H__
-#include <stdint.h>
#include <psci.h>
+#include <stdint.h>
+#include <types.h>
+
/*******************************************************************************
* Forward declarations
@@ -59,7 +61,7 @@ int plat_get_image_source(unsigned int image_id,
uintptr_t *image_spec);
unsigned long plat_get_ns_image_entrypoint(void);
unsigned int plat_my_core_pos(void);
-int plat_core_pos_by_mpidr(unsigned long mpidr);
+int plat_core_pos_by_mpidr(u_register_t mpidr);
/*******************************************************************************
* Mandatory interrupt management functions
@@ -208,4 +210,24 @@ void bl32_plat_enable_mmu(uint32_t flags);
int plat_get_rotpk_info(void *cookie, void **key_ptr, unsigned int *key_len,
unsigned int *flags);
+#if ENABLE_PLAT_COMPAT
+/*
+ * The below declarations are to enable compatibility for the platform ports
+ * using the old platform interface.
+ */
+
+/*******************************************************************************
+ * Optional common functions (may be overridden)
+ ******************************************************************************/
+unsigned int platform_get_core_pos(unsigned long mpidr);
+
+/*******************************************************************************
+ * Mandatory PSCI Compatibility functions (BL3-1)
+ ******************************************************************************/
+int platform_setup_pm(const plat_pm_ops_t **);
+
+unsigned int plat_get_aff_count(unsigned int, unsigned long);
+unsigned int plat_get_aff_state(unsigned int, unsigned long);
+#endif /* __ENABLE_PLAT_COMPAT__ */
+
#endif /* __PLATFORM_H__ */