diff options
author | Simon Glass <sjg@chromium.org> | 2021-01-21 10:57:32 -0700 |
---|---|---|
committer | Commit Bot <commit-bot@chromium.org> | 2021-01-22 22:53:15 +0000 |
commit | fcadc1fba2352a8ce904d3b575d0136f6c2e5796 (patch) | |
tree | f8617fd2151bd5383708fee0b226c591a6a3e964 /common | |
parent | 78acb0eeac7e3e42dae13f907440d92d3e6c1aac (diff) | |
download | chrome-ec-fcadc1fba2352a8ce904d3b575d0136f6c2e5796.tar.gz |
zephyr: Add support for CMD_AP_RESET_LOG
Add the options for this along with the the host command that presses it
into service.
BUG=b:178104134
BRANCH=none
TEST=build for zephyr
See that host command 121 is processed without error now:
21-01-21 12:14:50.829 [7.981900 HC 0x121]
Signed-off-by: Simon Glass <sjg@chromium.org>
Change-Id: I63b8586a6e2065cbfba8de81d3690cd2f7082c9a
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2643617
Reviewed-by: Jack Rosenthal <jrosenth@chromium.org>
Diffstat (limited to 'common')
-rw-r--r-- | common/chipset.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/common/chipset.c b/common/chipset.c index 209334add5..d53a8157a7 100644 --- a/common/chipset.c +++ b/common/chipset.c @@ -60,7 +60,7 @@ DECLARE_HOST_COMMAND(EC_CMD_AP_RESET, #endif #ifdef CONFIG_CMD_AP_RESET_LOG -static struct mutex reset_log_mutex; +static mutex_t reset_log_mutex; static int next_reset_log __preserved_logs(next_reset_log); static uint32_t ap_resets_since_ec_boot; /* keep reset_logs size a power of 2 */ @@ -83,6 +83,9 @@ void init_reset_log(void) next_reset_log = 0; memset(&reset_logs, 0, sizeof(reset_logs)); } +#ifdef CONFIG_ZEPHYR + (void)k_mutex_init(&reset_log_mutex); +#endif } void report_ap_reset(enum chipset_shutdown_reason reason) |