From mboxrd@z Thu Jan 1 00:00:00 1970 From: Simon Glass Date: Wed, 31 Jul 2019 10:53:00 -0600 Subject: [U-Boot] [PATCH] board_r: re-order the board_early_init_r() In-Reply-To: <20190724100119.7626-1-kever.yang@rock-chips.com> References: <20190724100119.7626-1-kever.yang@rock-chips.com> Message-ID: List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: u-boot@lists.denx.de Hi Kever, On Wed, 24 Jul 2019 at 04:01, Kever Yang wrote: > > The board_early_init_r() suppose to be called before board_init(), > then the board callback functions in board_r will be: > - board_early_init_r() > - board_init() > - board_late_init() board_early_init_r() was introduced for PowerPC as part of creating the generic board-init code (board_f.c and board_r.c). I wonder whether any board is actually using both board_init() and board_early_init_r(). To me they serve the same function. So I think we should remove board_early_init_r() and change all uses to board_init() instead. I expect they will mostly be PowerPC. > > Signed-off-by: Kever Yang > --- > > common/board_r.c | 6 +++--- > 1 file changed, 3 insertions(+), 3 deletions(-) > > diff --git a/common/board_r.c b/common/board_r.c > index abc31b17b8..c5e33c4654 100644 > --- a/common/board_r.c > +++ b/common/board_r.c > @@ -681,6 +681,9 @@ static init_fnc_t init_sequence_r[] = { > #ifdef CONFIG_DM > initr_dm, > #endif > +#if defined(CONFIG_BOARD_EARLY_INIT_R) > + board_early_init_r, > +#endif > #if defined(CONFIG_ARM) || defined(CONFIG_NDS32) || defined(CONFIG_RISCV) || \ > defined(CONFIG_SANDBOX) > board_init, /* Setup chipselects */ > @@ -712,9 +715,6 @@ static init_fnc_t init_sequence_r[] = { > #endif > #ifdef CONFIG_ADDR_MAP > initr_addr_map, > -#endif > -#if defined(CONFIG_BOARD_EARLY_INIT_R) > - board_early_init_r, > #endif > INIT_FUNC_WATCHDOG_RESET > #ifdef CONFIG_POST > -- > 2.17.1 > Regards, Simon