summaryrefslogtreecommitdiff
path: root/chip/ish/aontaskfw
diff options
context:
space:
mode:
authorJack Rosenthal <jrosenth@chromium.org>2019-06-24 13:28:46 -0600
committerCommit Bot <commit-bot@chromium.org>2019-06-27 17:08:11 +0000
commit93b7637e6925ee2a58c3666e60d428749eb4eadf (patch)
treed33a685d933b8a2fce0c779e6b68c6dd283f6281 /chip/ish/aontaskfw
parent999ae1369da8c71e6f4fdcfe03496862a403f98a (diff)
downloadchrome-ec-93b7637e6925ee2a58c3666e60d428749eb4eadf.tar.gz
ish: commit persistent data during d3 entry
Refactor D3 entry to use ish_pm_reset, as it performs the same operations modulo the pm_state, save persistent data when entering D3. BUG=b:134089952 BRANCH=none TEST=rmmod ish modules, insmod again on arcada Change-Id: Ifed49d49d42b55cd220ff5d8e8d98843d28dfa22 Signed-off-by: Jack Rosenthal <jrosenth@chromium.org> Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/1674470 Reviewed-by: Hebo Hu <hebo.hu@intel.corp-partner.google.com> Reviewed-by: Jett Rink <jettrink@chromium.org> Reviewed-by: Denis Brockus <dbrockus@chromium.org>
Diffstat (limited to 'chip/ish/aontaskfw')
-rw-r--r--chip/ish/aontaskfw/ish_aon_share.h3
-rw-r--r--chip/ish/aontaskfw/ish_aontask.c4
2 files changed, 4 insertions, 3 deletions
diff --git a/chip/ish/aontaskfw/ish_aon_share.h b/chip/ish/aontaskfw/ish_aon_share.h
index c8664165ea..e804bd72e8 100644
--- a/chip/ish/aontaskfw/ish_aon_share.h
+++ b/chip/ish/aontaskfw/ish_aon_share.h
@@ -8,6 +8,7 @@
#include "common.h"
#include "ia_structs.h"
+#include "power_mgt.h"
/* magic ID for valid aontask image sanity check */
#define AON_MAGIC_ID 0x544E4F41 /*"AONT"*/
@@ -33,7 +34,7 @@ struct ish_aon_share {
/* aontask's LDT's limit size */
uint32_t aon_ldt_size;
/* current power state, see chip/ish/power_mgt.h */
- int pm_state;
+ enum ish_pm_state pm_state;
/* for store/restore main FW's IDT */
struct idt_header main_fw_idt_hdr;
diff --git a/chip/ish/aontaskfw/ish_aontask.c b/chip/ish/aontaskfw/ish_aontask.c
index bc8b2f6084..2f548a3aa2 100644
--- a/chip/ish/aontaskfw/ish_aontask.c
+++ b/chip/ish/aontaskfw/ish_aontask.c
@@ -76,7 +76,7 @@
#define AON_IDT_ENTRY_VEC_LAST ISH_PMU_WAKEUP_VEC
#endif
-static void handle_reset(int pm_state);
+static void handle_reset(enum ish_pm_state pm_state);
/* ISR for PMU wakeup interrupt */
static void pmu_wakeup_isr(void)
@@ -540,7 +540,7 @@ static void handle_d3(void)
handle_reset(ISH_PM_STATE_RESET);
}
-static void handle_reset(int pm_state)
+static void handle_reset(enum ish_pm_state pm_state)
{
/* disable watch dog */
WDT_CONTROL &= ~WDT_CONTROL_ENABLE_BIT;