blob: e3f1278821643d71532e39f589b39c88645e3a86 [file] [log] [blame]
Tom Wai-Hong Tam41738762012-10-29 14:32:39 +08001# Copyright (c) 2012 The Chromium OS Authors. All rights reserved.
2# Use of this source code is governed by a BSD-style license that can be
3# found in the LICENSE file.
4
5class FAFTDelayConstants(object):
6 """Class that contains the delay constants for FAFT."""
7 version = 1
8
Vic Yangf1fdf712012-10-31 12:09:22 +08009 # Delay between power-on and firmware screen
10 firmware_screen = 10
Vic Yang0dc84b82012-10-31 12:29:39 +080011 # Delay between keypresses in firmware screen
12 confirm_screen = 3
Vic Yangf1fdf712012-10-31 12:09:22 +080013 # Delay between passing firmware screen and text mode warning screen
14 legacy_text_screen = 20
15 # The developer screen timeouts fit our spec
16 dev_screen_timeout = 30
17 # Delay for waiting beep done
18 beep = 1
19 # Delay of loading the USB kernel
20 load_usb = 10
21 # Delay between USB plug-out and plug-in
22 between_usb_plug = 10
23 # Delay after running the 'sync' command
24 sync = 5
25 # Delay for waiting client to shutdown
26 shutdown = 30
27 # Delay for waiting client to return before sending EC reboot command
28 ec_reboot_cmd = 1
29 # Delay between EC boot and ChromeEC console functional
30 ec_boot_to_console = 0.5
31 # Delay between EC boot and pressing power button
32 ec_boot_to_pwr_button = 0.5
33 # Delay of EC software sync hash calculating time
34 software_sync = 6
35 # Duration of holding cold_reset to reset device
36 hold_cold_reset = 0.1
37 # devserver startup time
38 devserver = 10
39 # Delay of waiting factory install shim to reset TPM
40 install_shim_done = 120
Gediminas Ramanauskasba352ad2012-11-09 09:43:32 -080041 # Delay for user to power cycle the device
42 user_power_cycle = 20
Tom Wai-Hong Tam41738762012-10-29 14:32:39 +080043
44 def __init__(self, platform=None):
45 """Initialized.
46
47 Args:
48 platform: Optional, platform name returned by FAFT client. If not
49 given, use the default delay values.
50 """
Tom Wai-Hong Tam41738762012-10-29 14:32:39 +080051 if platform:
Vic Yangf1fdf712012-10-31 12:09:22 +080052 self._update_platform_delay(platform)
Tom Wai-Hong Tam41738762012-10-29 14:32:39 +080053
54
Vic Yangf1fdf712012-10-31 12:09:22 +080055 def _update_platform_delay(self, platform):
56 """Set platform dependent delay."""
Tom Wai-Hong Tam41738762012-10-29 14:32:39 +080057
58 # Add the platform-specific delay values here.
59
Vic Yangc79c3712012-10-31 13:37:06 +080060 if platform == 'Link':
61 self.firmware_screen = 7