From patchwork Sat Nov 28 13:10:37 2026 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Dario Binacchi X-Patchwork-Id: 5083 Delivered-To: michael@amarulasolutions.com Received: by 2002:a05:7300:bf19:b0:386:abcc:ec87 with SMTP id ff25csp9130387dyb; Sat, 28 Nov 2026 05:12:03 -0800 (PST) X-Forwarded-Encrypted: i=2; AL+hErFjfVvRWjruc66R1esKHyS+xUzu9wpODdHm4LDxMGVd9imHpHfVSLuaiaItRm/t69CXbD2kfKQv@amarulasolutions.com X-Received: by 2002:a05:600c:638f:b0:4bb:6752:8400 with SMTP id 5b1f17b1804b1-4bb8881a2bbmr517424505e9.17.1795871522927; Sat, 28 Nov 2026 05:12:02 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1795871522; cv=none; d=google.com; s=arc-20260327; b=NPV4Lg5gfWBwkJZoA5XtkAPN3ZADPEX7qjUT6X3O60DYJdjqXl9ePjnbghUu0cvRMq SmjRe9xrUsqRmo1WtMfLJVXNb3Ze3p0p2a91f7h/zoN8EA0KHV+1diLPUawDD1v/ukxg 4GXXTRhsEi4BozMkueUuvr0TzE10j+ZBVEZiua2/z/+xUB5vQMiCk3bErUk3dmGcDwLn WWfqPInnRsEKVJeWjhJcxc9FbSWbYrnqHnUOe/kuRXrlyE/j0zzY6yxoFSrU3vLvV98t ymoRaqwfv2EFZrQdIzXwLJY5mC/tmhoY++CCg2X8UkUgU1X2sl7AfHqvLEizsgmlDfcU sZ2A== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20260327; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:dkim-signature; bh=Tiq1DvDEJ0KYcLTyMcNLPRIBwD+aW9qKWfb96spWBOc=; fh=oSlIOk16YdrgWmEIefUy0nmZKWFY+0FNcU/ls4WRqtU=; b=GtZ7eCpl+FlcoF0V7ArmMES9YgtiTKrmL3oU5RhN1pm1pF/2c1AGP1CtNjbh4H7xb3 s30F1NX2i66i2rlBgJlftjLzXxG2WCouM2fq7au8DX0Hr0Rwg/B2cHUJnVxm2JtzZZ5K ZZ+laE6bdTN1cqivQIsIoCj7CQb1urcRhKsvSSe+qw4lyt+dIMOj3D71GPWtmAoyu6rT hUSWZCt7flOfYac/SimIGUujTztE364KpamBsT9AQAItPooy/N6WfQ7rG7wbHn+hPwPb w0YlhzCmh7kuwBmw+SLDEIK15XAS4tC5MFyrEOHbqbePGJyVjThQu7xAnW/NioQMFhOi FEww==; dara=google.com ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@amarulasolutions.com header.s=google header.b=NB+iLHNj; spf=pass (google.com: domain of dario.binacchi@amarulasolutions.com designates 209.85.220.41 as permitted sender) smtp.mailfrom=dario.binacchi@amarulasolutions.com; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=amarulasolutions.com; dara=neutral header.i=@amarulasolutions.com Return-Path: Received: from mail-sor-f41.google.com (mail-sor-f41.google.com. [209.85.220.41]) by mx.google.com with SMTPS id 5b1f17b1804b1-4bb88463e96sor48881235e9.4.2026.11.28.05.12.02 for (Google Transport Security); Sat, 28 Nov 2026 05:12:02 -0800 (PST) Received-SPF: pass (google.com: domain of dario.binacchi@amarulasolutions.com designates 209.85.220.41 as permitted sender) client-ip=209.85.220.41; Authentication-Results: mx.google.com; dkim=pass header.i=@amarulasolutions.com header.s=google header.b=NB+iLHNj; spf=pass (google.com: domain of dario.binacchi@amarulasolutions.com designates 209.85.220.41 as permitted sender) smtp.mailfrom=dario.binacchi@amarulasolutions.com; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=amarulasolutions.com; dara=neutral header.i=@amarulasolutions.com DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=amarulasolutions.com; s=google; t=1795871522; x=1796476322; darn=amarulasolutions.com; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to:content-type; bh=Tiq1DvDEJ0KYcLTyMcNLPRIBwD+aW9qKWfb96spWBOc=; b=NB+iLHNjp0oYwUsz7GFimNfv6UB2oNSx23XNHh4R6sPoZyGsFb1isZ9P37Cx5FG4ad /LD1Lx+NnIiP5q0FmA+eBI6qrpOhZ1+G3Jc8Lm7U4BflEBb3imdGR0oTqSkFvmuRs+ZP b2H0UUW5FXu1CevC4CUXPhaz3VVdNeEN91aZ0= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20260707; t=1795871522; x=1796476322; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-gg:x-gm-message-state:from :to:cc:subject:date:message-id:reply-to:content-type; bh=Tiq1DvDEJ0KYcLTyMcNLPRIBwD+aW9qKWfb96spWBOc=; b=sJ4RK+aGLzhc+eaCTG/MD98xGDC6Xp9cuHTqdzFE8iH/Nbt2lj0AD/AIBj+ydMtCud DJUn8MsRZKU5unjuSI/pBZTlWZD7BwiQxklOq48oGBngsj5v+j2cOooPREf4t8jr+gwW dqVL65BF9+voULnC3Vs8nR2VR8wBpNVwCexuuRnz6LcQ6B0/xY/AaVJAVTbw9XwvcDhE npUFUD0nhTJpTXjPe1VNPbUoIV6k4YRjI34Kibix9OtCYoealywMLVBEVtJPUAB0Nw8p FiumeVdx7Gm27BxGg/ckobVX53iExAWD/Z8BgMGCPry9qGVYISqdv2Tx4yDN8E3epLVs R9lA== X-Forwarded-Encrypted: i=1; AL+hErE90Jn/nCT+6XbbtvQ0On8lKPLFfHjew7IGkjwttWSv7zcualfHDEFwgcquMMATY/agXP4SEcAs@amarulasolutions.com X-Gm-Message-State: APuU4Z9bP+YGk/YLhQ4QIQ5xUHCcSc4ym2hjbPqItF8AS7E20jGKq0h5 SAE0HM87Rs/abikCVdB7R5E4lqi81ChRPdpLyRMdO0FfEbuQ8Xw7PRwwBIyKmmclDutdXQ== X-Gm-Gg: AZFdTZdXrLxTiqbjP7eG3QOr4fYE/6qOL5wOS3esMn8VKtythe7njKfnNbTmkZ262ep HqTBDxL3WIfM0WKMNa9+7LjVF9ujCLKUoaTa8S26LzQfiLq6dFg8kzM2lLk+6Zx0nYdJCFNHX/2 +LDC2heX6QYSCA9nMihnQO3TQ50GLMNUV1wnKpBE35gO87w+Ze7KKPd5I8Hf9yv+wst7I9IR6O4 4sGMZPtRt/ejlh7r5xGcVBn3h2GNSFdHK0eYSAA8qXjOHyLiaYYv2z6kyO/5GoLCgWd/2u2ndyw iTeCSGpjOLTQvRcSlh+bx2h2USNaymnjs4e65c3eTQMqEAiWXs2qVgG+SvwAxgXJh6u9Eolnin4 f4cYt1K2+nGVlaT93rbzM/WMcs0sCLMykvKq0PW5V1GtR43u/eeAehXcDoWfsaOh+5XLgUQCuCK p4fKjojjafSACzgZNKyJeZQWdF707CTAv3xNB0G3+/tIOE1vXeRTjreuM4GuNc+dsecn1DXWgpC 8O/Kxz/zK7GMMDxEQ4AgeG87lkkmCbelNUAPdZj1YOSzAQkO2OJvebEVCKW3bAKJ0nYuBd3nLG+ ymttaSSvDPPfqBdGOjC/rJJy/7Dc8rBAxnLTA98To0cqetNqgHDGClnNgDpEztJSxH+KL2jsjOJ EHi5h4aMNQCEGshceiTi3YUUjw/XqtgQtmC1pdNLPt8KlobEa1OqcU72dqn1Z/reKioTr4ORpcS 8hZBbXexBX9cw1BqegfBtV6MqRQaGgjVE4VZw9i+5yz4qvs1E= X-Received: by 2002:a05:600c:530f:b0:4a2:677:ad8e with SMTP id 5b1f17b1804b1-4bb8892a21amr514991495e9.34.1795871522391; Sat, 28 Nov 2026 05:12:02 -0800 (PST) Return-Path: Received: from dario-ThinkPad-P14s-Gen-5.homenet.telecomitalia.it (host-79-14-29-58.business.telecomitalia.it. [79.14.29.58]) by smtp.gmail.com with ESMTPSA id 5b1f17b1804b1-4bb853b2437sm1076382015e9.13.2026.11.28.05.12.01 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 28 Nov 2026 05:12:01 -0800 (PST) From: Dario Binacchi To: Patrice Chotard , Patrick Delaunay Cc: Yannick Fertre , linux-amarula@amarulasolutions.com, michael@amarulasolutions.com, Dario Binacchi , Ilias Apalodimas , Tom Rini , u-boot@lists.u-boot-project.org Subject: [PATCH v3 20/29] arm: stm32mp: move FWU multi-bank support to SoC code Date: Sat, 28 Nov 2026 14:10:37 +0100 Message-ID: <20261128131125.2141352-21-dario.binacchi@amarulasolutions.com> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20261128131125.2141352-1-dario.binacchi@amarulasolutions.com> References: <20261128131125.2141352-1-dario.binacchi@amarulasolutions.com> MIME-Version: 1.0 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 Reviewed-by: Patrice Chotard --- Changes in v3: - Add Reviewed-by tag 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 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