diff options
Diffstat (limited to 'plat')
-rw-r--r-- | plat/arm/board/fvp/fvp_pm.c | 2 | ||||
-rw-r--r-- | plat/arm/board/juno/juno_pm.c | 2 | ||||
-rw-r--r-- | plat/arm/common/arm_pm.c | 17 | ||||
-rw-r--r-- | plat/arm/css/common/css_pm.c | 2 |
4 files changed, 17 insertions, 6 deletions
diff --git a/plat/arm/board/fvp/fvp_pm.c b/plat/arm/board/fvp/fvp_pm.c index 66c0c3df..139f7131 100644 --- a/plat/arm/board/fvp/fvp_pm.c +++ b/plat/arm/board/fvp/fvp_pm.c @@ -327,7 +327,7 @@ static int fvp_node_hw_state(u_register_t target_cpu, * Export the platform handlers via plat_arm_psci_pm_ops. The ARM Standard * platform layer will take care of registering the handlers with PSCI. ******************************************************************************/ -const plat_psci_ops_t plat_arm_psci_pm_ops = { +plat_psci_ops_t plat_arm_psci_pm_ops = { .cpu_standby = fvp_cpu_standby, .pwr_domain_on = fvp_pwr_domain_on, .pwr_domain_off = fvp_pwr_domain_off, diff --git a/plat/arm/board/juno/juno_pm.c b/plat/arm/board/juno/juno_pm.c index c355d94d..c0fa628e 100644 --- a/plat/arm/board/juno/juno_pm.c +++ b/plat/arm/board/juno/juno_pm.c @@ -76,7 +76,7 @@ static int juno_translate_power_state_by_mpidr(u_register_t mpidr, * Export the platform handlers via plat_arm_psci_pm_ops. The ARM Standard * platform will take care of registering the handlers with PSCI. ******************************************************************************/ -const plat_psci_ops_t plat_arm_psci_pm_ops = { +plat_psci_ops_t plat_arm_psci_pm_ops = { .pwr_domain_on = css_pwr_domain_on, .pwr_domain_on_finish = css_pwr_domain_on_finish, .pwr_domain_off = css_pwr_domain_off, diff --git a/plat/arm/common/arm_pm.c b/plat/arm/common/arm_pm.c index 1e756a9e..d2e682d4 100644 --- a/plat/arm/common/arm_pm.c +++ b/plat/arm/common/arm_pm.c @@ -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: @@ -38,8 +38,11 @@ #include <platform_def.h> #include <psci.h> +/* Allow ARM Standard platforms to override this function */ +#pragma weak plat_arm_psci_override_pm_ops + /* Standard ARM platforms are expected to export plat_arm_psci_pm_ops */ -extern const plat_psci_ops_t plat_arm_psci_pm_ops; +extern plat_psci_ops_t plat_arm_psci_pm_ops; #if ARM_RECOM_STATE_ID_ENC extern unsigned int arm_pm_idle_states[]; @@ -151,6 +154,14 @@ int arm_validate_ns_entrypoint(uintptr_t entrypoint) } /****************************************************************************** + * Default definition on ARM standard platforms to override the plat_psci_ops. + *****************************************************************************/ +const plat_psci_ops_t *plat_arm_psci_override_pm_ops(plat_psci_ops_t *ops) +{ + return ops; +} + +/****************************************************************************** * Helper function to resume the platform from system suspend. Reinitialize * the system components which are not in the Always ON power domain. * TODO: Unify the platform setup when waking up from cold boot and system @@ -201,7 +212,7 @@ void arm_program_trusted_mailbox(uintptr_t address) int plat_setup_psci_ops(uintptr_t sec_entrypoint, const plat_psci_ops_t **psci_ops) { - *psci_ops = &plat_arm_psci_pm_ops; + *psci_ops = plat_arm_psci_override_pm_ops(&plat_arm_psci_pm_ops); /* Setup mailbox with entry point. */ arm_program_trusted_mailbox(sec_entrypoint); diff --git a/plat/arm/css/common/css_pm.c b/plat/arm/css/common/css_pm.c index 65d27336..d4dd0af7 100644 --- a/plat/arm/css/common/css_pm.c +++ b/plat/arm/css/common/css_pm.c @@ -261,7 +261,7 @@ int css_node_hw_state(u_register_t mpidr, unsigned int power_level) * Export the platform handlers via plat_arm_psci_pm_ops. The ARM Standard * platform will take care of registering the handlers with PSCI. ******************************************************************************/ -const plat_psci_ops_t plat_arm_psci_pm_ops = { +plat_psci_ops_t plat_arm_psci_pm_ops = { .pwr_domain_on = css_pwr_domain_on, .pwr_domain_on_finish = css_pwr_domain_on_finish, .pwr_domain_off = css_pwr_domain_off, |