summaryrefslogtreecommitdiff
path: root/firmware/lib/include
diff options
context:
space:
mode:
authorRandall Spangler <rspangler@chromium.org>2018-01-02 12:32:16 -0800
committerchrome-bot <chrome-bot@chromium.org>2018-01-09 14:14:16 -0800
commit39427240693b31942f89385d3b01083fea1b0678 (patch)
treee1a8dad5e269bd8f6b1530ab307841b486957b47 /firmware/lib/include
parent46b7e0dae409ad83797a0b2feff314417bbb7b1c (diff)
downloadvboot-39427240693b31942f89385d3b01083fea1b0678.tar.gz
ec_sync: Use vboot2 context instead of cparams
Copy sync-related flags from cparams / vboot1 shared data to the equivalent vboot2 structs. This removes the need for ec_sync to access the old structs, which are on their way out. No change in functionality. BUG=chromium:611535 BRANCH=none TEST=make -j runtests; build bob firmware and boot it Change-Id: I50ee76cf275a7fba894c2ec2c3dd83b9a8d91b53 Signed-off-by: Randall Spangler <rspangler@chromium.org> Reviewed-on: https://chromium-review.googlesource.com/852489 Tested-by: Daisuke Nojiri <dnojiri@chromium.org> Reviewed-by: Daisuke Nojiri <dnojiri@chromium.org> Reviewed-by: Stefan Reinauer <reinauer@chromium.org>
Diffstat (limited to 'firmware/lib/include')
-rw-r--r--firmware/lib/include/ec_sync.h23
1 files changed, 6 insertions, 17 deletions
diff --git a/firmware/lib/include/ec_sync.h b/firmware/lib/include/ec_sync.h
index 78b08a20..f95b500f 100644
--- a/firmware/lib/include/ec_sync.h
+++ b/firmware/lib/include/ec_sync.h
@@ -20,13 +20,11 @@ struct VbCommonParams;
* whether any updates are necessary.
*
* @param ctx Vboot2 context
- * @param cparams Vboot common params
* @return VBERROR_SUCCESS, VBERROR_EC_REBOOT_TO_RO_REQUIRED if the EC must
* reboot back to its RO code to continue EC sync, or other non-zero error
* code.
*/
-VbError_t ec_sync_phase1(struct vb2_context *ctx,
- struct VbCommonParams *cparams);
+VbError_t ec_sync_phase1(struct vb2_context *ctx);
/**
* Returns non-zero if the EC will perform a slow update during phase 2.
@@ -35,23 +33,19 @@ VbError_t ec_sync_phase1(struct vb2_context *ctx,
* ec_sync_phase2().
*
* @param ctx Vboot2 context
- * @param cparams Vboot common params
* @return non-zero if a slow update will be done; zero if no update or a
* fast update.
*/
-int ec_will_update_slowly(struct vb2_context *ctx,
- struct VbCommonParams *cparams);
+int ec_will_update_slowly(struct vb2_context *ctx);
/**
* Check if auxiliary firmware blobs need to be updated.
*
* @param ctx Vboot2 context
- * @param cparams Vboot common params
* @param severity VB_AUX_FW_{NO,FAST,SLOW}_UPDATE
* @return VBERROR_SUCCESS or non-zero error code.
*/
VbError_t ec_sync_check_aux_fw(struct vb2_context *ctx,
- struct VbCommonParams *cparams,
VbAuxFwUpdateSeverity_t *severity);
/**
@@ -64,13 +58,11 @@ VbError_t ec_sync_check_aux_fw(struct vb2_context *ctx,
* warning screen before calling phase 2.
*
* @param ctx Vboot2 context
- * @param cparams Vboot common params
* @return VBERROR_SUCCESS, VBERROR_EC_REBOOT_TO_RO_REQUIRED if the EC must
* reboot back to its RO code to continue EC sync, or other non-zero error
* code.
*/
-VbError_t ec_sync_phase2(struct vb2_context *ctx,
- struct VbCommonParams *cparams);
+VbError_t ec_sync_phase2(struct vb2_context *ctx);
/**
* EC sync, phase 3
@@ -78,10 +70,9 @@ VbError_t ec_sync_phase2(struct vb2_context *ctx,
* This completes EC sync and handles battery cutoff if needed.
*
* @param ctx Vboot2 context
- * @param cparams Vboot common params
* @return VBERROR_SUCCESS or non-zero error code.
*/
-VbError_t ec_sync_phase3(struct vb2_context *ctx, VbCommonParams *cparams);
+VbError_t ec_sync_phase3(struct vb2_context *ctx);
/**
* Sync all EC devices to expected versions.
@@ -89,11 +80,9 @@ VbError_t ec_sync_phase3(struct vb2_context *ctx, VbCommonParams *cparams);
* This is a high-level function which calls the functions above.
*
* @param ctx Vboot context
- * @param devidx EC device index to sync
- * @param cparams Common vboot params
+ * @param cparams Vboot common params
* @return VBERROR_SUCCESS, or non-zero if error.
*/
-VbError_t ec_sync_all(struct vb2_context *ctx, struct
- VbCommonParams *cparams);
+VbError_t ec_sync_all(struct vb2_context *ctx, struct VbCommonParams *cparams);
#endif /* VBOOT_REFERENCE_EC_SYNC_H_ */