flash_ec: Save the original servo states

When first supporting CCD, it skips saving the original servo states
as some of the controls are not supported in CCD.
https://chromium-review.googlesource.com/344427

But then we customized what controls will be used according to the
servo board type.
https://chromium-review.googlesource.com/572142

So we should save original states again. It helps to restore the
original servo states if it gets interrupted in the middle.

BRANCH=none
BUG=none
TEST=Tried running flash_ec using servo-micro.

Change-Id: I5b873d871d36feed4a0e511ba858db9e093a22be
Signed-off-by: Wai-Hong Tam <waihong@google.com>
Reviewed-on: https://chromium-review.googlesource.com/1020158
Reviewed-by: Aseda Aboagye <aaboagye@chromium.org>
This commit is contained in:
Wai-Hong Tam
2018-04-19 12:24:10 -07:00
committed by chrome-bot
parent a51e6428d8
commit 2d5331b9a2

View File

@@ -1029,7 +1029,7 @@ info "Using ${SERVO_TYPE}."
IMG="$(ec_image)"
info "Using ${MCU} image : ${IMG}"
if ! on_raiden && [ "${NEED_SERVO}" != "no" ] ; then
if [ "${NEED_SERVO}" != "no" ] ; then
save="$(servo_save)"
fi