summaryrefslogtreecommitdiff
path: root/firmware/lib/ec_sync_all.c
diff options
context:
space:
mode:
Diffstat (limited to 'firmware/lib/ec_sync_all.c')
-rw-r--r--firmware/lib/ec_sync_all.c22
1 files changed, 19 insertions, 3 deletions
diff --git a/firmware/lib/ec_sync_all.c b/firmware/lib/ec_sync_all.c
index f0e4291c..af06b0ec 100644
--- a/firmware/lib/ec_sync_all.c
+++ b/firmware/lib/ec_sync_all.c
@@ -21,10 +21,17 @@ VbError_t ec_sync_all(struct vb2_context *ctx, struct VbCommonParams *cparams)
{
VbSharedDataHeader *shared =
(VbSharedDataHeader *)cparams->shared_data_blob;
+ VbAuxFwUpdateSeverity_t fw_update;
+ VbError_t rv;
+
+ rv = ec_sync_check_aux_fw(ctx, cparams, &fw_update);
+ if (rv)
+ return rv;
/* Do EC sync phase 1; this determines if we need an update */
VbError_t phase1_rv = ec_sync_phase1(ctx, cparams);
- int need_wait_screen = ec_will_update_slowly(ctx, cparams);
+ int need_wait_screen = ec_will_update_slowly(ctx, cparams) ||
+ (fw_update == VB_AUX_FW_SLOW_UPDATE);
/*
* Check if we need to reboot to load the VGA Option ROM before we can
@@ -57,11 +64,20 @@ VbError_t ec_sync_all(struct vb2_context *ctx, struct VbCommonParams *cparams)
* Do EC sync phase 2; this applies the update and/or jumps to the
* correct EC image.
*/
- VbError_t rv = ec_sync_phase2(ctx, cparams);
+ rv = ec_sync_phase2(ctx, cparams);
if (rv)
return rv;
/*
+ * Do software sync for devices tunneled throught the EC.
+ */
+ if (fw_update != VB_AUX_FW_NO_UPDATE) {
+ rv = VbExUpdateAuxFw();
+ if (rv)
+ return rv;
+ }
+
+ /*
* Reboot to unload VGA Option ROM if:
* - we displayed the wait screen
* - the system has slow EC update flag set
@@ -77,7 +93,7 @@ VbError_t ec_sync_all(struct vb2_context *ctx, struct VbCommonParams *cparams)
return VBERROR_VGA_OPROM_MISMATCH;
}
- /* Do EC sync phase 3; this completes synd and handles battery cutoff */
+ /* Do EC sync phase 3; this completes sync and handles battery cutoff */
rv = ec_sync_phase3(ctx, cparams);
if (rv)
return rv;