diff options
author | Furquan Shaikh <furquan@chromium.org> | 2017-10-30 19:09:22 -0700 |
---|---|---|
committer | chrome-bot <chrome-bot@chromium.org> | 2017-10-31 13:04:58 -0700 |
commit | 6f5ef069388fa5cdfb02aaf205d0a8e70f6b677a (patch) | |
tree | e4666e495d6a8443ebde2b3cce3df98cee1c8a50 /common/port80.c | |
parent | 7d66541b462a5b86ab051ce1a4ad5404496a991c (diff) | |
download | chrome-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.c | 7 |
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); |