From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from phobos.denx.de (phobos.denx.de [85.214.62.61]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 6AFF3C38145 for ; Fri, 2 Sep 2022 11:58:38 +0000 (UTC) Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id 5CC8E84A93; Fri, 2 Sep 2022 13:58:11 +0200 (CEST) Authentication-Results: phobos.denx.de; dmarc=none (p=none dis=none) header.from=denx.de Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=u-boot-bounces@lists.denx.de DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=denx.de; s=phobos-20191101; t=1662119891; bh=80pbfMwG8Z9cLFLczRoP27hXtiJCrNwg3F2Qa4nXlRM=; h=From:To:Cc:Subject:Date:In-Reply-To:References:List-Id: List-Unsubscribe:List-Archive:List-Post:List-Help:List-Subscribe: From; b=U4KgbwyIse/Tsiix3ZAFnagLi/HNAb++OCXb2dqZt44ySFKymufozPwuYDZa0eP/w d9LX2t+scWHuYFR6LfuZ2XOpoV3G5SMtSnvbT+MSMfia4btLC7cvaQidCC1eo1HbdA F9jaRG3RTUAO2L/ki47xYbp+/85Vjt2EaMTdxRDnXYDkfwpplcDQujHSzOnDwvXwOf HWBUi+pfFSwsu/Y01Nx8o9+gS/24ZwkWYTHfAsm8/AYTgVEKBiNYeRUAkr94+P0/Bg 1Goyjkot6f7oQdJ9YhdeWi+im0QAt19k65qA6w81519FY9PMwjqPVcrTKsnBuILMpp 4cvK84UgQ+k6w== Received: by phobos.denx.de (Postfix, from userid 109) id 4206584A90; Fri, 2 Sep 2022 13:58:03 +0200 (CEST) Received: from mout-u-204.mailbox.org (mout-u-204.mailbox.org [80.241.59.204]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) (No client certificate requested) by phobos.denx.de (Postfix) with ESMTPS id E3F3484A89 for ; Fri, 2 Sep 2022 13:57:58 +0200 (CEST) Authentication-Results: phobos.denx.de; dmarc=none (p=none dis=none) header.from=denx.de Authentication-Results: phobos.denx.de; spf=fail smtp.mailfrom=sr@denx.de Received: from smtp1.mailbox.org (smtp1.mailbox.org [IPv6:2001:67c:2050:b231:465::1]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange ECDHE (P-384) server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by mout-u-204.mailbox.org (Postfix) with ESMTPS id 4MJxHn0LyQz9sSP; Fri, 2 Sep 2022 13:57:57 +0200 (CEST) From: Stefan Roese To: u-boot@lists.denx.de Cc: trini@konsulko.com, sjg@chromium.org, awilliams@marvell.com, cchavva@marvell.com Subject: [PATCH v6 4/8] cyclic: Integrate cyclic functionality at bootup in board_r/f Date: Fri, 2 Sep 2022 13:57:50 +0200 Message-Id: <20220902115754.1280789-5-sr@denx.de> In-Reply-To: <20220902115754.1280789-1-sr@denx.de> References: <20220902115754.1280789-1-sr@denx.de> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: 4MJxHn0LyQz9sSP 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.6 at phobos.denx.de X-Virus-Status: Clean This patch adds a call to cyclic_init() to board_f/r.c, enabling the common cyclic infrastructure. After this it's possible to add cyclic functions via cyclic_register(). Signed-off-by: Stefan Roese Reviewed-by: Simon Glass --- v6: - Move cyclic_init() in board_r.c after initr_malloc, as we now need malloc to work v5: - No change v4: - Added Simon's RB tag v3: - No change v2: - No change common/board_f.c | 2 ++ common/board_r.c | 2 ++ 2 files changed, 4 insertions(+) diff --git a/common/board_f.c b/common/board_f.c index 18e2246733b0..deb46be18227 100644 --- a/common/board_f.c +++ b/common/board_f.c @@ -16,6 +16,7 @@ #include #include #include +#include #include #include #include @@ -828,6 +829,7 @@ static const init_fnc_t init_sequence_f[] = { initf_malloc, log_init, initf_bootstage, /* uses its own timer, so does not need DM */ + cyclic_init, event_init, #ifdef CONFIG_BLOBLIST bloblist_init, diff --git a/common/board_r.c b/common/board_r.c index 56eb60fa2753..062bc3e688c6 100644 --- a/common/board_r.c +++ b/common/board_r.c @@ -13,6 +13,7 @@ #include #include #include +#include #include #include #ifdef CONFIG_MTD_NOR_FLASH @@ -611,6 +612,7 @@ static init_fnc_t init_sequence_r[] = { #endif initr_barrier, initr_malloc, + cyclic_init, log_init, initr_bootstage, /* Needs malloc() but has its own timer */ #if defined(CONFIG_CONSOLE_RECORD) -- 2.37.3