npcx: set and clear wake masks in S0 <-> S0ix transitions
npcx: set and clear wake masks in S0 <-> S0ix transitions

In the S0 <-> S3 transition, Coreboot sends EC messages to set/clear
the wake masks when the SMI is invoked. For S0ix, EC sets and clears
the wake mask via this patch.

These functions are directly invoked from the state machine transition
states. During S0ix entry, the wake mask for lid open is enabled.
During S0ix exit, the wake mask for lid open is cleared. All pending
events are also cleared.

BRANCH=none
BUG=chrome-os-partner:58740
TEST=test lidopen in S0ix

Change-Id: I398fdba2b9bba1f6caef46f8dc71c7de3b669d08
Signed-off-by: Archana Patni <41ae10a59316ee0595374b540cf8e1108afaed3a@intel.com>
Signed-off-by: Subramony Sesha <d1a9f30762802c72f0f615cdffe1157dbe58a2b3@intel.com>
Reviewed-on: https://chromium-review.googlesource.com/401070
Commit-Ready: Vijay P Hiremath <006c712879a3af08bfdb5c2b8491a8b2d5fd73cd@intel.com>
Reviewed-by: Mulin Chao <6bbc5af053a1dfdc363be6857f30de4ac3bcbd16@nuvoton.com>
Reviewed-by: Furquan Shaikh <6be5c96c464778f89679b1062a2e0a6af93d2aa5@chromium.org>

coreboot/chrome-ec,coreboot/chrome-ec,coreboot/chrome-ec,coreboot/chrome-ec,coreboot/chrome-ec,coreboot/chrome-ec