From patchwork Thu Dec 3 17:18:05 2026 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Dario Binacchi X-Patchwork-Id: 5159 Return-Path: X-Original-To: linux-amarula@patchwork.amarulasolutions.com Delivered-To: linux-amarula@patchwork.amarulasolutions.com Received: from mail-wm1-f71.google.com (mail-wm1-f71.google.com [209.85.128.71]) by ganimede.amarulasolutions.com (Postfix) with ESMTPS id 5D84542BB2 for ; Thu, 3 Dec 2026 18:19:35 +0100 (CET) Received: by mail-wm1-f71.google.com with SMTP id 5b1f17b1804b1-4bbe929886dsf41275e9.2 for ; Thu, 03 Dec 2026 09:19:35 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1796318375; cv=pass; d=google.com; s=arc-20260327; b=PcccLKOQpznyh7pMEU4Dl8DvjLSfiub2ihlqYTzTp/AXPKf1Y/JByprTUZ81dnLCqQ nyjlcsnDmf8u9Ieow4B/iC32DuDdEatM/V6mOi25dNeM+nk1rX5TTzuRLjnFylbyYS67 /oqCslY19ZMzKiwoNz6qCc2nm7mTbzp4GMNYVeSnYvXOdT4lif0cRSYMa9uAl/tSub0Q h9NWD3NS0KinpEklJcSp4b9lnHiEM9j4bTx17TqdDDCE5Z5h05siYI9drqBGFzwewknO Y7a/HpQvR7FHR5Uz3vKPh6cvwUXVIuVwXRnwG7s1v0ZHV2Z8bjXX8ml5OAe6ER3iiFK3 G0Gg== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20260327; h=list-unsubscribe:list-archive:list-help:list-post:list-id :mailing-list:precedence:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:dkim-signature; bh=cM9fq7H8S9vrutoDIrsJQCgbxhx+LtXY/pcjIwxKuMg=; fh=runAqGr9Rheunzdf2rYo1BCmF5rvSAoe7efmSSi2Xu4=; b=W6lG3DFgAbPcVPDenCmmwU/whcEbYktsaITjiWAY97kDh/tCbwppp6xNaDH+dPM1Wq 6rnlZdeleiZQtLZyZL0FeMjS+y/2p2yV+wr9XqZg1PU+x4UpiWYBiYeyMl10xJ7/P766 1JE/pTOG38zHMtZaiKCCVwdCM6SWWiJpAXLGvab3MyOHe2JOoFm9rVYE1Nn1JAAEXwj3 wTjnWF46DxR1Z1mKQ+8SqTGEiZ9E6Dign2XO/xUR4pomFYolbJ5+wItzdoaUstnArOg0 9O1T2BeEzCpOeUHhuYSPXugsTinUB6wi5PLALx8zr81WNAQJn/wE731J+7Xke8ZkreFl hQXQ==; darn=patchwork.amarulasolutions.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@amarulasolutions.com header.s=google header.b=XRB0YGUT; 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=1796318375; x=1796923175; darn=patchwork.amarulasolutions.com; h=list-unsubscribe:list-archive:list-help:list-post:list-id :mailing-list:precedence:content-type :x-original-authentication-results:x-original-sender: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=cM9fq7H8S9vrutoDIrsJQCgbxhx+LtXY/pcjIwxKuMg=; b=URdYHy4G1V1cfUsvit2xwhyuBpPjD56F9n3q5wTzdn4Bomd1sK2MAmgB6l+AH3PYDz zLPdyc2Tyo0vmdAhh46Ma/Ra2j3JZDHb2PMPhuSNSFO3Io6VG0dtz9oWzd5Lsyw1MiDa wYruqEOutNTIOPEzyrLwExVoz3Ib4DG9/D6Z8= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20260707; t=1796318375; x=1796923175; h=list-unsubscribe:list-archive:list-help:list-post :x-spam-checked-in-group:list-id:mailing-list:precedence :content-type:x-original-authentication-results:x-original-sender :mime-version:references:in-reply-to:message-id:date:subject:cc:to :from:x-gm-gg:x-beenthere:x-gm-message-state:from:to:cc:subject:date :message-id:reply-to:content-type; bh=cM9fq7H8S9vrutoDIrsJQCgbxhx+LtXY/pcjIwxKuMg=; b=i2ALlttxmQC1qvbNOsBxSpcE1ZoboKJz1smfWuJBhuN0jDzsvk2Rdh19MjrdbCbxko WuN3ryd3j61k3z2zol5eNSCwaIwdFHOWDwvuoOBLLxgckK4Hz5KO0AE/S+osWUnPA5cE 3QSE2dKjojAlCF0ZBFWXux3/rnwJ9pE/szE78h808DOtViuKeiC74MQWf/XiqGQF3ty/ FOBSalbkpNixl6hvwRv0NtaKtx9VvdHkiZKPyEigbw3vqZmrfhtDp6Y/srymPoMYpDSA mAWdA0nhinPUF2QsZoPsU37kLTPfRqrLZjxRGjyqjqaBet0gfoyPWcW6VEL57UeKzGu8 Uzig== X-Forwarded-Encrypted: i=2; AL+hErG/9tjGmgWBoM8uV4o6mfDGbOG/htfzkcvGrsmfZ7+Uox35bwWpZb+iA9P5RCi3G+MRa9DNVIpqjG+zL2i6@patchwork.amarulasolutions.com X-Gm-Message-State: APuU4Z9hDTwzNm5GbhTfAPmzNKchkknGWc4p7HK5NOfZd4wEEDI/uQ4X tMEjctDdJbx8JpxzGvguHoVUcOB9mk/EWMuZzJ0T60jtcoCzIY2CnfEGGUQDoVmt68tVRg== X-Received: by 2002:a05:600c:1d86:b0:4bb:6a5a:7824 with SMTP id 5b1f17b1804b1-4bb8892099amr923657415e9.30.1796318375055; Thu, 03 Dec 2026 09:19:35 -0800 (PST) X-BeenThere: linux-amarula@amarulasolutions.com; h="ATskLddW1fMI5QMU1LVUp1G9pQKvjw+rMXPH6b7+Xn0QetJWcg==" Received: by 2002:a05:600c:4f0d:b0:49b:91c2:4f05 with SMTP id 5b1f17b1804b1-4bb8926265fls145581745e9.1.-pod-prod-03-eu; Thu, 03 Dec 2026 09:19:34 -0800 (PST) X-Forwarded-Encrypted: i=2; AL+hErFjyU6BTNlTnkpVut/CuGTbpngjawdY1FAsz8OyxC9Gr5/q5Sta9bHAT9C8MRmnPaF3RYFSHVLiQIJZHmNN@amarulasolutions.com X-Received: by 2002:a05:600d:82d3:b0:49f:e701:51c8 with SMTP id 5b1f17b1804b1-4bb8880f0ebmr916849925e9.9.1796318373664; Thu, 03 Dec 2026 09:19:33 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1796318373; cv=none; d=google.com; s=arc-20260327; b=Op2TORhtZ0EfH+bZMlir5g8ppYorhHutXmZbf00jMoRnF/x34mAADlk218jdXnvtTP NuIZDo0NCAp92xUm4juWHrXGGAg68hIbgyQJwxImTHL0eFpPGJ6tWjDeoY+orePhfqqT 96PoAHqA+W+rHQa7t+0kFvSe4SnY8zDl2mI3pEaWQkLLhSLN0CAAv5MBK+nEOHS96FkZ MfA8J5nYx3wTuz7+RH5bFebWA+gCEajMoKMZsD9NJ7QsNEE8IAWRyoKd1pyvX9YzcVrS sMW3MHmTDepkZfND6UJv0izdrzaq4A9ANeGz5FJdYZ+vFz67SQm39OnhB7Ciww4Lm7aa Hn8w== 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=lEY710OvZatuiQ88Rqbe3DFeYmoAL+mpbywTTyVyuTQ=; fh=uH2GZjvCBZnmAYK9jTM19oxwgefqy6ugWfFMuv8rEBg=; b=HlolnvPuYIvkqddAbNcOIt1LygB+HTjrtIslSyuqVJI18rRe1b5Kw/Lw3vpI9jh5V3 dMBrxO6sktkkrIS20sjyngzc9Q/melf0fzimZ05jGG5V3g3vymI2GD8KA0Z4tislTvn0 Bu9/VFhOVQF21i2drabKPDPZ/IYzCuVR2tb5rog1+kVsnkxmZoynnbp5Ne33jDbmDBqS 7ArpE0g8s8U6a4sW22v7FZT6DIm3pP1auM0DD+sRedOk3XTd6FxJh9wBL6Y8iPSc0wqd /+Y6THmSlSUnXOEgQgSmgWaosNTx1gEy0sSSI5TqfkRxeT+JXz/5jOPccBMZlJQPDe8f tUjA==; dara=google.com ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@amarulasolutions.com header.s=google header.b=XRB0YGUT; 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 Received: from mail-sor-f41.google.com (mail-sor-f41.google.com. [209.85.220.41]) by mx.google.com with SMTPS id ffacd0b85a97d-4d1734fbabdsor25890f8f.10.2026.12.03.09.19.33 for (Google Transport Security); Thu, 03 Dec 2026 09:19:33 -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; X-Forwarded-Encrypted: i=1; AL+hErFjI12WTJr7vwUmSl2LNRk4TYzqT3zq3W+3KwQtXCJ6q+vEIaDBkgvVRmStfidUEkEi+vdllSX/E5TNUSv+@amarulasolutions.com X-Gm-Gg: AZFdTZeWm3sx96wZWJfyR1jeL5I3Ev54HwkV0w7oZTRhGvEJFzN125sSa6SsZUA5TkE 0xiQkotcSVwgEmzWTmeb/WpSGkK1Hog58YXFkz7aj/sXGExazwq4kAf1BeVe1sUDa/E2+Wq5OB2 45BXyDUrKLgPPSS9KIsNJ/d9DC2lbK8SDN6YZFjgb7z7ZyqdZ7GYUJMgYsbCp5udo0bQIpqHyue Q22MFXEtz/cT+KYT0cT6WONhYgJbaSnYEdJF4G8o8gdhRMI+RwzQKe6yh9KG0W18vJB8EtRjtIr RABRC4nRQsN2tBYuBKZ92ZVQw2Se14xslSHCo7uFZb0QpAj0egGLyiqkhABHmgw4ct5o9FMf7Hh qvPhblQPI6UlFg5xqRylzH9AK7PrpLWS5NLIMpP5+ccyHOOgNyRV4TQqQYgKYGLkMRZ318iVNat 7npOr7wgyBy9/RtCGqHtov5yB6GXFDl+mnz0jGuw3YrXTrciUlY3svc0TN76XTD3faxvOD6QSaA 4dJnJ05E7hB2GVzhFQ67XNUU09AX90ivOiB3ZUk7ezBBX30pEzS+d4vgWWgVqezmwO4p89ie7PT ++EjLhtdWI9G5orCjl8xp9sIY8JwJTR0CIlDBdGg3dRzV+UHb4xSDy93dLNjQfZEoqIlRoz53ah RlH3QmnplyGAL/WJ8A+t8r9xbl9AkXsRD9zQEr9rFhDxrBHRF9zThFLuoXnndwtZNlcC2LI7IjA qirX6dwgcATxmVBDUe0ILeY+8UrQ== X-Received: by 2002:a5d:64c4:0:b0:48e:7b12:ac9f with SMTP id ffacd0b85a97d-4abb5fa17f2mr92154839f8f.40.1796318373271; Thu, 03 Dec 2026 09:19:33 -0800 (PST) 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 ffacd0b85a97d-4d173ab8e3fsm329012f8f.42.2026.12.03.09.19.32 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 03 Dec 2026 09:19:32 -0800 (PST) From: Dario Binacchi To: Patrice Chotard , Patrick Delaunay Cc: michael@amarulasolutions.com, Yannick Fertre , linux-amarula@amarulasolutions.com, Dario Binacchi , Ilias Apalodimas , Tom Rini , u-boot@lists.u-boot-project.org Subject: [PATCH v4 20/29] arm: stm32mp: move FWU multi-bank support to SoC code Date: Thu, 3 Dec 2026 18:18:05 +0100 Message-ID: <20261203171852.62649-21-dario.binacchi@amarulasolutions.com> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20261203171852.62649-1-dario.binacchi@amarulasolutions.com> References: <20261203171852.62649-1-dario.binacchi@amarulasolutions.com> MIME-Version: 1.0 X-Original-Sender: dario.binacchi@amarulasolutions.com X-Original-Authentication-Results: mx.google.com; dkim=pass header.i=@amarulasolutions.com header.s=google header.b=XRB0YGUT; 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 Precedence: list Mailing-list: list linux-amarula@amarulasolutions.com; contact linux-amarula+owners@amarulasolutions.com List-ID: X-Spam-Checked-In-Group: linux-amarula@amarulasolutions.com X-Google-Group-Id: 476853432473 List-Post: , List-Help: , List-Archive: List-Unsubscribe: , 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 --- (no changes since v3) 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%) 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