diff options
author | Andrey Petrov <andrey.petrov@intel.com> | 2015-06-25 18:50:35 -0700 |
---|---|---|
committer | ChromeOS Commit Bot <chromeos-commit-bot@chromium.org> | 2015-07-01 03:49:04 +0000 |
commit | e3c72ce5c1fcc48809b06aa2b6c0e4be8f860172 (patch) | |
tree | ceab3deef32c6221821f2dbce79f82dadadab2bf | |
parent | b4c205bf51cfebeac1ddc7617dba24d8111bc9ed (diff) | |
download | chrome-ec-e3c72ce5c1fcc48809b06aa2b6c0e4be8f860172.tar.gz |
mec1322: reload watchdog on LFW entry
When RO/RW sysjump is made watchdog is not disabled. Since LFW needs to
load firmware image into SRAM over SPI, there is a certain chance watchdog
counter will fire in the middle of it.
BRANCH=None
BUG=chrome-os-partner:38103
TEST=on Cyan, run hundreds of flashrom cycles and make sure there is no
watchdog reset
Change-Id: Idafcc6a1c9fb35f04be398a68e3ec05bb2b1425d
Signed-off-by: Andrey Petrov <andrey.petrov@intel.com>
Reviewed-on: https://chromium-review.googlesource.com/282112
Reviewed-by: Shawn N <shawnn@chromium.org>
Commit-Queue: Bernie Thompson <bhthompson@chromium.org>
Tested-by: Bernie Thompson <bhthompson@chromium.org>
-rw-r--r-- | chip/mec1322/lfw/ec_lfw.c | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/chip/mec1322/lfw/ec_lfw.c b/chip/mec1322/lfw/ec_lfw.c index 0f6d4d70c2..997e41aa0b 100644 --- a/chip/mec1322/lfw/ec_lfw.c +++ b/chip/mec1322/lfw/ec_lfw.c @@ -225,6 +225,15 @@ void lfw_main() /* install vector table */ *((uintptr_t *) 0xe000ed08) = (uintptr_t) &hdr_int_vect; +#ifdef CONFIG_WATCHDOG + /* Reload watchdog which may be running in case of sysjump */ + MEC1322_WDG_KICK = 1; +#ifdef CONFIG_WATCHDOG_HELP + /* Stop aux timer */ + MEC1322_TMR16_CTL(0) &= ~1; +#endif +#endif + timer_init(); clock_init(); cpu_init(); |