diff --git a/src/drivers/elog/elog.c b/src/drivers/elog/elog.c index ecee145e31..54674ce9fb 100644 --- a/src/drivers/elog/elog.c +++ b/src/drivers/elog/elog.c @@ -898,4 +898,9 @@ int elog_add_extended_event(u8 type, u32 complement) /* Make sure elog_init() runs at least once to log System Boot event. */ static void elog_bs_init(void *unused) { elog_init(); } + +#if CONFIG(POSTPONE_SPI_ACCESS) +BOOT_STATE_INIT_ENTRY(BS_PAYLOAD_LOAD, BS_ON_EXIT, elog_bs_init, NULL); +#else BOOT_STATE_INIT_ENTRY(BS_POST_DEVICE, BS_ON_ENTRY, elog_bs_init, NULL); +#endif diff --git a/src/soc/intel/pantherlake/elog.c b/src/soc/intel/pantherlake/elog.c index 5abf766fc7..e5a6a9a3cf 100644 --- a/src/soc/intel/pantherlake/elog.c +++ b/src/soc/intel/pantherlake/elog.c @@ -210,7 +210,11 @@ static void pch_log_state(void *unused) pch_log_wake_source(ps); } +#if CONFIG(POSTPONE_SPI_ACCESS) +BOOT_STATE_INIT_ENTRY(BS_PAYLOAD_LOAD, BS_ON_ENTRY, pch_log_state, NULL); +#else BOOT_STATE_INIT_ENTRY(BS_DEV_INIT, BS_ON_EXIT, pch_log_state, NULL); +#endif void elog_gsmi_cb_platform_log_wake_source(void) { diff --git a/src/vendorcode/google/chromeos/elog.c b/src/vendorcode/google/chromeos/elog.c index e60cec83b0..5dabb3cf7f 100644 --- a/src/vendorcode/google/chromeos/elog.c +++ b/src/vendorcode/google/chromeos/elog.c @@ -31,4 +31,8 @@ static void elog_add_vboot_info(void *unused) elog_add_event_raw(ELOG_TYPE_FW_VBOOT_INFO, &data, width); } +#if CONFIG(POSTPONE_SPI_ACCESS) +BOOT_STATE_INIT_ENTRY(BS_PAYLOAD_LOAD, BS_ON_EXIT, elog_add_vboot_info, NULL); +#else BOOT_STATE_INIT_ENTRY(BS_POST_DEVICE, BS_ON_ENTRY, elog_add_vboot_info, NULL); +#endif