Skip to content

Commit

Permalink
FSP: Remove flash hook after completing code update
Browse files Browse the repository at this point in the history
In some corner cases, FSP may not respond to Deep IPL request after
code update -OR- it may delay processing MBOX command. In such cases
we may enter code update path again.. which is not required.
Hence clear flash hook after completing code update.

Signed-off-by: Vasant Hegde <hegdevasant@linux.vnet.ibm.com>
Signed-off-by: Oliver O'Halloran <oohall@gmail.com>
  • Loading branch information
Vasant Hegde authored and oohal committed Feb 12, 2020
1 parent b858aef commit 958769d
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions platforms/ibm-fsp/common.c
Original file line number Diff line number Diff line change
Expand Up @@ -200,6 +200,9 @@ int64_t ibm_fsp_cec_reboot(void)
fsp_flash_term_hook() == OPAL_SUCCESS)
cmd = FSP_CMD_DEEP_REBOOT;

/* Clear flash hook */
fsp_flash_term_hook = NULL;

printf("FSP: Sending 0x%02x reboot command to FSP...\n", cmd);

/* If that failed, talk to the FSP */
Expand Down Expand Up @@ -228,6 +231,9 @@ int64_t ibm_fsp_cec_power_down(uint64_t request)
if (fsp_flash_term_hook)
fsp_flash_term_hook();

/* Clear flash hook */
fsp_flash_term_hook = NULL;

printf("FSP: Sending shutdown command to FSP...\n");

if (fsp_sync_msg(fsp_mkmsg(FSP_CMD_POWERDOWN_NORM, 1, request), true))
Expand Down

0 comments on commit 958769d

Please sign in to comment.