summaryrefslogtreecommitdiff
path: root/include/port80.h
diff options
context:
space:
mode:
authorRandall Spangler <rspangler@chromium.org>2012-08-07 10:32:16 -0700
committerGerrit <chrome-bot@google.com>2012-08-07 12:05:30 -0700
commit80e36e02549dc3bb121aee1619760198b706c406 (patch)
tree2879a37758ab994e355df50cd7f4a05d74baba8f /include/port80.h
parentb383d4c6b8218300c14c6f853853cc09ea761c9d (diff)
downloadchrome-ec-80e36e02549dc3bb121aee1619760198b706c406.tar.gz
Enhance port 80 logging
- 'port80 intprint' toggles printing port 80 codes in interrupt handler (turning that off speeds up port 80 capture a bit, if you're sending port 80 codes very rapidly) - 'port80 flush' flushes the log buffer - log buffer expanded to 256 entries - log buffer tracks S3->S0 power state transitions, so you can tell where each boot starts This uses ~500 bytes more RAM on the EC, but we've got piles of RAM (with this change we're using 17KB out of 32KB). BUG=none TEST=manual - boot system - port80 -> prints data - port80 intprint -> now disabled - reboot; wait for reboot; no port80 debug output during boot - port80 -> prints data from previous boot AND this one - port80 flush - port80 -> nothing in log Change-Id: I64ee72fb13ab0fdd85d04b9640b5390fdac31400 Signed-off-by: Randall Spangler <rspangler@chromium.org> Reviewed-on: https://gerrit.chromium.org/gerrit/29420 Reviewed-by: Bill Richardson <wfrichar@chromium.org> Reviewed-by: Duncan Laurie <dlaurie@chromium.org>
Diffstat (limited to 'include/port80.h')
-rw-r--r--include/port80.h10
1 files changed, 9 insertions, 1 deletions
diff --git a/include/port80.h b/include/port80.h
index 787af8c169..0d251d1d1f 100644
--- a/include/port80.h
+++ b/include/port80.h
@@ -10,7 +10,15 @@
#include "common.h"
-/* Called by LPC module when a byte of data is written to port 80. */
+enum port_80_event {
+ PORT_80_EVENT_RESUME = 0x1001, /* S3->S0 transition */
+};
+
+/**
+ * Store data from a LPC write to port 80, or a port_80_event code.
+ *
+ * @param data Data written to port 80.
+ */
void port_80_write(int data);
#endif /* __CROS_EC_PORT80_H */