summaryrefslogtreecommitdiff
path: root/include/watchdog.h
Commit message (Collapse)AuthorAgeFilesLines
* npcx: Ensure the watchdog isn't stopped while it is invalid to do soJett Rink2019-10-091-0/+7
| | | | | | | | | | | | | | | | | | | We cannot unlock the watchdog timer within 3 watch dog ticks of touching it per the datasheet. This is actually around 100ms so we should protect against this. Note: To avoid bringing in other dependencies into the npcx_monitor_fw, the "old" method of stopping the watchdog is used (no waiting first). BRANCH=none BUG=b:140207603 TEST=eliminates cold reset issue. Change-Id: I440d36fb9aecdd6d78bae6fc4002208198a3357f Signed-off-by: Jett Rink <jettrink@chromium.org> Signed-off-by: Tim Wawrzynczak <twawrzynczak@chromium.org> Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/1842592 Reviewed-by: ML Chao <mlchao@nuvoton.corp-partner.google.com>
* LICENSE: remove unnecessary (c) after CopyrightTom Hughes2019-06-191-1/+1
| | | | | | | | | | | | | | | | Ran the following command: git grep -l 'Copyright (c)' | \ xargs sed -i 's/Copyright (c)/Copyright/g' BRANCH=none BUG=none TEST=make buildall -j Change-Id: I6cc4a0f7e8b30d5b5f97d53c031c299f3e164ca7 Signed-off-by: Tom Hughes <tomhughes@chromium.org> Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/1663262 Reviewed-by: Daisuke Nojiri <dnojiri@chromium.org> Reviewed-by: Aseda Aboagye <aaboagye@chromium.org>
* Include "config.h" in include/watchdog.h.Jeff Andersen2017-03-101-0/+2
| | | | | | | | | | | | | | | | | Without this include, the `watchdog_reload()` function will be compiled as a noop unless "config.h" is included before "watchdog.h" in whatever compilation unit requires watchdog functionality. BUG=none BRANCH=none TEST=make buildall -j Change-Id: I311019753f6d61890be1e475664bd528e5250729 Reviewed-on: https://chromium-review.googlesource.com/449694 Commit-Ready: Jeff Andersen <jeffandersen@google.com> Tested-by: Jeff Andersen <jeffandersen@google.com> Reviewed-by: Vadim Bendebury <vbendeb@chromium.org> Reviewed-by: Vincent Palatin <vpalatin@chromium.org>
* Include <stdint.h> in include/watchdog.h.Jeff Andersen2017-03-021-0/+2
| | | | | | | | | | | | | | | | Previously, the int types used in the watchdog_trace() function signature were not being included properly. BUG=none BRANCH=none TEST=make buildall -j Change-Id: Ib4666285c314cbdb101e3ba602e4f27540a1346c Reviewed-on: https://chromium-review.googlesource.com/448345 Commit-Ready: Jeff Andersen <jeffandersen@google.com> Tested-by: Jeff Andersen <jeffandersen@google.com> Reviewed-by: Carl Hamilton <carlh@chromium.org> Reviewed-by: Vadim Bendebury <vbendeb@chromium.org>
* zinger: change watchdog timeout to 1.8 secondAlec Berg2014-06-171-3/+0
| | | | | | | | | | | | | | | | | | | | | Increase watchdog timeout to 1.8 second. The pd_task can delay up to 1.5 seconds, so the watchdog must be at least that value. On Zinger, the new timeout period will be 2 seconds with LSI clock at 50kHz and 3.36 seconds with LSI clock at 30kHz. Note: the LSI frequency range is tighter on STM32F0 and cannot go up to 56kHz. BUG=none BRANCH=none TEST=add 1.5 second blocking delay to pd_task and make sure watchdog is normally not firing. Change-Id: I444639ccacd3452181a5fb6caab8e5df7ef3c847 Signed-off-by: Alec Berg <alecaberg@chromium.org> Reviewed-on: https://chromium-review.googlesource.com/204333 Reviewed-by: Vincent Palatin <vpalatin@chromium.org> Commit-Queue: Vincent Palatin <vpalatin@chromium.org> Tested-by: Vincent Palatin <vpalatin@chromium.org>
* ite: Watchdog module addedAlec Berg2014-01-151-0/+6
| | | | | | | | | | | | | | | | | Watchdog module added. Off by default because of following limitations: - When programming, the WD fires, and programming fails. For now, you have to program twice. BRANCH=none BUG=chrome-os-partner:23575 TEST=Manually wrote in a while(1); and made sure watchdog warning triggers first, prints IPC register, and then soon after the watchdog timer resets the chip. Signed-off-by: Alec Berg <alecaberg@chromium.org> Change-Id: Ia83f58f3ae108f755d2f139ada22a22e2fbdc2fa Reviewed-on: https://chromium-review.googlesource.com/177397 Reviewed-by: Vincent Palatin <vpalatin@chromium.org>
* Define watchdog_reload() to nothing if not CONFIG_WATCHDOGRandall Spangler2013-06-101-0/+4
| | | | | | | | | | | | | | | | | | | Currently, we need to have #ifdefs everywhere watchdog_reload() is called. With this fix we don't. Also don't bother including unused hardware timer watchdog code if the watchdog isn't defined. No change when CONFIG_WATCHDOG is defined (which it is for all normal builds). BUG=chrome-os-partner:20056 BRANCH=none TEST=build all platforms with CONFIG_WATCHDOG commented out in config.h Change-Id: Id3ce33af1a497eda127a4892e13651d9d2534d92 Signed-off-by: Randall Spangler <rspangler@chromium.org> Reviewed-on: https://gerrit.chromium.org/gerrit/58094 Reviewed-by: Simon Glass <sjg@chromium.org>
* Watchdog is reloaded by HOOK_TICK, not its own taskRandall Spangler2012-10-301-8/+7
| | | | | | | | | | | | | This reduces memory footprint. BUG=chrome-os-partner:15714 BRANCH=none TEST=system still boots; 'waitms 1500' prints watchdog error dump Change-Id: Ieb0248a34655514b03d919cc36c2b369691da716 Signed-off-by: Randall Spangler <rspangler@chromium.org> Reviewed-on: https://gerrit.chromium.org/gerrit/36937 Reviewed-by: Simon Glass <sjg@chromium.org>
* Move watchdog_trace() into the generic watchdog fileSimon Glass2012-06-151-0/+12
| | | | | | | | | | | | | | | | | We want this function to be available for all chips, so move it into a generic place. The task_disable_irq() from the LM4 version can be left in watchdog_check(), to keep the watchdog_trace() function generic. BUG=chrome-os-partner:10145 TEST=build for all boards Change-Id: I98c60ce5958f1498b84a233ef04290a68a7838c5 Signed-off-by: Simon Glass <sjg@chromium.org> Reviewed-on: https://gerrit.chromium.org/gerrit/24397 Reviewed-by: Randall Spangler <rspangler@chromium.org> Reviewed-by: Vincent Palatin <vpalatin@chromium.org>
* Unify the watchdog API over stm32 and lm4Simon Glass2012-06-051-1/+9
| | | | | | | | | | | | | | | | Use the same prototype for watchdog_init() everywhere. One version takes a parameters and one doesn't. We don't need the parameter since we have a #define. Tidy this up. Also move watchdog defines into watchdog.h. BUG=chrome-os-partner:10145 TEST=build for all boards Change-Id: I38ae63d7cc137b93017c850e767703d5f90f56ad Signed-off-by: Simon Glass <sjg@chromium.org> Reviewed-on: https://gerrit.chromium.org/gerrit/24394 Reviewed-by: Randall Spangler <rspangler@chromium.org>
* Add hooks module so modules can be notified of system-level events.Randall Spangler2012-04-191-3/+0
| | | | | | | | | | | | This will be used for sleep/wake/sysjump/etc. For now it's just wired up to clock frequency changing. Signed-off-by: Randall Spangler <rspangler@chromium.org> BUG=none TEST=manual: use nopll command, should still work Change-Id: Iedcea5830bc18eacfd955c29b8f793aba8905dd8
* Support dynamically changing the system clockRandall Spangler2012-04-091-10/+10
| | | | | | | | | | | | | | | | | | | | | | | Add nopll command to turn off the PLL, reducing the system clock to 16Mhz. Signed-off-by: Randall Spangler <rspangler@chromium.org> BUG=chrome-os-partner:8798 TEST=manual boot system press power button to boot x86 temps // should print all temperatures timerinfo timerinfo timerinfo // convince yourself this is counting up at about 1MHz nopll // this drops the system clock to 16MHz temps // should still print all temperatures timerinfo timerinfo timerinfo // should still be counting up at about 1MHz Change-Id: Ie29ceb17af348148bffadf63d60c1b731f4c3f6d
* Move SoC-independant headers to another directoryVincent Palatin2012-01-261-0/+21
Preparatory work to introduce a second SoC : 2nd series 1/4 The atomic operations are SoC independant since they are only using LDREX/STREX instructions which are just core specific ARMv7-M). The watchdog header defines the API which is common to all platforms. Signed-off-by: Vincent Palatin <vpalatin@chromium.org> BUG=None TEST=run EC firmware on BDS and check a few console commands