08 Jan, 2021
1 commit
-
Default reset_cpu in imx_watchdog driver is clearing the WDA bit
to assert WDOG_B output. However, this requires the iomuxc for the WDOG_B
is configured by board codes or DTS. Without it, next external reset
with WDOG_B iomuxc configured will not work.On iMX6, we always use internal reset to support some features like bmode.
So the iomuxc for WDOG_B never be set. Change back the reset_cpu to use
internal reset.Signed-off-by: Ye Li
Reviewed-by: Peng Fan
(cherry picked from commit aa97f1de484a165212cec56bd8ed38227c8f828a)
10 Dec, 2020
2 commits
-
* origin/dn_uboot:
watchdog: sbsa: timeout should be in "millisecond"
usb: xhci: Fix armv7 compile warning -
timeout should be in "millisecond" instead of second,
so divided it by 1000 when calculate the load value.Signed-off-by: Zhao Qiang
20 Jul, 2020
1 commit
-
Conflicts:
drivers/net/KconfigMerge with dn_uboot for secondary merge window of lf_uboot.
Signed-off-by: Ye Li
16 Jul, 2020
1 commit
-
According to Server Base System Architecture (SBSA) specification,
the SBSA Generic Watchdog has two stage timeouts: the first signal
(WS0) is for alerting the system by interrupt, the second one (WS1) is a
real hardware reset.
More details about the hardware specification of this device:
ARM DEN0029B - Server Base System Architecture (SBSA)This driver can operate ARM SBSA Generic Watchdog as a single stage
In the single stage mode, when the timeout is reached, your system
will be reset by WS1. The first signal (WS0) is ignored.Signed-off-by: Zhao Qiang
Signed-off-by: Biwen Li
Reviewed-by: Stefan Roese
16 Jun, 2020
1 commit
-
Patch "MLK-22755 mx7ulp: wdog: Wait for WDOG unlock and
reconfiguration to complete", added some flags checking
to WDOG driver. But the cs2 register access is wrong, should
use "readb" not "readl".This is fine for some compilers (like gcc8.2, gcc9.2) which
adjusts the access to "ldrb" instruction. However for old
compilers (like gcc4.9), it won't fix the instruction and cause
data abort.Signed-off-by: Ye Li
Reviewed-by: Peng Fan
06 May, 2020
2 commits
-
According to i.MX7ULP Reference Manual we should wait for WDOG unlock
and reconfiguration to complete.Section "59.5.3 Configure Watchdog" provides the following example:
DisableInterrupts; //disable global interrupt
WDOG_CNT = 0xD928C520; //unlock watchdog
while(WDOG_CS[ULK]==0); //wait until registers are unlocked
WDOG_TOVAL = 256; //set timeout value
WDOG_CS = WDOG_CS_EN(1) | WDOG_CS_CLK(1) | WDOG_CS_INT(1) |
WDOG_CS_WIN(0) | WDOG_CS_UPDATE(1);
while(WDOG_CS[RCS]==0); //wait until new configuration takes effect
EnableInterrupts; //enable global interruptUpdate U-Boot WDOG driver to align with i.MX7ULP reference manual.
Reviewed-by: Ye Li
Signed-off-by: Breno Lima
(cherry picked from commit 3ffee301cb4570e0e7681448ec434f0689bcbaa3) -
According to i.MX7ULP Reference Manual the second word write for both
UNLOCK and REFRESH operations must occur in maximum 16 bus clock.The current code is using writel() function which has a DMB barrier to
order the memory access. The DMB between two words write may introduce
some delay in certain circumstance, causing a WDOG timeout due to 16 bus
clock window requirement.Replace writel() function by __raw_writel() to achieve a faster memory
access and avoid such issue.Signed-off-by: Breno Lima
Reviewed-by: Ye Li
(cherry picked from commit 5dd8c46d68d3267e989f980598a4e3e2ed04d4f9)
16 Mar, 2020
1 commit
-
On some platforms/architectures the value from get_timer() can wrap.
This is particularly problematic when long-running code needs to measure
a time difference as is the case with watchdog_reset() which tries to
avoid tickling the watchdog too frequently.Use time_after() from time.h instead of a plain > comparison to avoid
any issues with the time wrapping on a system that has been sitting in
u-boot for a long time.Signed-off-by: Chris Packham
Reviewed-by: Stefan Roese
13 Mar, 2020
1 commit
-
Just cleanup help indentation to be the same for all options.
It means indentation.OMAP3 should be indented by tabs which is also fixed.
Signed-off-by: Michal Simek
28 Feb, 2020
2 commits
-
Commit 06985289d452 ("watchdog: Implement generic watchdog_reset()
version") introduced an automatic selection of CONFIG_WATCHDOG by
CONFIG_WDT. But for boards selecting CONFIG_HW_WATCHDOG, like
boards have a powerpc 8xx, CONFIG_WATCHDOG shall not be selected
as they are mutually exclusive.Make CONFIG_WATCHDOG dependent on !CONFIG_HW_WATCHDOG
Fixes: 06985289d452 ("watchdog: Implement generic watchdog_reset() version")
Cc: Stefan Roese
Signed-off-by: Christophe Leroy
Reviewed-by: Stefan Roese -
Commit f3729ba6e7b2 ("watchdog: mpc8xx_wdt: Watchdog driver and macros
cleanup") switched the watchdog to CONFIG_WATCHDOG. But this is not
compatible with the 8xx because it starts the watchdog HW timer at
reset and must be serviced from the very beginning including while
U-boot is executed in the firmware before relocation in RAM.Select CONFIG_HW_WATCHDOG and make hw_watchdog_reset() visible.
Meanwhile, finalise the cleanup of arch/powerpc/cpu/mpc8xx/Kconfig by
removing the lines put in comment in that commit, and also remove
again the selection of CONFIG_MPC8xx_WATCHDOG which was removed by
that commit and brought back by mistake by commit b3134ffbd944
("watchdog: Kconfig: Sort entry alphabetically")Note that there was an 'imply WATCHDOG' in the original commit but
it disappeared in the Kconfig alphabetical sorting, so no need to
remove it here.Fixes: f3729ba6e7b2 ("watchdog: mpc8xx_wdt: Watchdog driver and macros cleanup")
Fixes: b3134ffbd944 ("watchdog: Kconfig: Sort entry alphabetically")
Signed-off-by: Christophe Leroy
Cc: Stefan Roese
Cc: Patrice Chotard
Reviewed-by: Stefan Roese
11 Feb, 2020
1 commit
-
sandbox conversion to SDL2
TPM TEE driver
Various minor sandbox video enhancements
New driver model core utility functions
08 Feb, 2020
1 commit
-
Add support for hardware watchdog timer on all Cortina Access
CAxxxx family of SoCs.Reviewed-by: Daniel Schwierzeck
Reviewed-by: Stefan Roese
Signed-off-by: Jason Li
Signed-off-by: Alex Nemirovsky
07 Feb, 2020
1 commit
-
- Gen 5 and Watchdog fixes
06 Feb, 2020
2 commits
-
At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.Move the compatibility features into a separate header file.
Signed-off-by: Simon Glass
-
At present devres.h is included in all files that include dm.h but few
make use of it. Also this pulls in linux/compat which adds several more
headers. Drop the automatic inclusion and require files to include devres
themselves. This provides a good indication of which files use devres.Signed-off-by: Simon Glass
Reviewed-by: Anatolij Gustschin
05 Feb, 2020
2 commits
-
Add optional support for fetching watchdog clock rate from DT
and ungating reset via reset framework. This is optional as not
all platforms using DW WDT support the clock and reset frameworks
yet.Signed-off-by: Marek Vasut
Cc: Chin Liang See
Cc: Dalon Westergreen
Cc: Dinh Nguyen
Cc: Jagan Teki
Cc: Ley Foon Tan
Cc: Philipp Tomisch
Cc: Simon Goldschmidt
Cc: Tien Fong Chee
Reviewed-by: Jagan Teki
Tested-by: Jagan Teki # roc-rk3399-pc -
Convert the designware watchdog timer driver to DM and add DT probing
support. Perform minor coding style clean up, like drop superfluous
braces. These ought to be no functional change.Signed-off-by: Marek Vasut
Cc: Chin Liang See
Cc: Dalon Westergreen
Cc: Dinh Nguyen
Cc: Jagan Teki
Cc: Ley Foon Tan
Cc: Philipp Tomisch
Cc: Simon Goldschmidt
Cc: Tien Fong Chee
Reviewed-by: Jagan Teki
Tested-by: Jagan Teki # roc-rk3399-pc
04 Feb, 2020
3 commits
-
Fix obvious coding style problems, no functional change.
Signed-off-by: Marek Vasut
Cc: Grygorii Strashko
Cc: Sam Protsenko
Cc: Suniel Mahesh
Reviewed-by: Lokesh Vutla
Signed-off-by: Lokesh Vutla -
The watchdog timer value was never updated in the hardware by this
driver, so the watchdog triggered on some random stale value that
was left in the hardware. The TI SPRUH37C says, quote:20.4.3.9 Modifying Timer Count/Load Values and Prescaler Setting
...
After a write access, the load register value and prescaler ratio
registers are updated immediately, but new values are considered
only after the next consecutive counter overflow or after a new
trigger command (the WDT_WTGR register).This means at least one trigger must happen. The driver probably
depended on someone calling it's .reset() callback, however that
is not guaranteed e.g. if the WDT operates without servicing.Add this missing trigger.
Signed-off-by: Marek Vasut
Cc: Grygorii Strashko
Cc: Sam Protsenko
Cc: Suniel Mahesh
Reviewed-by: Lokesh Vutla
Signed-off-by: Lokesh Vutla -
The timeout parameter of omap3_wdt_start() is in miliseconds, while
GET_WLDR_VAL() expects parameter in seconds. Fix this so the WDT
driver is actually usable.Signed-off-by: Marek Vasut
Cc: Grygorii Strashko
Cc: Sam Protsenko
Cc: Suniel Mahesh
Reviewed-by: Lokesh Vutla
Signed-off-by: Lokesh Vutla
03 Feb, 2020
1 commit
-
Migrate CONFIG_DESIGNWARE_WATCHDOG to Kconfig and update the headers
accordingly, no functional change. The S10 enables the WDT only in
SPL, but does not enable it in U-Boot itself, hence disable it in
the config again.Signed-off-by: Marek Vasut
Cc: Chin Liang See
Cc: Dalon Westergreen
Cc: Dinh Nguyen
Cc: Jagan Teki
Cc: Ley Foon Tan
Cc: Philipp Tomisch
Cc: Simon Goldschmidt
Cc: Tien Fong Chee
23 Jan, 2020
1 commit
-
This IP is also used on some arm SoC, so we allow to
use it on arm bcm68360 too.Signed-off-by: Philippe Reynes
18 Jan, 2020
2 commits
-
At present panic() is in the vsprintf.h header file. That does not seem
like an obvious choice for hang(), even though it relates to panic(). So
let's put hang() in its own header.Signed-off-by: Simon Glass
[trini: Migrate a few more files]
Signed-off-by: Tom Rini -
Move this function out of common.h and into a relevant header file.
Signed-off-by: Simon Glass
04 Nov, 2019
2 commits
-
The expire_now function was previously setting the watchdog timeout to
minimum and waiting for the watchdog to expire. However, this watchdog
also has bits to trigger immediate reset. Use those instead, like the
Linux imx2_wdt driver does.Signed-off-by: Robert Hancock
-
The Linux imx2_wdt driver uses a fsl,ext-reset-output boolean in the
device tree to specify whether the board design should use the external
reset instead of the internal reset. Use this boolean to determine which
mode to use rather than using external reset unconditionally.For the legacy non-DM mode, the external reset is always used in order
to maintain the previous behavior.Signed-off-by: Robert Hancock
08 Oct, 2019
1 commit
-
move WATCHDOG_TIMEOUT_MSECS to Kconfig and fix
all board defconfigs.Signed-off-by: Heiko Schocher
Reviewed-by: Stefan Roese
Acked-by: Lukasz Majewski
Acked-by: Martyn Welch
Signed-off-by: Stefan Roese
20 Sep, 2019
1 commit
-
AM335X based beaglebone black target gets reset by DM converted watchdog
if booted from emmc around 60sec. Fixed this by moving driver's private struct
variable initialization at different places in the driver to driver's probe.
Tested on Beaglebone Black.Cc: Grygorii Strashko
Fixes: 7659ea32 ("watchdog: omap_wdt: Convert watchdog driver to use DT and DM")
Reported-by: Sam Protsenko
Signed-off-by: Suniel Mahesh
Acked-by: Grygorii Strashko
Reviewed-by: Sam Protsenko
12 Sep, 2019
1 commit
-
Add sp805_wdt_expire_now function.
expire_now method is required by U_BOOT_DRIVER.Signed-off-by: Thomas Schaefer
Signed-off-by: Zhao Qiang
Reviewed-by: Priyanka Jain
13 Aug, 2019
1 commit
-
This patch disables DM watchdog support for SPL builds and uses
the legacy omap watchdog driver on TI AM335x chipsets.The following build error is reported if DM watchdog support was
enabled in SPL:CC spl/drivers/usb/gadget/rndis.o
LD spl/drivers/usb/gadget/built-in.o
LD spl/drivers/usb/musb-new/built-in.o
LD spl/drivers/built-in.o
LD spl/u-boot-spl
arm-linux-ld.bfd: u-boot-spl section .u_boot_list will not fit in region .sram
arm-linux-ld.bfd: region .sram overflowed by 440 bytes
make[1]: *** [spl/u-boot-spl] Error 1
make: *** [spl/u-boot-spl] Error 2Adjusted WATCHDOG_RESET macro accordingly. Earlier it was pointing
to hw_watchdog_reset. Since CONFIG_WATCHDOG replaces CONFIG_HW_WATCHDOG,
now WATCHDOG_RESET macro points to watchdog_reset. This watchdog_reset
is not defined anywhere for am33xx/omap2 and needs to be defined. Fixed
this by simply calling hw_watchdog_reset in watchdog_reset.Built and tested on AM335x device (BeagleboneBlack), compile tested for
all other AM33xx/omap2 based boards.Signed-off-by: Suniel Mahesh
[trini: Fix watchdog.h logic]
Signed-off-by: Tom Rini
12 Aug, 2019
1 commit
-
This patch adds device tree and driver model watchdog support,
converts the legacy omap watchdog driver to driver model for
TI AM335x chipsets. The following compile warning is removed:===================== WARNING ======================
This board does not use CONFIG_WDT (DM watchdog support).
Please update the board to use CONFIG_WDT before the
v2019.10 release.
Failure to update by the deadline may result in board removal.
See doc/driver-model/MIGRATION.txt for more info.
====================================================CONFIG_HW_WATCHDOG is no more a default option for AM33XX devices
after DT/DM conversion, adjusted kconfig accordingly.DM watchdog support is enabled by default in SPL. The SPL image
doesn't fit into SRAM because of size constraints and build breaks
with an overflow. For this reason DM watchdog support should be
disabled in SPL, driver code should be adjusted accordingly to serve
this purpose.
Built and tested on AM335x device (BeagleboneBlack), compile tested
for all other AM33xx based boards.Signed-off-by: Suniel Mahesh
05 Aug, 2019
2 commits
-
This patch cleans up some coding style related issues in the mtk_wtd
driver to make this driver comply again with the U-Boot coding style
standards.The only minimal functional change is that the timeout parameter is now
passed in (u64) instead of (unsigned int) from mtk_wdt_start() to
mtk_wdt_set_timeout(), preserving the original value.Signed-off-by: Stefan Roese
Cc: Shannon Barber
Cc: Ryder Lee
Cc: Matthias Brugger
Cc: Frank Wunderlich
Reviewed-by: Matthias Brugger -
The BCM2835/2836 watchdog is not used in mainline U-Boot at all. This
patch removes the driver and its references (CONFIG_BCM2835_WDT)
completely.Signed-off-by: Stefan Roese
Cc: Paolo Pisati
20 Jul, 2019
2 commits
-
Add DM and DT probing support to iMX watchdog driver. This should
allow boards to move over to this driver, enable SYSRESET_WATCHDOG
to handle cpu_reset() if required.Signed-off-by: Marek Vasut
Cc: Peng Fan
Cc: Stefano Babic
Tested-by: Heiko Schocher -
Use CONFIG_IS_ENABLED(WDT) to permit use of WDT in SPL without DM,
while the full U-Boot can use rich DM/DT WDT driver.Signed-off-by: Marek Vasut
Cc: Peng Fan
Cc: Stefano Babic
Tested-by: Heiko Schocher
Tested-by: Suniel Mahesh
22 Jun, 2019
2 commits
-
Convert legacy driver to use watchdog class.
Signed-off-by: Andy Shevchenko
Reviewed-by: Stefan Roese -
The default timeout value had been left in order to leave some traces
about default setup of watchdog done by firmware.For better understanding and compiler burden, replace it with a comment.
Suggested-by: Stefan Roese
Signed-off-by: Andy Shevchenko
Reviewed-by: Bin Meng
20 Jun, 2019
1 commit
-
Signed-off-by: Shannon Barber