refactor(st-drivers): do not rely on DT in etzpc_init

The ETZPC peripheral is always secure, and has a fixed address,
given by STM32MP1_ETZPC_BASE. This is then not needed to check
that in DT.

Signed-off-by: Yann Gautier <yann.gautier@foss.st.com>
Change-Id: Ifb0779abaf830e1e5a469c72181c2b2726fb47b5
This commit is contained in:
Yann Gautier 2022-03-29 15:39:11 +02:00 committed by Yann Gautier
parent 1631f9c75c
commit e9ff3486d3

View file

@ -1,5 +1,5 @@
/*
* Copyright (c) 2017-2020, STMicroelectronics - All Rights Reserved
* Copyright (c) 2017-2022, STMicroelectronics - All Rights Reserved
*
* SPDX-License-Identifier: BSD-3-Clause
*/
@ -225,20 +225,8 @@ uintptr_t etzpc_get_base_address(void)
int etzpc_init(void)
{
uint32_t hwcfg;
int node;
struct dt_node_info etzpc_info;
node = dt_get_node(&etzpc_info, -1, ETZPC_COMPAT);
if (node < 0) {
return -EIO;
}
/* Check ETZPC is secure only */
if (etzpc_info.status != DT_SECURE) {
return -EACCES;
}
etzpc_dev.base = etzpc_info.base;
etzpc_dev.base = STM32MP1_ETZPC_BASE;
hwcfg = mmio_read_32(etzpc_dev.base + ETZPC_HWCFGR);