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 31F33C25B08 for ; Wed, 17 Aug 2022 07:53:20 +0000 (UTC) Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id 5054584960; Wed, 17 Aug 2022 09:52:57 +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=1660722777; bh=me9ky5QG4ES3yXORU9we2djQ4NYjz5ubTUGdDOOKsRc=; h=From:To:Cc:Subject:Date:In-Reply-To:References:List-Id: List-Unsubscribe:List-Archive:List-Post:List-Help:List-Subscribe: From; b=KWG7kpjxxJyrA0k9//UJxP/nOnD0QSth6jLTZgNirAazmOBNVIfwaS3Fs2SWb9Lul 4Na8eLYOL0jcYrsitUvxfs/43+DDJJFBUKuDOlsDtX7XLDubNXP9NOvZOHr03vXhWx 3nbNSH4mKX0SmkTalN1/0muytoarURwR2ZTFflWi2GXqLCHpJjxRnlPPSNaHe9mPW3 GoGmKJpZYfIjapY4hkeHNbZmRVn0br4hUK9AUWqNEu9rRQRBvNtESVyB+Ew7imy1Rp cFvYXocDvgjcUqoh8Wd3xUmjue9Fk6ARvUfNYejZdv7vMLPvKRfLIfeoYxliJ7rlMd erauxLbODdStg== Received: by phobos.denx.de (Postfix, from userid 109) id 36DC88497F; Wed, 17 Aug 2022 09:52:52 +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 7DDA18497F for ; Wed, 17 Aug 2022 09:52:48 +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 [10.196.197.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 4M70cG3bDLz9sSs; Wed, 17 Aug 2022 09:52:46 +0200 (CEST) From: Stefan Roese To: u-boot@lists.denx.de Cc: trini@konsulko.com, sjg@chromium.org, cchavva@marvell.com, awilliams@marvell.com Subject: [PATCH v5 4/8] cyclic: Integrate cyclic functionality at bootup in board_r/f Date: Wed, 17 Aug 2022 09:52:39 +0200 Message-Id: <20220817075243.3242445-5-sr@denx.de> In-Reply-To: <20220817075243.3242445-1-sr@denx.de> References: <20220817075243.3242445-1-sr@denx.de> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit 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 --- 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..cf89adfaa430 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 @@ -591,6 +592,7 @@ static int run_main_loop(void) static init_fnc_t init_sequence_r[] = { initr_trace, initr_reloc, + cyclic_init, event_init, /* TODO: could x86/PPC have this also perhaps? */ #if defined(CONFIG_ARM) || defined(CONFIG_RISCV) -- 2.37.2