[25/33] arm: stm32mp: move FWU multi-bank support to SoC code

Message ID 20261104085036.4012238-26-dario.binacchi@amarulasolutions.com
State New
Headers
Series Add Engicam MicroGEA-STM32MP257D-RMM board support |

Commit Message

Dario Binacchi Nov. 4, 2026, 8:49 a.m. UTC
The FWU multi-bank support, i.e. the boot index read from the TAMP
backup register and the selection of the partitions of the booted bank,
only depends on the SoC and the TF-A, so it is not specific to the
STMicroelectronics boards.

Move it from board/st/common to the SoC code, renaming it to fwu.c as
the stm32mp_ prefix is redundant there, so that other vendor boards can
use it too.

No functional change intended.

Signed-off-by: Dario Binacchi <dario.binacchi@amarulasolutions.com>
---

 arch/arm/mach-stm32mp/Makefile                               | 1 +
 board/st/common/stm32mp_fwu.c => arch/arm/mach-stm32mp/fwu.c | 0
 board/st/common/Makefile                                     | 1 -
 3 files changed, 1 insertion(+), 1 deletion(-)
 rename board/st/common/stm32mp_fwu.c => arch/arm/mach-stm32mp/fwu.c (100%)

-- 
2.43.0
  

Patch

diff --git a/arch/arm/mach-stm32mp/Makefile b/arch/arm/mach-stm32mp/Makefile
index 853469f3c503..e22207465658 100644
--- a/arch/arm/mach-stm32mp/Makefile
+++ b/arch/arm/mach-stm32mp/Makefile
@@ -22,4 +22,5 @@  ifndef CONFIG_XPL_BUILD
 obj-y += cmd_stm32prog/
 obj-$(CONFIG_CMD_STM32KEY) += cmd_stm32key.o
 obj-$(CONFIG_TFABOOT) += boot_params.o
+obj-$(CONFIG_FWU_MULTI_BANK_UPDATE) += fwu.o
 endif
diff --git a/board/st/common/stm32mp_fwu.c b/arch/arm/mach-stm32mp/fwu.c
similarity index 100%
rename from board/st/common/stm32mp_fwu.c
rename to arch/arm/mach-stm32mp/fwu.c
diff --git a/board/st/common/Makefile b/board/st/common/Makefile
index 36dfaddfa0eb..122b13c3aa8d 100644
--- a/board/st/common/Makefile
+++ b/board/st/common/Makefile
@@ -9,7 +9,6 @@  obj-$(CONFIG_PMIC_STPMIC1) += stpmic1.o
 ifeq ($(CONFIG_ARCH_STM32MP),y)
 obj-$(CONFIG_SET_DFU_ALT_INFO) += stm32mp_dfu.o
 obj-$(CONFIG_$(PHASE_)DFU_VIRT) += stm32mp_dfu_virt.o
-obj-$(CONFIG_FWU_MULTI_BANK_UPDATE) += stm32mp_fwu.o
 endif
 
 obj-$(CONFIG_TYPEC_STUSB160X) += stusb160x.o