blob: a4f4fba1c27a3ffaa4db2456c6710d948564cdba [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
11 # Delay between passing firmware screen and text mode warning screen
12 legacy_text_screen = 20
13 # The developer screen timeouts fit our spec
14 dev_screen_timeout = 30
15 # Delay for waiting beep done
16 beep = 1
17 # Delay of loading the USB kernel
18 load_usb = 10
19 # Delay between USB plug-out and plug-in
20 between_usb_plug = 10
21 # Delay after running the 'sync' command
22 sync = 5
23 # Delay for waiting client to shutdown
24 shutdown = 30
25 # Delay for waiting client to return before sending EC reboot command
26 ec_reboot_cmd = 1
27 # Delay between EC boot and ChromeEC console functional
28 ec_boot_to_console = 0.5
29 # Delay between EC boot and pressing power button
30 ec_boot_to_pwr_button = 0.5
31 # Delay of EC software sync hash calculating time
32 software_sync = 6
33 # Duration of holding cold_reset to reset device
34 hold_cold_reset = 0.1
35 # devserver startup time
36 devserver = 10
37 # Delay of waiting factory install shim to reset TPM
38 install_shim_done = 120
Tom Wai-Hong Tam41738762012-10-29 14:32:39 +080039
40 def __init__(self, platform=None):
41 """Initialized.
42
43 Args:
44 platform: Optional, platform name returned by FAFT client. If not
45 given, use the default delay values.
46 """
Tom Wai-Hong Tam41738762012-10-29 14:32:39 +080047 if platform:
Vic Yangf1fdf712012-10-31 12:09:22 +080048 self._update_platform_delay(platform)
Tom Wai-Hong Tam41738762012-10-29 14:32:39 +080049
50
Vic Yangf1fdf712012-10-31 12:09:22 +080051 def _update_platform_delay(self, platform):
52 """Set platform dependent delay."""
Tom Wai-Hong Tam41738762012-10-29 14:32:39 +080053
54 # Add the platform-specific delay values here.
55
Vic Yangf1fdf712012-10-31 12:09:22 +080056 pass