[PATCH 1/2] ARM: stm32mp2: fix TAMP_FWU_BOOT_IDX_MASK/OFFSET definition

Patrice Chotard <[email protected]>
Newsgroups org.u-boot-project.lists.u-boot
Message-ID <20260818-fix_tamp_fwu_boot_idx_mask-offset_definition-v1-1-611201a282ce@foss.st.com>
Move the definition of TAMP_FWU_BOOT_IDX_MASK and
TAMP_FWU_BOOT_IDX_OFFSET outside of config check for
CONFIG_STM32MP15X and CONFIG_STM32MP13X.

This patch solves a STM32MP2 compilation issue in
board/st/common/stm32mp_fwu.c when CONFIG_FWU_MULTI_BANK_UPDATE
is activated.

Fixes: 5166658ac605 ("ARM: stm32mp2: Factorize TAMP_FWU_BOOT_IDX_MASK/OFFSET definition")
Signed-off-by: Patrick Delaunay <[email protected]>
Signed-off-by: Patrice Chotard <[email protected]>
---
 arch/arm/mach-stm32mp/include/mach/stm32.h | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/arch/arm/mach-stm32mp/include/mach/stm32.h b/arch/arm/mach-stm32mp/include/mach/stm32.h
index 42e3735847a..dfbd4f43629 100644
--- a/arch/arm/mach-stm32mp/include/mach/stm32.h
+++ b/arch/arm/mach-stm32mp/include/mach/stm32.h
@@ -67,6 +67,9 @@ enum forced_boot_mode {
 	BOOT_UMS_MMC2 = 0x12,
 };
 
+#define TAMP_FWU_BOOT_IDX_MASK		GENMASK(3, 0)
+#define TAMP_FWU_BOOT_IDX_OFFSET	0
+
 #endif
 
 /*
@@ -135,9 +138,6 @@ enum forced_boot_mode {
 /* TAMP registers */
 #define TAMP_BACKUP_REGISTER(x)		(STM32_TAMP_BASE + 0x100 + 4 * x)
 
-#define TAMP_FWU_BOOT_IDX_MASK		GENMASK(3, 0)
-#define TAMP_FWU_BOOT_IDX_OFFSET	0
-
 #ifdef CONFIG_STM32MP15X
 #define TAMP_BACKUP_MAGIC_NUMBER	TAMP_BACKUP_REGISTER(4)
 #define TAMP_BACKUP_BRANCH_ADDRESS	TAMP_BACKUP_REGISTER(5)

-- 
2.43.0
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.