Message ID | 217af7ee46d45348bb825caafa20bd91f18ff957.1734537135.git.jerome.forissier@linaro.org |
---|---|
State | New |
Headers | show |
Series | Static initcalls | expand |
On Wed, 18 Dec 2024 at 17:54, Jerome Forissier <jerome.forissier@linaro.org> wrote: > > Replace the init_sequence_f_r function array by direct calls. > > Signed-off-by: Jerome Forissier <jerome.forissier@linaro.org> > --- > common/board_f.c | 18 +++++++----------- > 1 file changed, 7 insertions(+), 11 deletions(-) > > diff --git a/common/board_f.c b/common/board_f.c > index cebed85ed4d..f47275a2230 100644 > --- a/common/board_f.c > +++ b/common/board_f.c > @@ -1016,8 +1016,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 > @@ -1030,18 +1030,14 @@ 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 > - > - NULL, > -}; > +static void initcall_run_f_r(void) > +{ > + CONFIG_IS_ENABLED(X86_64, (INITCALL(init_cache_f_r);)) > +} > > void board_init_f_r(void) > { > - if (initcall_run_list(init_sequence_f_r)) > - hang(); > + initcall_run_f_r(); > > /* > * The pre-relocation drivers may be using memory that has now gone > -- > 2.43.0 > Reviewed-by: Ilias Apalodimas <ilias.apalodimas@linaro.org>
diff --git a/common/board_f.c b/common/board_f.c index cebed85ed4d..f47275a2230 100644 --- a/common/board_f.c +++ b/common/board_f.c @@ -1016,8 +1016,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 @@ -1030,18 +1030,14 @@ 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 - - NULL, -}; +static void initcall_run_f_r(void) +{ + CONFIG_IS_ENABLED(X86_64, (INITCALL(init_cache_f_r);)) +} void board_init_f_r(void) { - if (initcall_run_list(init_sequence_f_r)) - hang(); + initcall_run_f_r(); /* * The pre-relocation drivers may be using memory that has now gone
Replace the init_sequence_f_r function array by direct calls. Signed-off-by: Jerome Forissier <jerome.forissier@linaro.org> --- common/board_f.c | 18 +++++++----------- 1 file changed, 7 insertions(+), 11 deletions(-)