From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from smtp3.osuosl.org (smtp3.osuosl.org [140.211.166.136]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (prime256v1) server-digest SHA256) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id DF249606A325 for ; Tue, 1 Dec 2026 19:18:41 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=lists.u-boot-project.org header.i=@lists.u-boot-project.org header.a=rsa-sha256 header.s=default header.b=WyLY+CDr; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.a=rsa-sha256 header.s=20260707 header.b=gEKsz7zH Received: from localhost (localhost [127.0.0.1]) by smtp3.osuosl.org (Postfix) with ESMTP id BBA6160DB0; Tue, 1 Dec 2026 19:18:41 +0000 (UTC) X-Virus-Scanned: amavis at osuosl.org Received: from smtp3.osuosl.org ([127.0.0.1]) by localhost (smtp3.osuosl.org [127.0.0.1]) (amavis, port 10024) with ESMTP id 8bQEwQb0_fMA; Tue, 1 Dec 2026 19:18:41 +0000 (UTC) ARC-Filter: OpenARC Filter v1.3.2 smtp3.osuosl.org 0F43660E02 Authentication-Results: smtp3.osuosl.org; arc=none smtp.remote-ip=140.211.166.142 ARC-Seal: i=1; d=osuosl.org; s=arc; a=rsa-sha256; cv=none; t=1796152721; b=OTFfsEihht1wb2+RIOX9Dmim6t7ECxzRMmNrDprAcxPvcQjS353r8LSbMIyzjPK1IXY2 teI6ssnQ/tNnsIjXXYCIHnnWbsQ1JSF7dljK9K6rOTg02KwXmpbQ3VH2Uz/jdFRgHPeF6 g8EU7L0TdUs7uXc02IZSEdm3PboCsKpQLHcuthgTjmYcV+KZzWpQUhrms4ZchF9FZcyPR Om0lZlDuolC7anG6IZ3ipdwKh443vUpKSF6vjqb9FM1wpqs9NUftJCGwSS6Rym3Po4Bk8 iGPWwOayF5l3m340hWAOhgvwCVYGsWqZcIfK6u/n+VasgMVO1sXtNLATjZMIbjdfmMA== ARC-Message-Signature: i=1; d=osuosl.org; s=arc; a=rsa-sha256; c=relaxed/relaxed; t=1796152721; h=X-Comment:DKIM-Signature:X-Original-To:Delivered-To:Received: Received:X-Virus-Scanned:X-Spam-Flag:X-Spam-Score:X-Spam-Level: X-Spam-Status:Received:ARC-Filter:Received-SPF:Received:Received: DKIM-Signature:X-Google-DKIM-Signature:X-Gm-Message-State:X-Gm-Gg: X-Received:Received:Sender:From:Date:Subject:MIME-Version: Content-Type:Content-Transfer-Encoding:Message-Id:References: In-Reply-To:To:Cc:X-Mailer:X-BeenThere:X-Mailman-Version:Precedence: List-Id:List-Unsubscribe:List-Archive:List-Post:List-Help: List-Subscribe:Errors-To; bh=mQ9sX/7mTqaW0DdLC4yov2w0OMpi//dYXQ7pNlAghFQ=; b=R1dtFRFrVSvK7yZJyRY9eS+Qjl6fZ1UveojQC8lhH5iNi9P64cBGO0wItaxZhGrBSBLt Wd89wCGcDXEEfHReTkCkXSyPScYVP0zpQzMNuXgH3p/fab3TcM3f8+R37TN9xcnAwbHTR SMlRuJCDLnlArJFJ4PIY4Mrc2nSo8Fj6KUXp0BY3WkvG/I9DB69Arg14tjQhBrMlf+hoM P8w2s3WvSwUfe2g+1YBcco6TbDnE9fx1Xl823fYdvCoYRZNSW1BdVdU9ViYPzW8hPGOei iMT9q8jKTdtwjlL6fa04PyigBwLO3HlvGHypSRXHe+xH0aWqsfBX5WYgt1gngibZR8Q== ARC-Authentication-Results: i=1; smtp3.osuosl.org; arc=none smtp.remote-ip=140.211.166.142 X-Comment: SPF check N/A for local connections - client-ip=140.211.166.142; helo=lists1.osuosl.org; envelope-from=u-boot-bounces@lists.u-boot-project.org; receiver= DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=lists.u-boot-project.org; s=default; t=1796152721; bh=mQ9sX/7mTqaW0DdLC4yov2w0OMpi//dYXQ7pNlAghFQ=; h=From:Date:Subject:References:In-Reply-To:To:Cc:List-Id: List-Unsubscribe:List-Archive:List-Post:List-Help:List-Subscribe: From; b=WyLY+CDrbhzXDcnJCLs7QUNvVkppPxjwEEW+8bpBjD4utU4jZfkxpoKlaMahrNR// Z5r4P67HnzdwJ7ElepmrW9L9ypPVYDPN8/dSJQozubNCKtWtXTLVK3UB7SuI99i6kI 35Tm7FCgwx/sslMhKD+PjYePvn+NAum3zdoYqTs3SwVz3keQk+FvuNqaq/fioY58Nr 4dsBNRulGq67orGB6Ol2GzsFqwXvzFUjhHZMEql7zT68u61PGID2YP16b2Rfz9zJkp LQsGE6unSlGX1XfrCwS2K0BM1jzaqCM/Wb/cbd0mAMyJghblJyhQ/7rAy1iDIU/NoQ QOEegjmFulxLA== Received: from lists1.osuosl.org (lists1.osuosl.org [140.211.166.142]) by smtp3.osuosl.org (Postfix) with ESMTP id 0F43660E02; Tue, 1 Dec 2026 19:18:41 +0000 (UTC) Received: from smtp4.osuosl.org (smtp4.osuosl.org [140.211.166.137]) by lists1.osuosl.org (Postfix) with ESMTP id 0C9B1529 for ; Tue, 1 Dec 2026 19:18:32 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by smtp4.osuosl.org (Postfix) with ESMTP id 0A3BD406A0 for ; Tue, 1 Dec 2026 19:18:32 +0000 (UTC) X-Virus-Scanned: amavis at osuosl.org Received: from smtp4.osuosl.org ([127.0.0.1]) by localhost (smtp4.osuosl.org [127.0.0.1]) (amavis, port 10024) with ESMTP id chdfW91d3xpg for ; Tue, 1 Dec 2026 19:18:31 +0000 (UTC) ARC-Filter: OpenARC Filter v1.3.2 smtp4.osuosl.org 07A8440672 Authentication-Results: smtp4.osuosl.org; arc=none smtp.remote-ip="2a00:1450:4864:20::431" Received-SPF: Pass (mailfrom) identity=mailfrom; client-ip=2a00:1450:4864:20::431; helo=mail-wr1-x431.google.com; envelope-from=massimo.pegorer+oss@gmail.com; receiver= Authentication-Results: smtp4.osuosl.org; dmarc=pass (p=none dis=none) header.from=gmail.com Authentication-Results: smtp4.osuosl.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.a=rsa-sha256 header.s=20260707 header.b=gEKsz7zH Received: from mail-wr1-x431.google.com (mail-wr1-x431.google.com [IPv6:2a00:1450:4864:20::431]) by smtp4.osuosl.org (Postfix) with ESMTPS id 07A8440672 for ; Tue, 1 Dec 2026 19:18:28 +0000 (UTC) Received: by mail-wr1-x431.google.com with SMTP id ffacd0b85a97d-4ac109a8a12so7253231f8f.3 for ; Tue, 01 Dec 2026 11:18:28 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20260707; t=1796152707; x=1796757507; darn=lists.u-boot-project.org; h=cc:to:in-reply-to:references:message-id:content-transfer-encoding :content-type:mime-version:subject:date:from:sender:from:to:cc :subject:date:message-id:reply-to:content-type; bh=mQ9sX/7mTqaW0DdLC4yov2w0OMpi//dYXQ7pNlAghFQ=; b=gEKsz7zHmbTuHg9yl8iL6uQKNsds+m7cEh4Ahhg1XqDUoypi5VibQM83vR413kFzwr jzHB3rHlLJmw7NwKiGwMzKnyTMSNKnxfQkp4NLFw1UeL/mY0CwNpLndvMEoPGzOqu+RM /MXBUhvGjrK/hzQtCYTxNGb7r9KiMhZkzjj/qVzqM0oe5IqdY1pjohmk9BXffeX5gWt8 PM5reFfO2N2TIT2wdfbiDkP9XFkgZaRTiu4yszChdZ7q3yQ3k1Gt22O+Ofl5Fzo/DQbg ycpeonwrEfWZd858hVNper8qZZ+WHuwZG84v09UQbRK4Maf10Ayx267eftnTHItbSh/C t6/Q== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20260707; t=1796152707; x=1796757507; h=cc:to:in-reply-to:references:message-id:content-transfer-encoding :content-type:mime-version:subject:date:from:sender:x-gm-gg :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to :content-type; bh=mQ9sX/7mTqaW0DdLC4yov2w0OMpi//dYXQ7pNlAghFQ=; b=ddThH9a1sGP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z9hQzirFiKAGEGGg== X-Received: by 2002:a05:600c:a11:b0:4bb:69f2:87f7 with SMTP id 5b1f17b1804b1-4bb88812c92mr790601525e9.18.1796152706942; Tue, 01 Dec 2026 11:18:26 -0800 (PST) Received: from [127.0.1.1] ([151.71.134.126]) by smtp.gmail.com with ESMTPSA id 5b1f17b1804b1-4bb884ab091sm1400773815e9.11.2026.12.01.11.18.26 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 01 Dec 2026 11:18:26 -0800 (PST) Sender: Massimo Pegorer From: Massimo Pegorer Date: Tue, 01 Dec 2026 20:18:24 +0100 Subject: [PATCH 7/7] mach-rockchip: Add xPL phase context to ROCKCHIP_BROM_HELPER option X-Archived-By: MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 7bit Message-Id: <20261201-brom-v1-7-06f157a269fd@gmail.com> References: <20261201-brom-v1-0-06f157a269fd@gmail.com> In-Reply-To: <20261201-brom-v1-0-06f157a269fd@gmail.com> To: u-boot@lists.u-boot-project.org, Quentin Schulz , Jonas Karlman Cc: Tom Rini , Ilias Apalodimas , Johan Jonker , Massimo Pegorer X-Mailer: b4 0.15.2 X-BeenThere: u-boot@lists.u-boot-project.org X-Mailman-Version: 2.1.30 Precedence: list List-Id: U-Boot discussion List-Archive: List-Post: List-Help: List-Subscribe: , X-Spam-Status: No, score=-15.8 required=3.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,FREEMAIL_FORGED_FROMDOMAIN, FREEMAIL_FROM,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER, INCLUDES_PATCH,MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS, USER_AGENT_GIT autolearn=ham autolearn_force=no version=4.0.1 X-Spam-Checker-Version: SpamAssassin 4.0.1 (2024-03-26) on aws-us-west-2-korg-listserv-alma10-1 There are 58 Rockchip board configurations that have all three options: CONFIG_TPL CONFIG_SPL and CONFIG_ROCKCHIP_BROM_HELPER. In this case, the ROCKCHIP_BROM_HELPER code is built into both TPL and SPL too, even if it is really needed in only one of them. In all of these configurations only the TPL needs to return to BootROM: TPL_ROCKCHIP_BACK_TO_BROM is selected while SPL_ROCKCHIP_BACK_TO_BROM is not. Split the current ROCKCHIP_BROM_HELPER option into TPL and SPL specific ones, and rely on the appropriate one based on the built phase context. There were 64 configurations with ROCKCHIP_BROM_HELPER. Now there are 58 with TPL_ROCKCHIP_BROM_HELPER only, and 6 with SPL_ROCKCHIP_BROM_HELPER only. For the 58 configurations with TPL_ROCKCHIP_BROM_HELPER only, the SPL size decreases by up to 380 bytes. Signed-off-by: Massimo Pegorer --- arch/arm/mach-rockchip/Kconfig | 9 ++++++--- arch/arm/mach-rockchip/Makefile | 4 ++-- 2 files changed, 8 insertions(+), 5 deletions(-) diff --git a/arch/arm/mach-rockchip/Kconfig b/arch/arm/mach-rockchip/Kconfig index 18ab21ad38e..92183db9cdd 100644 --- a/arch/arm/mach-rockchip/Kconfig +++ b/arch/arm/mach-rockchip/Kconfig @@ -603,7 +603,7 @@ config ROCKCHIP_USB_UART config SPL_ROCKCHIP_BACK_TO_BROM bool "SPL returns to boot ROM" - select ROCKCHIP_BROM_HELPER + select SPL_ROCKCHIP_BROM_HELPER select SPL_BOOTROM_SUPPORT if SPL_FRAMEWORK depends on SPL help @@ -614,7 +614,7 @@ config SPL_ROCKCHIP_BACK_TO_BROM config TPL_ROCKCHIP_BACK_TO_BROM bool "TPL returns to boot ROM" default y - select ROCKCHIP_BROM_HELPER if !ROCKCHIP_RK3066 + select TPL_ROCKCHIP_BROM_HELPER if !ROCKCHIP_RK3066 select TPL_BOOTROM_SUPPORT if TPL_FRAMEWORK depends on TPL help @@ -686,7 +686,10 @@ config ROCKCHIP_SPL_RESERVE_IRAM address is in IRAM and may overlay with SPL text area if not reserved. -config ROCKCHIP_BROM_HELPER +config SPL_ROCKCHIP_BROM_HELPER + bool + +config TPL_ROCKCHIP_BROM_HELPER bool config SPL_ROCKCHIP_EARLYRETURN_TO_BROM diff --git a/arch/arm/mach-rockchip/Makefile b/arch/arm/mach-rockchip/Makefile index d3bc0689f89..e5149858eb7 100644 --- a/arch/arm/mach-rockchip/Makefile +++ b/arch/arm/mach-rockchip/Makefile @@ -7,9 +7,9 @@ # this may have entered from ATF with the stack-pointer pointing to # inaccessible/protected memory (and the bootrom-helper assumes that # the stack-pointer is valid before switching to the U-Boot stack). -obj-spl-$(CONFIG_ROCKCHIP_BROM_HELPER) += bootrom.o +obj-spl-$(CONFIG_SPL_ROCKCHIP_BROM_HELPER) += bootrom.o obj-spl-$(CONFIG_SPL_ROCKCHIP_COMMON_BOARD) += spl.o spl-boot-order.o spl_common.o -obj-tpl-$(CONFIG_ROCKCHIP_BROM_HELPER) += bootrom.o +obj-tpl-$(CONFIG_TPL_ROCKCHIP_BROM_HELPER) += bootrom.o obj-tpl-$(CONFIG_TPL_ROCKCHIP_COMMON_BOARD) += tpl.o spl_common.o obj-tpl-$(CONFIG_ROCKCHIP_PX30) += px30-board-tpl.o spl_common.o -- 2.34.1