diff options
author | Simon Glass <sjg@chromium.org> | 2023-08-21 21:17:01 -0600 |
---|---|---|
committer | Tom Rini <trini@konsulko.com> | 2023-08-31 13:16:55 -0400 |
commit | 91caa3bb89b112a1421ee2ee3661baf67c64bab9 (patch) | |
tree | f70b4d2452f8ca45025916cd85f0d1af684902bb /include | |
parent | 6a32bfae61652f9dae621410ca6e094f374a1f11 (diff) |
event: Use an event to replace last_stage_init()
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 'include')
-rw-r--r-- | include/event.h | 12 | ||||
-rw-r--r-- | include/init.h | 1 |
2 files changed, 12 insertions, 1 deletions
diff --git a/include/event.h b/include/event.h index 85269aa317..747a9f6c65 100644 --- a/include/event.h +++ b/include/event.h @@ -41,6 +41,18 @@ enum event_t { */ EVT_FSP_INIT_F, + /* + * Emitted just before jumping to the main loop + * + * Some boards need to perform initialisation immediately before control + * is passed to the command-line interpreter (e.g. for init that depend + * on later phases in the init sequence). + * + * Some parts can be only initialized if all others (like Interrupts) + * are up and running (e.g. the PC-style ISA keyboard). + */ + EVT_LAST_STAGE_INIT, + /* Fpga load hook */ EVT_FPGA_LOAD, diff --git a/include/init.h b/include/init.h index 13579db759..4e7fe26c20 100644 --- a/include/init.h +++ b/include/init.h @@ -270,7 +270,6 @@ void board_init_r(struct global_data *id, ulong dest_addr) __attribute__ ((noreturn)); int cpu_init_r(void); -int last_stage_init(void); int mac_read_from_eeprom(void); int set_cpu_clk_info(void); int update_flash_size(int flash_size); |