summaryrefslogtreecommitdiff
path: root/drivers/watchdog/imx_watchdog.c
Commit message (Collapse)AuthorAgeLines
* imx_watchdog: Do not assert WDOG_B on watchdog initRoss Parker2016-10-04-1/+1
| | | | | | | | Currently the driver asserts WDOG_B by clearing WCR_WDA bit when enabling the watchdog. Do not clear WCR_WDA. Signed-off-by: Ross Parker <rossjparker@gmail.com> Cc: Stefano Babic <sbabic@denx.de>
* imx_watchdog: add weak attribute to reset_cpu functionStefan Agner2016-07-19-1/+1
| | | | | | | This allows to overwrite reset_cpu function in case a board level reset is preferred (e.g. through PMIC). Signed-off-by: Stefan Agner <stefan.agner@toradex.com>
* imx_watchdog: always set minimal timeout in reset_cpuAndrey Skvortsov2016-01-07-1/+1
| | | | | | | | | The problem is that timeout bits in WCR register were leaved unchanged. So previously set timeout value was applied and therefore 'reset' command takes any value up to two minutes, depending on previous watchdog settings, instead of minimal 0.5 seconds. Signed-off-by: Andrey Skvortsov <andrej.skvortzov@gmail.com>
* imx_watchdog: Add a header file for watchdog registersFabio Estevam2015-10-12-13/+1
| | | | | | | | | Create fsl_wdog.h to store the watchdog registers and bit fields. This can be useful when accesses to the watchdog block are made from other parts, such as arch/arm/ cpu code. Signed-off-by: Fabio Estevam <fabio.estevam@freescale.com>
* imx: wdog: correct wcr register settingsPeng Fan2015-09-20-1/+2
| | | | | | | | | | | | | We should not simple use "writew(WCR_WDE, &wdog->wcr)" to set wcr, since this will override bits set before reset_cpu. Use clrsetbits_le16 instead of writew to fix this issue. Signed-off-by: Peng Fan <Peng.Fan@freescale.com> Cc: Stefano Babic <sbabic@denx.de> Cc: Fabio Estevam <fabio.estevam@freescale.com> Cc: Sebastian Siewior <bigeasy@linutronix.de> Tested-by: Fabio Estevam <fabio.estevam@freescale.com>
* watchdog/imx_watchdog: do not set WCR_WDWSebastian Siewior2015-03-25-2/+1
| | | | | | | | | | | | | | with WCR_WDW set, the watchdog won't trigger if we bootet linux and idle around while the watchdog is not triggered. It seems the timer makes progress very slowly if at all. I managed to remain 20minutes alive while the timeout was set to 60secs. It reboots within 60secs if I start a busyloop in userland (something like "while (1) { }"). While I don't see a reason why the WDT should not be running while the CPU is in idle, I'm dropping this bit. Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de> Acked-by: Stefano Babic <sbabic@denx.de>
* imx_watchdog: do not soft-reset while watchdog initAnatolij Gustschin2013-10-31-1/+2
| | | | | | | | Currently the driver clears WCR_SRS bit when enabling the watchdog and this causes a software reset. Do not clear WCR_SRS. Signed-off-by: Anatolij Gustschin <agust@denx.de>
* mx31/mx35/mx51/mx53/mx6: add watchdogTroy Kisky2013-01-13-0/+66
Use a common watchdog driver for all these cpus. Signed-off-by: Troy Kisky <troy.kisky@boundarydevices.com> Acked-by: Stefano Babic <sbabic@denx.de>