summaryrefslogtreecommitdiff
path: root/drivers/watchdog/xilinx_wwdt.c
AgeCommit message (Collapse)AuthorFilesLines
2023-08-19watchdog: xilinx_wwdt: Use div_u64() in xilinx_wwdt_start()Nathan Chancellor1-1/+2
After commit f1a43aadb5a6 ("watchdog: Enable COMPILE_TEST for more drivers"), it is possible to enable this driver on 32-bit architectures. When building for those architectures with clang, there is an error due to a 64-bit division in xilinx_wwdt_start(): ERROR: modpost: "__aeabi_uldivmod" [drivers/watchdog/xilinx_wwdt.ko] undefined! Use div_u64() to fix this, which takes a 64-bit dividend and 32-bit divisor. GCC likely avoids the same error due to optimizations it employs to transform division by a constant into other equivalent operations, which may be different than what is implemented in clang. Link: https://github.com/ClangBuiltLinux/linux/issues/1915 Signed-off-by: Nathan Chancellor <nathan@kernel.org> Reviewed-by: Guenter Roeck <linux@roeck-us.net> Link: https://lore.kernel.org/r/20230815-watchdog-xilinx-div_u64-v1-1-20b0b5a65c2e@kernel.org Signed-off-by: Guenter Roeck <linux@roeck-us.net> Signed-off-by: Wim Van Sebroeck <wim@linux-watchdog.org>
2023-08-13watchdog: Explicitly include correct DT includesRob Herring1-2/+2
The DT of_device.h and of_platform.h date back to the separate of_platform_bus_type before it was merged into the regular platform bus. As part of that merge prepping Arm DT support 13 years ago, they "temporarily" include each other. They also include platform_device.h and of.h. As a result, there's a pretty much random mix of those include files used throughout the tree. In order to detangle these headers and replace the implicit includes with struct declarations, users need to explicitly include the correct includes. Reviewed-by: Guenter Roeck <linux@roeck-us.net> Acked-by: Alim Akhtar <alim.akhtar@samsung.com> Signed-off-by: Rob Herring <robh@kernel.org> Link: https://lore.kernel.org/r/20230726233302.3812749-1-robh@kernel.org Signed-off-by: Guenter Roeck <linux@roeck-us.net> Signed-off-by: Wim Van Sebroeck <wim@linux-watchdog.org>
2023-06-26watchdog: xilinx_wwdt: Add Versal window watchdog supportSrinivas Neeli1-0/+201
Versal watchdog driver uses window watchdog mode. Window watchdog timer(WWDT) contains closed(first) and open(second) window with 32 bit width. Write to the watchdog timer within predefined window periods of time. This means a period that is not too soon and a period that is not too late. The WWDT has to be restarted within the open window time. If software tries to restart WWDT outside of the open window time period, it generates a reset. Signed-off-by: Srinivas Neeli <srinivas.neeli@amd.com> Reviewed-by: Guenter Roeck <linux@roeck-us.net> Link: https://lkml.kernel.org/r/20230420104231.2243079-4-srinivas.neeli@amd.com Signed-off-by: Guenter Roeck <linux@roeck-us.net> Signed-off-by: Wim Van Sebroeck <wim@linux-watchdog.org>