From 449221a82b6bb789bcb279169a0daffcf0c57a1d Mon Sep 17 00:00:00 2001 From: Caveh Jalali Date: Wed, 7 Oct 2020 02:43:22 -0700 Subject: npcx: allow hibernate timeout when LCT is available The npcx9 supports LCT (long countdown timers). When enabled, hibernate can wake up using the LCT module. BRANCH=none BUG=b:144427579,b:165777478 TEST=verified error message is present on volteer but not on npcx9_evb binary. Signed-off-by: Caveh Jalali Change-Id: Id154153fa1a44b538bce1e3e752ea78b199befa6 Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2454985 Reviewed-by: CH Lin Reviewed-by: Abe Levkoy --- common/system.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/common/system.c b/common/system.c index 206f74181c..1f353d49a6 100644 --- a/common/system.c +++ b/common/system.c @@ -1071,7 +1071,8 @@ __maybe_unused static int command_hibernate(int argc, char **argv) microseconds = strtoi(argv[2], NULL, 0); if (seconds || microseconds) { - if (IS_ENABLED(CONFIG_HIBERNATE_PSL)) { + if (IS_ENABLED(CONFIG_HIBERNATE_PSL) && + !IS_ENABLED(NPCX_LCT_SUPPORT)) { ccprintf("Hibernating with timeout not supported " "when PSL is enabled.\n"); return EC_ERROR_INVAL; -- cgit v1.2.1