diff options
author | Vikram Kanigiri <vikram.kanigiri@arm.com> | 2014-03-11 17:41:00 +0000 |
---|---|---|
committer | Dan Handley <dan.handley@arm.com> | 2014-03-21 17:17:48 +0000 |
commit | 6ba0b6d6743534b3d443602dc88558d62ea432b3 (patch) | |
tree | 4581ce3cd1104da70e38e8855ec35e824e5cb625 /services | |
parent | 5132060c48fe2dbc3ce64755cd83b61d6e017f10 (diff) |
Remove partially qualified asm helper functions
Each ARM Trusted Firmware image should know in which EL it is running
and it should use the corresponding register directly instead of reading
currentEL and knowing which asm register to read/write
Change-Id: Ief35630190b6f07c8fbb7ba6cb20db308f002945
Diffstat (limited to 'services')
-rw-r--r-- | services/std_svc/psci/psci_afflvl_off.c | 5 | ||||
-rw-r--r-- | services/std_svc/psci/psci_afflvl_suspend.c | 5 |
2 files changed, 6 insertions, 4 deletions
diff --git a/services/std_svc/psci/psci_afflvl_off.c b/services/std_svc/psci/psci_afflvl_off.c index 3763f6fe..f6bd40c8 100644 --- a/services/std_svc/psci/psci_afflvl_off.c +++ b/services/std_svc/psci/psci_afflvl_off.c @@ -48,7 +48,7 @@ static int psci_afflvl0_off(unsigned long mpidr, aff_map_node *cpu_node) { unsigned int index, plat_state; int rc = PSCI_E_SUCCESS; - unsigned long sctlr = read_sctlr(); + unsigned long sctlr; assert(cpu_node->level == MPIDR_AFFLVL0); @@ -83,8 +83,9 @@ static int psci_afflvl0_off(unsigned long mpidr, aff_map_node *cpu_node) * Do the bare minimal for the time being. Fix this before porting to * Cortex models. */ + sctlr = read_sctlr_el3(); sctlr &= ~SCTLR_C_BIT; - write_sctlr(sctlr); + write_sctlr_el3(sctlr); /* * CAUTION: This flush to the level of unification makes an assumption diff --git a/services/std_svc/psci/psci_afflvl_suspend.c b/services/std_svc/psci/psci_afflvl_suspend.c index 138d0331..ca521ff3 100644 --- a/services/std_svc/psci/psci_afflvl_suspend.c +++ b/services/std_svc/psci/psci_afflvl_suspend.c @@ -87,7 +87,7 @@ static int psci_afflvl0_suspend(unsigned long mpidr, unsigned int power_state) { unsigned int index, plat_state; - unsigned long psci_entrypoint, sctlr = read_sctlr(); + unsigned long psci_entrypoint, sctlr; el3_state *saved_el3_state; int rc = PSCI_E_SUCCESS; @@ -146,8 +146,9 @@ static int psci_afflvl0_suspend(unsigned long mpidr, * Do the bare minimal for the time being. Fix this before porting to * Cortex models. */ + sctlr = read_sctlr_el3(); sctlr &= ~SCTLR_C_BIT; - write_sctlr(sctlr); + write_sctlr_el3(sctlr); /* * CAUTION: This flush to the level of unification makes an assumption |