summaryrefslogtreecommitdiff
path: root/common/port80.c
diff options
context:
space:
mode:
authorFurquan Shaikh <furquan@chromium.org>2017-10-30 19:09:22 -0700
committerchrome-bot <chrome-bot@chromium.org>2017-10-31 13:04:58 -0700
commit6f5ef069388fa5cdfb02aaf205d0a8e70f6b677a (patch)
treee4666e495d6a8443ebde2b3cce3df98cee1c8a50 /common/port80.c
parent7d66541b462a5b86ab051ce1a4ad5404496a991c (diff)
downloadchrome-ec-6f5ef069388fa5cdfb02aaf205d0a8e70f6b677a.tar.gz
port80: Provide default routine for logging port80 resume
Add a common hook handler on CHIPSET_RESUME to log port80 resume message instead of duplicating the same code in all chip lpc_resume. BUG=b:68669668 BRANCH=None TEST=Verified that port80 resume is logged on S0ix and S3 resume. Change-Id: I313692f5499717d0d8f62be2ba3b8566c46e4dde Signed-off-by: Furquan Shaikh <furquan@chromium.org> Reviewed-on: https://chromium-review.googlesource.com/745362 Reviewed-by: Aaron Durbin <adurbin@chromium.org>
Diffstat (limited to 'common/port80.c')
-rw-r--r--common/port80.c7
1 files changed, 7 insertions, 0 deletions
diff --git a/common/port80.c b/common/port80.c
index b82a4d4b5b..537623e339 100644
--- a/common/port80.c
+++ b/common/port80.c
@@ -196,3 +196,10 @@ int port80_command_read(struct host_cmd_handler_args *args)
DECLARE_HOST_COMMAND(EC_CMD_PORT80_READ,
port80_command_read,
EC_VER_MASK(0) | EC_VER_MASK(1));
+
+static void port80_log_resume(void)
+{
+ /* Store port 80 event so we know where resume happened */
+ port_80_write(PORT_80_EVENT_RESUME);
+}
+DECLARE_HOOK(HOOK_CHIPSET_RESUME, port80_log_resume, HOOK_PRIO_DEFAULT);