mirror of
https://github.com/ARM-software/arm-trusted-firmware.git
synced 2025-04-19 02:54:24 +00:00
refactor(stm32mp1): update tamp_bkpr return type
tamp_bkpr() returns a register address. So use uintptr_t instead of uin32_t. Signed-off-by: Nicolas Toromanoff <nicolas.toromanoff@foss.st.com> Change-Id: I5eddfa525465313dadfec18d128248a968ba74e2
This commit is contained in:
parent
cbadfe6942
commit
c870188d27
3 changed files with 8 additions and 8 deletions
|
@ -429,7 +429,7 @@ enum ddr_type {
|
||||||
#define TAMP_BKP_REGISTER_BASE (TAMP_BASE + U(0x100))
|
#define TAMP_BKP_REGISTER_BASE (TAMP_BASE + U(0x100))
|
||||||
|
|
||||||
#if !(defined(__LINKER__) || defined(__ASSEMBLER__))
|
#if !(defined(__LINKER__) || defined(__ASSEMBLER__))
|
||||||
static inline uint32_t tamp_bkpr(uint32_t idx)
|
static inline uintptr_t tamp_bkpr(uint32_t idx)
|
||||||
{
|
{
|
||||||
return TAMP_BKP_REGISTER_BASE + (idx << 2);
|
return TAMP_BKP_REGISTER_BASE + (idx << 2);
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
/*
|
/*
|
||||||
* Copyright (c) 2015-2021, ARM Limited and Contributors. All rights reserved.
|
* Copyright (c) 2015-2022, ARM Limited and Contributors. All rights reserved.
|
||||||
*
|
*
|
||||||
* SPDX-License-Identifier: BSD-3-Clause
|
* SPDX-License-Identifier: BSD-3-Clause
|
||||||
*/
|
*/
|
||||||
|
@ -7,8 +7,6 @@
|
||||||
#include <assert.h>
|
#include <assert.h>
|
||||||
#include <errno.h>
|
#include <errno.h>
|
||||||
|
|
||||||
#include <platform_def.h>
|
|
||||||
|
|
||||||
#include <arch_helpers.h>
|
#include <arch_helpers.h>
|
||||||
#include <bl32/sp_min/platform_sp_min.h>
|
#include <bl32/sp_min/platform_sp_min.h>
|
||||||
#include <common/debug.h>
|
#include <common/debug.h>
|
||||||
|
@ -20,6 +18,8 @@
|
||||||
#include <lib/psci/psci.h>
|
#include <lib/psci/psci.h>
|
||||||
#include <plat/common/platform.h>
|
#include <plat/common/platform.h>
|
||||||
|
|
||||||
|
#include <platform_def.h>
|
||||||
|
|
||||||
static uintptr_t stm32_sec_entrypoint;
|
static uintptr_t stm32_sec_entrypoint;
|
||||||
static uint32_t cntfrq_core0;
|
static uint32_t cntfrq_core0;
|
||||||
|
|
||||||
|
@ -60,9 +60,9 @@ static void stm32_cpu_standby(plat_local_state_t cpu_state)
|
||||||
static int stm32_pwr_domain_on(u_register_t mpidr)
|
static int stm32_pwr_domain_on(u_register_t mpidr)
|
||||||
{
|
{
|
||||||
unsigned long current_cpu_mpidr = read_mpidr_el1();
|
unsigned long current_cpu_mpidr = read_mpidr_el1();
|
||||||
uint32_t bkpr_core1_addr =
|
uintptr_t bkpr_core1_addr =
|
||||||
tamp_bkpr(BOOT_API_CORE1_BRANCH_ADDRESS_TAMP_BCK_REG_IDX);
|
tamp_bkpr(BOOT_API_CORE1_BRANCH_ADDRESS_TAMP_BCK_REG_IDX);
|
||||||
uint32_t bkpr_core1_magic =
|
uintptr_t bkpr_core1_magic =
|
||||||
tamp_bkpr(BOOT_API_CORE1_MAGIC_NUMBER_TAMP_BCK_REG_IDX);
|
tamp_bkpr(BOOT_API_CORE1_MAGIC_NUMBER_TAMP_BCK_REG_IDX);
|
||||||
|
|
||||||
if (mpidr == current_cpu_mpidr) {
|
if (mpidr == current_cpu_mpidr) {
|
||||||
|
|
|
@ -568,7 +568,7 @@ uint32_t stm32mp_get_ddr_ns_size(void)
|
||||||
|
|
||||||
void stm32_save_boot_interface(uint32_t interface, uint32_t instance)
|
void stm32_save_boot_interface(uint32_t interface, uint32_t instance)
|
||||||
{
|
{
|
||||||
uint32_t bkpr_itf_idx = tamp_bkpr(TAMP_BOOT_MODE_BACKUP_REG_ID);
|
uintptr_t bkpr_itf_idx = tamp_bkpr(TAMP_BOOT_MODE_BACKUP_REG_ID);
|
||||||
|
|
||||||
clk_enable(RTCAPB);
|
clk_enable(RTCAPB);
|
||||||
|
|
||||||
|
@ -585,7 +585,7 @@ void stm32_get_boot_interface(uint32_t *interface, uint32_t *instance)
|
||||||
static uint32_t itf;
|
static uint32_t itf;
|
||||||
|
|
||||||
if (itf == 0U) {
|
if (itf == 0U) {
|
||||||
uint32_t bkpr = tamp_bkpr(TAMP_BOOT_MODE_BACKUP_REG_ID);
|
uintptr_t bkpr = tamp_bkpr(TAMP_BOOT_MODE_BACKUP_REG_ID);
|
||||||
|
|
||||||
clk_enable(RTCAPB);
|
clk_enable(RTCAPB);
|
||||||
|
|
||||||
|
|
Loading…
Add table
Reference in a new issue