]> git.baikalelectronics.ru Git - arm-tf.git/commitdiff
refactor(st-drivers): do not rely on DT in etzpc_init
authorYann Gautier <yann.gautier@foss.st.com>
Tue, 29 Mar 2022 13:39:11 +0000 (15:39 +0200)
committerYann Gautier <yann.gautier@st.com>
Wed, 10 Aug 2022 08:00:03 +0000 (10:00 +0200)
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

drivers/st/etzpc/etzpc.c

index ff52a22d9d4be5a29068c8acf44cf2baadb45bb5..4c3c26d94a23949d25cc251faafe24b7cc862fbd 100644 (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);