From 9d46eb75a2f9e7b1565247389314c83be65523e8 Mon Sep 17 00:00:00 2001 From: Randall Spangler Date: Thu, 24 May 2012 15:33:49 -0700 Subject: [PATCH] Enable brown-out reset This resets the EC when power falls below the brown-out threshold Signed-off-by: Randall Spangler BUG=chrome-os-partner:9952 TEST=hopefully srikanth can; requires hardware mods to test. Change-Id: I161e49003409cb68eb43303c3c8de0eb4cc27104 --- chip/lm4/registers.h | 1 + chip/lm4/system.c | 3 +++ 2 files changed, 4 insertions(+) diff --git a/chip/lm4/registers.h b/chip/lm4/registers.h index 357212cb36..23203a77d6 100644 --- a/chip/lm4/registers.h +++ b/chip/lm4/registers.h @@ -187,6 +187,7 @@ static inline int lm4_fan_addr(int ch, int offset) #define LM4_SYSTEM_DID0 LM4REG(0x400fe000) #define LM4_SYSTEM_DID1 LM4REG(0x400fe004) +#define LM4_SYSTEM_PBORCTL LM4REG(0x400fe030) #define LM4_SYSTEM_RIS LM4REG(0x400fe050) #define LM4_SYSTEM_MISC LM4REG(0x400fe058) #define LM4_SYSTEM_RESC LM4REG(0x400fe05c) diff --git a/chip/lm4/system.c b/chip/lm4/system.c index f4ac7bbb15..af6ac11add 100644 --- a/chip/lm4/system.c +++ b/chip/lm4/system.c @@ -144,6 +144,9 @@ int system_pre_init(void) ; } + /* Brown-outs should trigger a reset */ + LM4_SYSTEM_PBORCTL |= 0x02; + return EC_SUCCESS; }