summaryrefslogtreecommitdiff
path: root/common/main.c
diff options
context:
space:
mode:
authorBill Richardson <wfrichar@chromium.org>2014-06-04 11:07:30 -0700
committerchrome-internal-fetch <chrome-internal-fetch@google.com>2014-06-05 01:36:44 +0000
commit565f1cb5ae1ebd287e1bf00ab8245274a5ecbaa6 (patch)
treee59d9553de268a1c4a665313d866b881467f480b /common/main.c
parent1732ba691e7cafc83f25ce23eef61c9c98794de1 (diff)
downloadchrome-ec-565f1cb5ae1ebd287e1bf00ab8245274a5ecbaa6.tar.gz
Add CONFIG_BRINGUP option to help debug signals for bringup
When this option is configured, two changes take place. First, the AP doesn't power on by default when the EC reboots. To boot it, you can run the "powerbtn" command, or poke the power button manually, or any of the normal things. Second, we watch for power-related signal changes (anything that's connected to the power_signal_interrupt() function) and keep track of them as they happen. After a second with no further changes, we print the time and value of each change. For example: [19.939212 Port 80: 0x29] [19.967971 HC 0x23] [19.976236 Port 80: 0x3a] [19.995700 HC 0x87] [20.567884 Port 80: 0x73] 11 signal changes: 19.638241 +0.000000 PCH_SLP_SUS_L => 1 19.654378 +0.016137 PCH_SLP_S5_L => 1 19.654457 +0.000079 PCH_SLP_A_L => 1 19.654535 +0.000078 PCH_SLP_S3_L => 1 19.654587 +0.000052 PCH_SLP_S4_L => 1 19.659630 +0.005043 PGOOD_1_5V_DDR => 1 19.663199 +0.003569 PGOOD_1_5V_PCH => 1 19.664751 +0.001552 PGOOD_1_8VS => 1 19.668735 +0.003984 PGOOD_VCCP => 1 19.671883 +0.003148 PGOOD_VCCSA => 1 19.868406 +0.196523 PGOOD_CPU_CORE => 1 [21.908551 Port 80: 0xf0] [21.908855 HC 0x48] BUG=none BRANCH=ToT TEST=manual Build with CONFIG_BRINGUP, notice those two changes. Change-Id: I55fd2021a0eae7dbfd1aaf5d93971f65bf2367b9 Signed-off-by: Bill Richardson <wfrichar@chromium.org> Reviewed-on: https://chromium-review.googlesource.com/202574 Reviewed-by: Duncan Laurie <dlaurie@chromium.org>
Diffstat (limited to 'common/main.c')
-rw-r--r--common/main.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/common/main.c b/common/main.c
index e60a57f6bc..269781f9f6 100644
--- a/common/main.c
+++ b/common/main.c
@@ -111,6 +111,10 @@ test_mockable int main(void)
CPRINTF("[Image: %s, %s]\n",
system_get_image_copy_string(), system_get_build_info());
+#ifdef CONFIG_BRINGUP
+ ccprintf("\n\nWARNING: BRINGUP BUILD\n\n\n");
+#endif
+
#ifdef CONFIG_WATCHDOG
/*
* Intialize watchdog timer. All lengthy operations between now and