diff options
author | Jack Rosenthal <jrosenth@chromium.org> | 2019-05-29 15:51:48 -0600 |
---|---|---|
committer | Jack Rosenthal <jrosenth@chromium.org> | 2019-06-06 19:55:40 +0000 |
commit | c723e723392aabc35747a6678b4b7931d7aeddb7 (patch) | |
tree | 2ebdd22275c369d0580641ddb23b8e782ff0b91a /chip/ish/power_mgt.h | |
parent | e12b71b1fe82af7bc804004147f33da5e29cced1 (diff) | |
download | chrome-ec-c723e723392aabc35747a6678b4b7931d7aeddb7.tar.gz |
ish: use magic number to verify persistent data
Move persistent data definitions to a structure and have linker script
define the address of the symbol into the AON ROM (persistent data
storage). Use the magic number "ISHd" to verify persistent data
storage and copy to static memory when valid. Commit changes from the
local copy during reset.
BUG=b:133779707,b:133647823,b:132059981
BRANCH=none
TEST=power-on is only reset flag under cold reset, panic data
persists, watchdog reset produces correct reset flags, UART always
printing system info on boot
Change-Id: I65a458cc2656f8fe26361ef2117ceb5439edff6c
Signed-off-by: Jack Rosenthal <jrosenth@chromium.org>
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/1636293
Legacy-Commit-Queue: Commit Bot <commit-bot@chromium.org>
Diffstat (limited to 'chip/ish/power_mgt.h')
-rw-r--r-- | chip/ish/power_mgt.h | 14 |
1 files changed, 9 insertions, 5 deletions
diff --git a/chip/ish/power_mgt.h b/chip/ish/power_mgt.h index d592928744..bd2e707cb4 100644 --- a/chip/ish/power_mgt.h +++ b/chip/ish/power_mgt.h @@ -6,6 +6,8 @@ #ifndef __CROS_EC_POWER_MGT_H #define __CROS_EC_POWER_MGT_H +#include "registers.h" + /* power states for ISH */ enum { /* D0 state: active mode */ @@ -57,12 +59,14 @@ static inline void ish_mia_reset(void) __builtin_unreachable(); } - -/** - * ish low power management initialization, - * should be called at system init stage before RTOS task scheduling start - */ +/* Initialize power management module. */ +#ifdef CONFIG_LOW_POWER_IDLE void ish_pm_init(void); +#else +__maybe_unused static void ish_pm_init(void) +{ +} +#endif /** * reset ISH (reset minute-ia cpu core, and power off main SRAM) |