summaryrefslogtreecommitdiff
path: root/lib/power_management/suspend/tftf_suspend.c
diff options
context:
space:
mode:
authorSoby Mathew <soby.mathew@arm.com>2016-07-13 17:55:08 +0100
committerSoby Mathew <soby.mathew@arm.com>2016-09-26 14:44:55 +0100
commit3dba8936dbf4745bc08475096bdb93be82a8e61d (patch)
tree035d31af77bc912ef769dd94b3beaef6cc40ea21 /lib/power_management/suspend/tftf_suspend.c
parent93d4f89187e2bf24b1bf64736a7c0084683aebff (diff)
AArch32: Rework SMC helpers
This patch introduces SMC framework for AArch32. The existing SMC helper functions have been made architecture-agnostic. The `smc64_args` structure is renamed to just `smc_args`. Similarly the `smc64_ret_values` is renamed to `smc_ret_values`. All the users of the SMC helpers are also modified in this patch. This patch also removes the `noinline` directive from the function prototype of `asm_tftf_smc64()`. This is because this assembly function is a separate compilation unit and the compiler cannot inline it anyway hence making the `noinline` directive redundant. Change-Id: I6fc34fc95dc7c0ac030113e43f681dff8d2d7ccf
Diffstat (limited to 'lib/power_management/suspend/tftf_suspend.c')
-rw-r--r--lib/power_management/suspend/tftf_suspend.c18
1 files changed, 9 insertions, 9 deletions
diff --git a/lib/power_management/suspend/tftf_suspend.c b/lib/power_management/suspend/tftf_suspend.c
index 3e8cd93..e111968 100644
--- a/lib/power_management/suspend/tftf_suspend.c
+++ b/lib/power_management/suspend/tftf_suspend.c
@@ -27,20 +27,20 @@
int32_t tftf_enter_suspend(const suspend_info_t *info,
tftf_suspend_ctx_t *ctx)
{
- smc64_args cpu_suspend_args = {
+ smc_args cpu_suspend_args = {
info->psci_api,
info->power_state,
- (uint64_t)__tftf_cpu_resume_ep,
- (uint64_t)ctx
+ (uintptr_t)__tftf_cpu_resume_ep,
+ (u_register_t)ctx
};
- smc64_args system_suspend_args = {
+ smc_args system_suspend_args = {
info->psci_api,
- (uint64_t)__tftf_cpu_resume_ep,
- (uint64_t)ctx
+ (uintptr_t)__tftf_cpu_resume_ep,
+ (u_register_t)ctx
};
- smc64_ret_values rc;
+ smc_ret_values rc;
if (info->save_system_context) {
ctx->save_system_context = 1;
@@ -60,9 +60,9 @@ int32_t tftf_enter_suspend(const suspend_info_t *info,
flush_dcache_range((uint64_t)ctx, sizeof(*ctx));
if (info->psci_api == SMC_PSCI_CPU_SUSPEND_AARCH64)
- rc = tftf_smc64(&cpu_suspend_args);
+ rc = tftf_smc(&cpu_suspend_args);
else
- rc = tftf_smc64(&system_suspend_args);
+ rc = tftf_smc(&system_suspend_args);
/*
* If execution reaches this point, The above SMC call was an invalid