From patchwork Wed Dec 18 15:53:56 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jerome Forissier X-Patchwork-Id: 851709 Delivered-To: patch@linaro.org Received: by 2002:a5d:4888:0:b0:385:e875:8a9e with SMTP id g8csp997056wrq; Wed, 18 Dec 2024 07:54:55 -0800 (PST) X-Forwarded-Encrypted: i=2; AJvYcCUaY9pmqNGs0i7dyr5UA1LUVtcOe6ZjjiRuI7l/VPcQ3BzUd8f7KX17Y09NsWrwHNaCC1Uiqg==@linaro.org X-Google-Smtp-Source: AGHT+IHVFSSJzox5j6OKq3S/nEBdhut0/ge3swSsTbQkPrJEsreQBHFIodBUrWHwKsWuX85BoqNc X-Received: by 2002:a17:907:d87:b0:aa6:86d1:c3f8 with SMTP id a640c23a62f3a-aabf48c67dfmr303046366b.39.1734537295082; Wed, 18 Dec 2024 07:54:55 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1734537295; cv=none; d=google.com; s=arc-20240605; b=XlynJO/C2fVlNHVHP28/6/0KsCXraD6L7uX2846ovQQahFGUx6bC+O9mnRL9zc0Fdz yYJ73x7+sqIsU7u/v4kLpESQA+LoJJwD185mfNuVR/I5rhnR/MdraXOYpjKj+J1is82x 15fphZlEm7Hg4J6cvexEDxReCf2e4/QJsBXxS/JlonhGgm3RC/R7FzwoAC/6EnqHwTZ+ qOBkoO1C2G6FbmdR+idgieVcyAP0Ipo72GacxSriO4Iu/UJDBVwDbuwvwYgrI8UG5QD6 +s4i14VBylwYtJBq4h4ffvyNLA38CM+pTip7eBB7Dq8bPYVqr8YdA/OaqUIFYaxXUxNQ QXNA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20240605; h=sender:errors-to:list-subscribe:list-help:list-post:list-archive :list-unsubscribe:list-id:precedence:content-transfer-encoding :mime-version:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=GT1vHcgT5ZCeYIZlNTu7kydDcBrhOwED+EnNq6snnlI=; fh=0NdnFrg12Ax6Tb3+TYlQmpTA5PM/vy+1doATnleuoeY=; b=cji9yMpnzWh2agXZ9oTqGpdjh64Yceunj6FCYkQiH5Jfu+DUkRhDTCV/EpcDFWkmbR 6FK0S+z6xdp+Yjgmh2BQes7OOOepP8IYg88Msays+DD6a4JvXe4PoWmIAa1659OBN/ql pmKBOfcwUrk9PdUhFZwcEUusumSLZB+uMjTvywF7oYSgkEUl59L5mb/0NR/9MAfkbb8R UKZ/oPLa6kiBHpfjk7Crod10IAhpvbwLGV8PjEMsMd2mq4HUIiHhUKvG9oKiAKZagsDW LkqPU+rvGuOmhhiGpbQcPxaU0SBBXCZNy0UoC5DcrLAacvF91+otdCyxZg2GQrjyLKoU wFHA==; dara=google.com ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=zWtgjRSk; spf=pass (google.com: domain of u-boot-bounces@lists.denx.de designates 2a01:238:438b:c500:173d:9f52:ddab:ee01 as permitted sender) smtp.mailfrom=u-boot-bounces@lists.denx.de; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org; dara=neutral header.i=@linaro.org Return-Path: Received: from phobos.denx.de (phobos.denx.de. [2a01:238:438b:c500:173d:9f52:ddab:ee01]) by mx.google.com with ESMTPS id a640c23a62f3a-aab960266adsi647312866b.211.2024.12.18.07.54.54 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 18 Dec 2024 07:54:55 -0800 (PST) Received-SPF: pass (google.com: domain of u-boot-bounces@lists.denx.de designates 2a01:238:438b:c500:173d:9f52:ddab:ee01 as permitted sender) client-ip=2a01:238:438b:c500:173d:9f52:ddab:ee01; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=zWtgjRSk; spf=pass (google.com: domain of u-boot-bounces@lists.denx.de designates 2a01:238:438b:c500:173d:9f52:ddab:ee01 as permitted sender) smtp.mailfrom=u-boot-bounces@lists.denx.de; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org; dara=neutral header.i=@linaro.org Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id 9097680304; Wed, 18 Dec 2024 16:54:27 +0100 (CET) Authentication-Results: phobos.denx.de; dmarc=pass (p=none dis=none) header.from=linaro.org Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=u-boot-bounces@lists.denx.de Authentication-Results: phobos.denx.de; dkim=pass (2048-bit key; unprotected) header.d=linaro.org header.i=@linaro.org header.b="zWtgjRSk"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id 36BFC80312; Wed, 18 Dec 2024 16:54:24 +0100 (CET) X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on phobos.denx.de X-Spam-Level: X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_BLOCKED, SPF_HELO_NONE,SPF_PASS autolearn=ham autolearn_force=no version=3.4.2 Received: from mail-wm1-x335.google.com (mail-wm1-x335.google.com [IPv6:2a00:1450:4864:20::335]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits)) (No client certificate requested) by phobos.denx.de (Postfix) with ESMTPS id 1EC838022B for ; Wed, 18 Dec 2024 16:54:22 +0100 (CET) Authentication-Results: phobos.denx.de; dmarc=pass (p=none dis=none) header.from=linaro.org Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=jerome.forissier@linaro.org Received: by mail-wm1-x335.google.com with SMTP id 5b1f17b1804b1-4361fe642ddso68957615e9.2 for ; Wed, 18 Dec 2024 07:54:22 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1734537261; x=1735142061; darn=lists.denx.de; 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; bh=GT1vHcgT5ZCeYIZlNTu7kydDcBrhOwED+EnNq6snnlI=; b=zWtgjRSkHQWBxOEAMuJAFVwhaLx8O3SLQevajCMwm/vK8ZIr8GJhErI3dwqvYOT/qk 96p+xH27LqWZ9PLNjSO1hIxoo2OYvHKl3gw0eAObt2U7FG9cmJOxC+sVPZoRUB62j/Yt 8MwPvq5W3cAfx7eLWGvnykP+TkrNLskTUuIZdutEEWyVS39/ZS7fcFb8Scakxa6OVCnn rq9RT4x1yTs6mABbbpsor4pgecXLjlELGB5xE+0YBVFbmJWQ7DbBZa4lNOhsnOWbm7cB CsR50vzAezA3nA+ZSKqVSq+cZG0JQmxYzzvXItBOKqHkOt9yamHZPEO/rHJAXJ+B7i9V xSxQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1734537261; x=1735142061; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=GT1vHcgT5ZCeYIZlNTu7kydDcBrhOwED+EnNq6snnlI=; b=R7+i7ozb6ZdDafjlleSV5p1ux8F0yAwb4nl8s3gIQGBFM5fJWYpeJzL7UbasmUjnpc B1QfFVpCNw/FEcLEdYW0aTgOKqDIJnXf3AvzMwxBf7F0H+yqVBmy4o7kQRyo7P57jfpy o2TP3+qAOJT+cmBJPa8cDrXZAGZrP787Te0Fo3A3vz2J3tKbbEvXVNYPIgGXlSEHQdcs CVJn2K712hkLaOwfiFMBmuZbGR95+dEWrNtPNtST6dv9g9bw+RI7XGhHQuiASwVUteXu DIGV05og8mfvx4vL97aS73AVyC9ki5V1GBt8h1Y0VjsmNUaqkgSeIUctPUod7XCXyv1P UIuA== X-Gm-Message-State: AOJu0Ywj8wCO2XXrbPYIDZFqoqj0ohwivqY1SxBqAGX7Tu3Bcg30bMe2 r2SnYdsl2MNbhCCNqv5dSfO8E3xRhHfhoGOz+ph92vnf1sGYHdikvBceMhp7D4gblXTrLoujl0p y6js= X-Gm-Gg: ASbGnctVdlcaNRURHAqMz/2g0FFX7aA1uvJASy6YIK9exBnnD3EqN8K1PMuEHioLP8v 3atDHxYvGu8dvzuOAEiCEodPbnvplLTN/Pi5n2FdqvJUZgmwsUOlKonoa3lliehb9IBjsQdvMjI 29BvTSKeQuamI/8OKUKi/tD4L0wDe001oROUHbMhuOFNBI/+5lYbdy8AECSTQQCN1MfF2fvxkVj NttiT8t4tUgIqfoMGpYK91w1uEk6XVsC+lBqzu0jvKVG4Xmmr9t/0W72thM9OLnFg== X-Received: by 2002:a05:600c:4586:b0:434:a1d3:a306 with SMTP id 5b1f17b1804b1-4365534535bmr29473485e9.5.1734537261376; Wed, 18 Dec 2024 07:54:21 -0800 (PST) Received: from builder.. ([2a01:e0a:3cb:7bb0:af71:dfb2:66ef:80c3]) by smtp.gmail.com with ESMTPSA id 5b1f17b1804b1-43656afc125sm25181705e9.6.2024.12.18.07.54.20 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 18 Dec 2024 07:54:21 -0800 (PST) From: Jerome Forissier To: u-boot@lists.denx.de Cc: Ilias Apalodimas , Tom Rini , Simon Glass , Michal Simek , Jerome Forissier , Devarsh Thakkar , Jonas Karlman Subject: [PATCH v2 3/5] board_init_f_r(): use static calls Date: Wed, 18 Dec 2024 16:53:56 +0100 Message-ID: <217af7ee46d45348bb825caafa20bd91f18ff957.1734537135.git.jerome.forissier@linaro.org> X-Mailer: git-send-email 2.43.0 In-Reply-To: References: MIME-Version: 1.0 X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.39 Precedence: list List-Id: U-Boot discussion List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: u-boot-bounces@lists.denx.de Sender: "U-Boot" X-Virus-Scanned: clamav-milter 0.103.8 at phobos.denx.de X-Virus-Status: Clean Replace the init_sequence_f_r function array by direct calls. Signed-off-by: Jerome Forissier Reviewed-by: Ilias Apalodimas --- common/board_f.c | 18 +++++++----------- 1 file changed, 7 insertions(+), 11 deletions(-) diff --git a/common/board_f.c b/common/board_f.c index cebed85ed4d..f47275a2230 100644 --- a/common/board_f.c +++ b/common/board_f.c @@ -1016,8 +1016,8 @@ void board_init_f(ulong boot_flags) /* * For now this code is only used on x86. * - * init_sequence_f_r is the list of init functions which are run when - * U-Boot is executing from Flash with a semi-limited 'C' environment. + * Run init functions which are run when U-Boot is executing from Flash with a + * semi-limited 'C' environment. * The following limitations must be considered when implementing an * '_f_r' function: * - 'static' variables are read-only @@ -1030,18 +1030,14 @@ void board_init_f(ulong boot_flags) * NOTE: At present only x86 uses this route, but it is intended that * all archs will move to this when generic relocation is implemented. */ -static const init_fnc_t init_sequence_f_r[] = { -#if !CONFIG_IS_ENABLED(X86_64) - init_cache_f_r, -#endif - - NULL, -}; +static void initcall_run_f_r(void) +{ + CONFIG_IS_ENABLED(X86_64, (INITCALL(init_cache_f_r);)) +} void board_init_f_r(void) { - if (initcall_run_list(init_sequence_f_r)) - hang(); + initcall_run_f_r(); /* * The pre-relocation drivers may be using memory that has now gone