diff options
author | Divya Jyothi <divya.jyothi@intel.com> | 2015-07-08 00:14:02 -0700 |
---|---|---|
committer | ChromeOS Commit Bot <chromeos-commit-bot@chromium.org> | 2015-07-13 23:27:08 +0000 |
commit | 56c5a9649625ce0d2d9d26947d85c78ab49165f1 (patch) | |
tree | 31057eb77a5318ec7b6683ef905444f4198adc6d /chip/mec1322/registers.h | |
parent | fbc84dc56566f31d897b420232088ba341810ea2 (diff) | |
download | chrome-ec-56c5a9649625ce0d2d9d26947d85c78ab49165f1.tar.gz |
mec1322: Fix reset cause detection
Mec1322 cannot distinguish between Power-on and reset condition.
MEC1322_EC_WDT_CNT was used to determine the power-on condition.
VBAT_POR cannot not be used to distinguish no battery condition.
All of the feautures that need support need to determine VCC1_REST
which is used for reset considion. lfw and main code use the same
condition.
When VCC1_RESET is asserted we need to set the image type to
RO image for sysjump to work correctly. This in turn will affect
Recovery mode,software sync and Flashrom. All of these conditions
were tested with this patch.
BUG=chrome-os-partner:40526
TEST=Recovery mode,Software Sync,Flashrom
BRANCH=None
Change-Id: I65f2aa9f56863597116b875ea436d4413887b92b
Signed-off-by: Divya Jyothi <divya.jyothi@intel.com>
Reviewed-on: https://chromium-review.googlesource.com/283605
Reviewed-by: Shawn N <shawnn@chromium.org>
Diffstat (limited to 'chip/mec1322/registers.h')
-rw-r--r-- | chip/mec1322/registers.h | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/chip/mec1322/registers.h b/chip/mec1322/registers.h index d31b66584b..d1d88d20ac 100644 --- a/chip/mec1322/registers.h +++ b/chip/mec1322/registers.h @@ -133,6 +133,9 @@ static inline uintptr_t gpio_port_base(int port_id) #define MEC1322_VBAT_CE REG32(MEC1322_VBAT_BASE + 0x8) #define MEC1322_VBAT_RAM(x) REG32(MEC1322_VBAT_BASE + 0x400 + 4 * (x)) +/* Bit definition for MEC1322_VBAT_STS */ +#define MEC1322_VBAT_STS_WDT (1 << 5) + /* Miscellaneous firmware control fields * scratch pad index cannot be more than 16 as * mec has 64 bytes = 16 indexes of scratchpad RAM |