summaryrefslogtreecommitdiff
path: root/include/chipset.h
diff options
context:
space:
mode:
authorFurquan Shaikh <furquan@chromium.org>2017-02-07 17:02:35 -0800
committerchrome-bot <chrome-bot@chromium.org>2017-02-09 20:48:47 -0800
commit4ce529e25acd4683f7232dc627c72cb7f3f84d77 (patch)
tree2da1bbe28b8b102f3fc498bb4cac3128f6039de4 /include/chipset.h
parent11c0c9e86d9f52a71b6a252366ad0ec3f775f858 (diff)
downloadchrome-ec-4ce529e25acd4683f7232dc627c72cb7f3f84d77.tar.gz
chip/npcx/espi: Handle global reset events asserting eSPI_Reset#
In case there is a sudden power loss to PCH, then there are no eSPI VW messages sent from the PCH to EC indicating power state transition into S5. Instead, the eSPI compatibility spec defines such events as global reset events. For global reset events, eSPI_Reset# signal is asserted without SLP_SUS# being asserted. This acts as an indication to the EC that there was a global reset event. Add a callback chipset_handle_espi_reset_assert that takes any necessary action whenever eSPI_Reset# pin is asserted. On skylake, it would check if power button was being pressed and release the button. BUG=chrome-os-partner:62014 BRANCH=None TEST=Verified that apshutdown works as expected. Change-Id: I409afa0d00faca55ae3aa577743cedac58d4d877 Signed-off-by: Furquan Shaikh <furquan@chromium.org> Reviewed-on: https://chromium-review.googlesource.com/438935 Reviewed-by: Aaron Durbin <adurbin@chromium.org>
Diffstat (limited to 'include/chipset.h')
-rw-r--r--include/chipset.h6
1 files changed, 6 insertions, 0 deletions
diff --git a/include/chipset.h b/include/chipset.h
index ac50df0cc1..3113643e17 100644
--- a/include/chipset.h
+++ b/include/chipset.h
@@ -82,6 +82,11 @@ void chipset_reset(int cold_reset);
*/
void power_interrupt(enum gpio_signal signal);
+/**
+ * Handle assert of eSPI_Reset# pin.
+ */
+void chipset_handle_espi_reset_assert(void);
+
#else /* !HAS_TASK_CHIPSET */
/*
* Allow other modules to compile if the chipset module is disabled. This is
@@ -98,6 +103,7 @@ static inline void chipset_throttle_cpu(int throttle) { }
static inline void chipset_force_shutdown(void) { }
static inline void chipset_reset(int cold_reset) { }
static inline void power_interrupt(enum gpio_signal signal) { }
+static inline void chipset_handle_espi_reset_assert(void) { }
#endif /* !HAS_TASK_CHIPSET */