public inbox for u-boot@lists.denx.de
 help / color / mirror / Atom feed
* [U-Boot] [PATCH] common: add board specific hook for os preboot config
@ 2018-08-13  7:30 Gerard Salvatella
  2018-08-16 13:09 ` Stefan Agner
                   ` (3 more replies)
  0 siblings, 4 replies; 10+ messages in thread
From: Gerard Salvatella @ 2018-08-13  7:30 UTC (permalink / raw)
  To: u-boot

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.

Signed-off-by: Gerard Salvatella <gerard.salvatella@toradex.com>
---
 common/bootm_os.c | 7 +++++++
 1 file changed, 7 insertions(+)

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() */
 }

+/* 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);

--
2.18.0


[Toradex Logo]<http://toradex.com>      Global Leader in Arm�
Embedded Computer Modules

Choose Us<https://www.toradex.com/how-to-choose-system-computer-on-module-partner> | Products<https://www.toradex.com/products> | Developer Center<http://developer.toradex.com/> | Community<https://www.toradex.com/community> | Careers<https://careers.toradex.com/>
Meet our engineers at<https://www.toradex.com/events>:<https://www.toradex.com/events>
- 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

^ permalink raw reply related	[flat|nested] 10+ messages in thread

end of thread, other threads:[~2018-11-14 23:00 UTC | newest]

Thread overview: 10+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2018-08-13  7:30 [U-Boot] [PATCH] common: add board specific hook for os preboot config Gerard Salvatella
2018-08-16 13:09 ` Stefan Agner
2018-09-24 14:43   ` Michael Nazzareno Trimarchi
2018-09-24 14:51     ` Stefan Agner
2018-09-24 14:56       ` Michael Nazzareno Trimarchi
2018-09-24 15:15         ` Stefan Agner
2018-09-24 15:19           ` Michael Nazzareno Trimarchi
2018-08-17 10:54 ` Christian Gmeiner
2018-09-24 14:19 ` Stefan Agner
2018-11-14 23:00 ` Marcel Ziswiler

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox