faft: Make the ec_fake_rec_mode behavior apply to all chrome_ec devices
There is a recent change on verified boot that we change to use the EC host
event to get the recovery switch status:
https://gerrit.chromium.org/gerrit/27509
The servo rec_mode GPIO is no longer work on Chrome EC devices. So we
make the original ec_fake_rec_mode, i.e. setting the EC host event, apply
to all chrome_ec devices.
BUG=chrome-os-partner:10034;chrome-os-partner:12452
TEST=Run firmware_RecoveryMode on recent Link firmware to trigger recovery mode.
Change-Id: I556e231505760aea6dd0ebde74c645b762bd8e35
Reviewed-on: https://gerrit.chromium.org/gerrit/29984
Reviewed-by: Mike Truty <truty@chromium.org>
Commit-Ready: Tom Wai-Hong Tam <waihong@chromium.org>
Tested-by: Tom Wai-Hong Tam <waihong@chromium.org>
diff --git a/server/cros/faftsequence.py b/server/cros/faftsequence.py
index a213dbc..b34891b 100644
--- a/server/cros/faftsequence.py
+++ b/server/cros/faftsequence.py
@@ -779,7 +779,7 @@
if self._customized_rec_reboot_command:
logging.info('running the customized rec reboot command')
os.system(self._customized_rec_reboot_command)
- elif self.client_attr.ec_fake_rec_mode:
+ elif self.client_attr.chrome_ec:
self.send_uart_command("reboot hard ap-off")
time.sleep(self.EC_BOOT_DELAY)
self.send_uart_command("hostevent set 0x4000")
@@ -844,7 +844,7 @@
def disable_keyboard_dev_mode(self):
logging.info("Disabling keyboard controlled developer mode")
- if not self.client_attr.ec_fake_rec_mode:
+ if not self.client_attr.chrome_ec:
self.servo.disable_recovery_mode()
self.cold_reboot()
self.wait_for_client_offline()