blob: ab0bba89327c2b6aa053922ce10f8eaa2ab91c42 [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
Tom Wai-Hong Tam41738762012-10-29 14:32:39 +080041
42 def __init__(self, platform=None):
43 """Initialized.
44
45 Args:
46 platform: Optional, platform name returned by FAFT client. If not
47 given, use the default delay values.
48 """
Tom Wai-Hong Tam41738762012-10-29 14:32:39 +080049 if platform:
Vic Yangf1fdf712012-10-31 12:09:22 +080050 self._update_platform_delay(platform)
Tom Wai-Hong Tam41738762012-10-29 14:32:39 +080051
52
Vic Yangf1fdf712012-10-31 12:09:22 +080053 def _update_platform_delay(self, platform):
54 """Set platform dependent delay."""
Tom Wai-Hong Tam41738762012-10-29 14:32:39 +080055
56 # Add the platform-specific delay values here.
57
Vic Yangc79c3712012-10-31 13:37:06 +080058 if platform == 'Link':
59 self.firmware_screen = 7
60
Vic Yangf1fdf712012-10-31 12:09:22 +080061 pass