From: Stefan Agner Date: Mon, 24 Sep 2018 16:19:44 +0200 Subject: [U-Boot] [PATCH] common: add board specific hook for os preboot config In-Reply-To: <20180813073014.28564-1-gerard.salvatella@toradex.com> References: <20180813073014.28564-1-gerard.salvatella@toradex.com> Message-ID: <3c280fb2286cef0e3128429c475d0f76@agner.ch> List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable To: u-boot@lists.denx.de On 13.08.2018 09:30, Gerard Salvatella wrote: > Some boards require specific configuration prior to booting the kernel. > For instance, our boards require shutting down the display to avoid > fading transitions before the drivers are reloaded by the kernel. This > could be facilitated by adding an extra hook during the os booting > process. >=20 > Signed-off-by: Gerard Salvatella Tom, any thoughts on this? I guess it would get merged directly by you? FWIW, I suggested this approach, and Gerards implementation looks good to me, so: Reviewed-by: Stefan Agner -- Stefan > --- > common/bootm_os.c | 7 +++++++ > 1 file changed, 7 insertions(+) >=20 > diff --git a/common/bootm_os.c b/common/bootm_os.c > index f4bd905909..1e7af56b64 100644 > --- a/common/bootm_os.c > +++ b/common/bootm_os.c > @@ -505,9 +505,16 @@ __weak void arch_preboot_os(void) > /* please define platform specific arch_preboot_os() */ > } >=20 > +/* Allow for board specific config before we boot */ > +__weak void board_preboot_os(void) > +{ > + /* please define board specific board_preboot_os() */ > +} > + > int boot_selected_os(int argc, char * const argv[], int state, > bootm_headers_t *images, boot_os_fn *boot_fn) > { > + board_preboot_os(); > arch_preboot_os(); > boot_fn(state, argc, argv, images); >=20 > -- > 2.18.0 >=20 >=20 > [Toradex Logo] Global Leader in Arm=C2=AE > Embedded Computer Modules >=20 > Choose > Us > | Products | Developer > Center | > Community | > Careers > Meet our engineers > at: > - Linux Developer Conference, Brazil, Aug 25-26, 2018 > - NXP Technology Days 2018, United States, Aug 28, 2018 > - IoT Latin America, Brazil, Aug 29-30, 2018 >=20 >=20 >=20 > _______________________________________________ > U-Boot mailing list > U-Boot at lists.denx.de > https://lists.denx.de/listinfo/u-boot