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 2A679EE4993 for ; Sat, 19 Aug 2023 11:01:59 +0000 (UTC) Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id E74A8868D8; Sat, 19 Aug 2023 13:01:57 +0200 (CEST) Authentication-Results: phobos.denx.de; dmarc=none (p=none dis=none) header.from=arvanta.net Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=u-boot-bounces@lists.denx.de Received: by phobos.denx.de (Postfix, from userid 109) id 77831869B0; Sat, 19 Aug 2023 13:01:56 +0200 (CEST) Received: from fx.arvanta.net (unknown [109.72.52.77]) by phobos.denx.de (Postfix) with ESMTP id E37C3867DE for ; Sat, 19 Aug 2023 13:01:52 +0200 (CEST) Authentication-Results: phobos.denx.de; dmarc=none (p=none dis=none) header.from=arvanta.net Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=mps@arvanta.net Received: from m1 (ab.arvanta.net [10.5.1.5]) by fx.arvanta.net (Postfix) with ESMTP id BA8177386; Sat, 19 Aug 2023 13:01:50 +0200 (CEST) Date: Sat, 19 Aug 2023 13:01:49 +0200 From: Milan =?utf-8?Q?P=2E_Stani=C4=87?= To: Chanho Park Cc: u-boot@lists.denx.de Subject: Re: [PATCH v2 1/2] dm: event: add EVT_DM_POST_INIT_R event type Message-ID: <20230819110149.GC3096@m1> References: <20230818051103.2427590-1-chanho61.park@samsung.com> <20230818051103.2427590-2-chanho61.park@samsung.com> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <20230818051103.2427590-2-chanho61.park@samsung.com> 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 It works. On Fri, 2023-08-18 at 14:11, Chanho Park wrote: > This patch introduces EVT_DM_POST_INIT_R event type for handling hooks > after relocation. > > Fixes: 55171aedda88 ("dm: Emit the arch_cpu_init_dm() even only before relocation") > Suggested-by: Simon Glass > Cc: Bin Meng > Signed-off-by: Chanho Park Tested-by: Milan P. Stanić > --- > drivers/core/root.c | 6 ++++-- > include/event.h | 1 + > 2 files changed, 5 insertions(+), 2 deletions(-) > > diff --git a/drivers/core/root.c b/drivers/core/root.c > index 6775fb0b6575..79d871ab291a 100644 > --- a/drivers/core/root.c > +++ b/drivers/core/root.c > @@ -436,8 +436,10 @@ int dm_init_and_scan(bool pre_reloc_only) > return ret; > } > } > - if (CONFIG_IS_ENABLED(DM_EVENT) && !(gd->flags & GD_FLG_RELOC)) { > - ret = event_notify_null(EVT_DM_POST_INIT_F); > + if (CONFIG_IS_ENABLED(DM_EVENT)) { > + ret = event_notify_null(gd->flags & GD_FLG_RELOC ? > + EVT_DM_POST_INIT_R : > + EVT_DM_POST_INIT_F); > if (ret) > return log_msg_ret("ev", ret); > } > diff --git a/include/event.h b/include/event.h > index daf44bf8a83b..bb38ba98e73b 100644 > --- a/include/event.h > +++ b/include/event.h > @@ -24,6 +24,7 @@ enum event_t { > > /* Events related to driver model */ > EVT_DM_POST_INIT_F, > + EVT_DM_POST_INIT_R, > EVT_DM_PRE_PROBE, > EVT_DM_POST_PROBE, > EVT_DM_PRE_REMOVE, > -- > 2.39.2 >