diff options
author | Andrey Petrov <andrey.petrov@intel.com> | 2016-07-18 00:15:41 -0700 |
---|---|---|
committer | Aaron Durbin <adurbin@chromium.org> | 2016-07-19 21:03:03 +0200 |
commit | 3a94a3ba5b238067f382d07f92c57373003b79cc (patch) | |
tree | 37e2b5da73fef0646590ac13306871a25b92dbed /src/drivers/intel/fsp2_0/util.c | |
parent | 1b1d4b7ae653e56ec7cdeec438487ae7ded0e62a (diff) |
drivers/intel/fsp2_0: Split reset handling logic
FSP 2.0 spec only defines 2 reset request (COLD, WARM) exit codes. The
rest 6 codes are platform-specific and may vary. Modify helper function
so that only basic resets are handled and let SoC deal with the rest.
Change-Id: Ib2f446e0449301407b135933a2088bcffc3ac32a
Signed-off-by: Andrey Petrov <andrey.petrov@intel.com>
Reviewed-on: https://review.coreboot.org/15730
Reviewed-by: Aaron Durbin <adurbin@chromium.org>
Tested-by: build bot (Jenkins)
Diffstat (limited to 'src/drivers/intel/fsp2_0/util.c')
-rw-r--r-- | src/drivers/intel/fsp2_0/util.c | 26 |
1 files changed, 18 insertions, 8 deletions
diff --git a/src/drivers/intel/fsp2_0/util.c b/src/drivers/intel/fsp2_0/util.c index faf1dd3a02..1d3c744f32 100644 --- a/src/drivers/intel/fsp2_0/util.c +++ b/src/drivers/intel/fsp2_0/util.c @@ -134,8 +134,19 @@ enum cb_err fsp_validate_component(struct fsp_header *hdr, return CB_SUCCESS; } +static bool fsp_reset_requested(enum fsp_status status) +{ + return (status >= FSP_STATUS_RESET_REQUIRED_COLD && + status <= FSP_STATUS_RESET_REQUIRED_8); +} + void fsp_handle_reset(enum fsp_status status) { + if (!fsp_reset_requested(status)) + return; + + printk(BIOS_DEBUG, "FSP: handling reset type %x\n", status); + switch(status) { case FSP_STATUS_RESET_REQUIRED_COLD: hard_reset(); @@ -143,16 +154,15 @@ void fsp_handle_reset(enum fsp_status status) case FSP_STATUS_RESET_REQUIRED_WARM: soft_reset(); break; - case FSP_STATUS_RESET_REQUIRED_GLOBAL_RESET: - global_reset(); + case FSP_STATUS_RESET_REQUIRED_3: + case FSP_STATUS_RESET_REQUIRED_4: + case FSP_STATUS_RESET_REQUIRED_5: + case FSP_STATUS_RESET_REQUIRED_6: + case FSP_STATUS_RESET_REQUIRED_7: + case FSP_STATUS_RESET_REQUIRED_8: + chipset_handle_reset(status); break; default: break; } } - -bool fsp_reset_requested(enum fsp_status status) -{ - return (status >= FSP_STATUS_RESET_REQUIRED_COLD && - status <= FSP_STATUS_RESET_REQUIRED_GLOBAL_RESET); -} |