From patchwork Tue Dec 17 15:59:34 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jerome Forissier X-Patchwork-Id: 851424 Delivered-To: patch@linaro.org Received: by 2002:a5d:4888:0:b0:385:e875:8a9e with SMTP id g8csp432497wrq; Tue, 17 Dec 2024 08:00:39 -0800 (PST) X-Forwarded-Encrypted: i=2; AJvYcCWOxBmr1aYHnl1VXViX2bl/LnIGps8IJBvomgAOcqUg0EXKElREgESAslz8Sv8PKV9ISWU5cw==@linaro.org X-Google-Smtp-Source: AGHT+IEV6f6oLt+9BHaBi7r6QYjfK/Da8H+vPAOejExCPAgxDidI+QxenkbLSi0SVBCS+2i2YPkX X-Received: by 2002:a05:6402:2787:b0:5d2:60d9:a2ae with SMTP id 4fb4d7f45d1cf-5d63c3bec23mr15231862a12.33.1734451237785; Tue, 17 Dec 2024 08:00:37 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1734451237; cv=none; d=google.com; s=arc-20240605; b=KZuumehp77bJF+PCc7gUnHkWQLfRtpHcYsvJdqDoDJdREQz4BLWPVFmfoyUa1zsmH7 EWuxFFuorVFtr9x6K/ROewELtALetjbrM/XmOj2iZUKkJnqMLNThOCg9tZa77degPK3D NzMqzpWujIrAcVt7qiKPFnHJbIFEkJA3ije6nEewK9ZLD1Uyg6u5c3VjTz5jN8EYi2Ip 6qyKMiWwk0ckUIbpHO2joSaYm8aMoaI7Pl9kZUnENboCKPTuq141/53ju3dtoy4peVfr yhT6IUv9SSzQrhjC5XOl3urkGb5mhD8N0uYM1IvBGneiQlLNTCRYFZTFtMD4FP9//OXL 3eGg== 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=xidtNStbnwE+v0UOCwnLkOTG7ANuPpQ1sto+3K2OWSQ=; fh=7T9U8CxT8/pi4VxDQB+ogewXJ7jd6DKe4+xLsZpalAc=; b=LT6jXSDFrYGxPQTyRE+bEQ45cua0PX+AXCWGG4lwhmbTXArtZNWk1Ma3nJtkczzPtv MiaZ7/gTtZWC6n2mhflvSLoSYccd/YJLLuQt1z+Vb4qDV0Aoo4yRnmKNARohfZf/NWdG eHkx8/ijaEPfo5w00sjpIsF9ZuKeTa9fLJDZbSct9JnJ8+vqB51BaqIh2kmrX2UzutGb ewSm043xC+xMXy5AnQTBY3Mz0xkh4S1EsAPe4Ms6dKrf9NQgZK0VlM/we9lQGd26oRQA 8EP1disIsx/PB+boWrwgMbLkdVz1g13rtOADXMjU0JxdHQOs4k0b4VCh+bx34RYRMtHl uA4g==; dara=google.com ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=UkeJJstP; 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 4fb4d7f45d1cf-5d652add9c8si5144983a12.128.2024.12.17.08.00.37 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 17 Dec 2024 08:00:37 -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=UkeJJstP; 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 7FC408022E; Tue, 17 Dec 2024 17:00:12 +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="UkeJJstP"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id CB74380239; Tue, 17 Dec 2024 17:00:10 +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-x333.google.com (mail-wm1-x333.google.com [IPv6:2a00:1450:4864:20::333]) (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 080EC801CE for ; Tue, 17 Dec 2024 17:00:07 +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-x333.google.com with SMTP id 5b1f17b1804b1-434b3e32e9dso59750915e9.2 for ; Tue, 17 Dec 2024 08:00:07 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1734451206; x=1735056006; 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=xidtNStbnwE+v0UOCwnLkOTG7ANuPpQ1sto+3K2OWSQ=; b=UkeJJstPweJLnImidwZNCP1besY23MLzSuJQUdgegA7irVoRz4GvQHQz3aih2veHSS nXK338tthcMBPO5apeQql2gl5dzGyaCQSXDWVFWfaielECJVrhrhkYR7hKwCrL6mS7Bm /iNjZrbFwDBFh8lmIVFFcQ+pwWcRJ8Ub/GD1lHKj3j4QsIq1KBez/9vgzfpKJYl2mNYP plnKI0E5ZN7EMn1RXz3GUkEiTJFd0GBWXdKb7aWR3yI2aR/FUX/f7dF0VQn70d6/uYaa wueF73OJ2Z0a7dgHsrA1CrC5tJCbkCTDmJhb3AwKkWpj2sCnP8zDQUnnO5tE30wAjBfI bLsA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1734451206; x=1735056006; 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=xidtNStbnwE+v0UOCwnLkOTG7ANuPpQ1sto+3K2OWSQ=; b=AEdBqFNI1tR9yc39XI/AGcp64QGZlHLmCF8luwR+e/8jCVKKFIh+K0GCLpfgAdn1Gy UePnsMKk1mn4ea5jZIjnUpXdYvxACg26kZEbEsNhxFKPvnk+Ue6AqtC5gPv4tHhigoCV foO+ruqdb3vuZK4yMc72Y35cICrGI1C0rNI4I+kZGyH1Vzh2Azlmr+eMDvYV5fKAi4+F rI8o6MPZt9e+f8Md29d4ePcklEcMpTV1l08ThXAd+1HOcVvLlJ54irONSzsTV5i223uE 4U2FSgYbmDSTN1gquL7DXYmCoXyRtyKsViAhd7FFHnu0z/eEB9Q8GRoMSnFXj3WiZqhE rOhA== X-Gm-Message-State: AOJu0Ywaa2IeX8+4hlbxxxjFrIX12xF1vutdXZIfQ+zDwpq30PAy+99z BHVqxo6YPSf39N2xK/k+1VVf+O8LRxunjaXq1m8wPyfa6259Vtji8NEuZc7WO/rwej0CJ3+Z158 Y9fc= X-Gm-Gg: ASbGncvdE4cL2RtZyCoUYq2JOofNePOzFBq7E7iu+GWBAYy8C6Giu4UeE4mHNZFMgL9 vo1feDdjJyuRWQt8fnSK3Mi96unn5+J8u+IGqoyaEsjV1blGSLFrh6kf+oQlS8+cAh3Jy6qQCLF T2XWbxIbOKt99TK1lBN81P7dVc4BQDwRGBsfNWcOHdOIy6vBcoM8CBQn4rd61tXnRmXsqPpsLd9 2QvAOJBw6yzj9DmeK/ntztF3CAcccyAeMyLTNil1v8daHpE+RzTUSIJVKrQtU8upA== X-Received: by 2002:a05:6000:1846:b0:385:fc8c:24b6 with SMTP id ffacd0b85a97d-38880ada79emr15001870f8f.27.1734451206067; Tue, 17 Dec 2024 08:00:06 -0800 (PST) Received: from builder.. ([2a01:e0a:3cb:7bb0:af71:dfb2:66ef:80c3]) by smtp.gmail.com with ESMTPSA id ffacd0b85a97d-388c801ad9asm11390181f8f.58.2024.12.17.08.00.05 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 17 Dec 2024 08:00:05 -0800 (PST) From: Jerome Forissier To: u-boot@lists.denx.de Cc: Ilias Apalodimas , Tom Rini , Simon Glass , Michal Simek , Jerome Forissier , Jonas Karlman , Devarsh Thakkar Subject: [PATCH 3/5] board_init_f_r(): use static calls Date: Tue, 17 Dec 2024 16:59:34 +0100 Message-ID: <0adfb649adecfd0b11e764342ca22ea0ebe438fb.1734448827.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 --- common/board_f.c | 19 ++++++++++--------- 1 file changed, 10 insertions(+), 9 deletions(-) diff --git a/common/board_f.c b/common/board_f.c index ba1af3d8055..b2c83af943a 100644 --- a/common/board_f.c +++ b/common/board_f.c @@ -1020,8 +1020,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 @@ -1034,17 +1034,18 @@ 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 +static int intcall_run_f_r(void) +{ + int ret = 0; - NULL, -}; + CONFIG_IS_ENABLED(X86_64, (INITCALL(init_cache_f_r);)) + + return ret; +} void board_init_f_r(void) { - if (initcall_run_list(init_sequence_f_r)) + if (initcall_run_f_r()) hang(); /*