aboutsummaryrefslogtreecommitdiff
path: root/board/ge
diff options
context:
space:
mode:
authorSimon Glass <sjg@chromium.org>2023-08-21 21:17:01 -0600
committerTom Rini <trini@konsulko.com>2023-08-31 13:16:55 -0400
commit91caa3bb89b112a1421ee2ee3661baf67c64bab9 (patch)
treef70b4d2452f8ca45025916cd85f0d1af684902bb /board/ge
parent6a32bfae61652f9dae621410ca6e094f374a1f11 (diff)
downloadu-boot-91caa3bb89b112a1421ee2ee3661baf67c64bab9.zip
u-boot-91caa3bb89b112a1421ee2ee3661baf67c64bab9.tar.gz
u-boot-91caa3bb89b112a1421ee2ee3661baf67c64bab9.tar.bz2
event: Use an event to replace last_stage_init()WIP/2023-08-31-replace-more-init-hooks-with-events
Add a new event which handles this function. Convert existing use of the function to use the new event instead. Make sure that EVENT is enabled by affected boards, by selecting it from the LAST_STAGE_INIT option. For x86, enable it by default since all boards need it. For controlcenterdc, inline the get_tpm() function and make sure the event is not built in SPL. Signed-off-by: Simon Glass <sjg@chromium.org>
Diffstat (limited to 'board/ge')
-rw-r--r--board/ge/bx50v3/bx50v3.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/board/ge/bx50v3/bx50v3.c b/board/ge/bx50v3/bx50v3.c
index 4e9d841..2d89519 100644
--- a/board/ge/bx50v3/bx50v3.c
+++ b/board/ge/bx50v3/bx50v3.c
@@ -5,6 +5,7 @@
* Copyright 2012 Freescale Semiconductor, Inc.
*/
+#include <event.h>
#include <image.h>
#include <init.h>
#include <asm/arch/clock.h>
@@ -531,7 +532,7 @@ static void remove_ethaddr_env_var(int index)
env_set(env_var_name, NULL);
}
-int last_stage_init(void)
+static int last_stage_init(void)
{
int i;
@@ -544,6 +545,7 @@ int last_stage_init(void)
return 0;
}
+EVENT_SPY_SIMPLE(EVT_LAST_STAGE_INIT, last_stage_init);
int checkboard(void)
{