diff options
-rw-r--r-- | src/soc/intel/common/block/cse/cse_eop.c | 21 | ||||
-rw-r--r-- | src/soc/intel/common/block/include/intelblocks/cse.h | 3 |
2 files changed, 23 insertions, 1 deletions
diff --git a/src/soc/intel/common/block/cse/cse_eop.c b/src/soc/intel/common/block/cse/cse_eop.c index 5d6a4a7886..c17e2278f2 100644 --- a/src/soc/intel/common/block/cse/cse_eop.c +++ b/src/soc/intel/common/block/cse/cse_eop.c @@ -185,8 +185,15 @@ static void handle_cse_eop_result(enum cse_eop_result result) } } -static void set_cse_end_of_post(void *unused) +static void do_send_end_of_post(void) { + static bool eop_sent = false; + + if (eop_sent) { + printk(BIOS_ERR, "EOP already sent\n"); + return; + } + /* * If CSE is already hidden then accessing CSE registers would be wrong and will * receive junk, hence, return as CSE is already disabled. @@ -203,6 +210,18 @@ static void set_cse_end_of_post(void *unused) timestamp_add_now(TS_ME_AFTER_END_OF_POST); set_cse_device_state(PCH_DEVFN_CSE, DEV_IDLE); + + eop_sent = true; +} + +void cse_send_end_of_post(void) +{ + return do_send_end_of_post(); +} + +static void set_cse_end_of_post(void *unused) +{ + return do_send_end_of_post(); } /* diff --git a/src/soc/intel/common/block/include/intelblocks/cse.h b/src/soc/intel/common/block/include/intelblocks/cse.h index e67d9d8469..f031ad5105 100644 --- a/src/soc/intel/common/block/include/intelblocks/cse.h +++ b/src/soc/intel/common/block/include/intelblocks/cse.h @@ -498,6 +498,9 @@ void heci_set_to_d0i3(void); /* Function performs the global reset lock */ void cse_control_global_reset_lock(void); +/* Send End of Post (EOP) command to CSE device */ +void cse_send_end_of_post(void); + /* * SoC override API to make heci1 disable using PCR. * |