#
babc8a52 |
| 13-Sep-2024 |
Harini T <harini.t@amd.com> |
watchdog: xilinx_wwdt: Calculate max_hw_heartbeat_ms using clock frequency
[ Upstream commit 006778844c2c132c28cfa90e3570560351e01b9a ]
In the current implementation, the value of max_hw_heartbeat_
watchdog: xilinx_wwdt: Calculate max_hw_heartbeat_ms using clock frequency
[ Upstream commit 006778844c2c132c28cfa90e3570560351e01b9a ]
In the current implementation, the value of max_hw_heartbeat_ms is set to the timeout period expressed in milliseconds and fails to verify if the close window percentage exceeds the maximum value that the hardware supports.
1. Calculate max_hw_heartbeat_ms based on input clock frequency. 2. Update frequency check to require a minimum frequency of 1Mhz. 3. Limit the close and open window percent to hardware supported value to avoid truncation. 4. If the user input timeout exceeds the maximum timeout supported, use only open window and the framework supports the higher timeouts.
Fixes: 12984cea1b8c ("watchdog: xilinx_wwdt: Add Versal window watchdog support") Signed-off-by: Harini T <harini.t@amd.com> Reviewed-by: Guenter Roeck <linux@roeck-us.net> Link: https://lore.kernel.org/r/20240913113230.1939373-1-harini.t@amd.com Signed-off-by: Guenter Roeck <linux@roeck-us.net> Signed-off-by: Wim Van Sebroeck <wim@linux-watchdog.org> Signed-off-by: Sasha Levin <sashal@kernel.org>
show more ...
|
#
98334dc2 |
| 15-Aug-2023 |
Nathan Chancellor <nathan@kernel.org> |
watchdog: xilinx_wwdt: Use div_u64() in xilinx_wwdt_start()
After commit f1a43aadb5a6 ("watchdog: Enable COMPILE_TEST for more drivers"), it is possible to enable this driver on 32-bit architectures
watchdog: xilinx_wwdt: Use div_u64() in xilinx_wwdt_start()
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>
show more ...
|
#
cc85f87a |
| 26-Jul-2023 |
Rob Herring <robh@kernel.org> |
watchdog: Explicitly include correct DT includes
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 th
watchdog: Explicitly include correct DT includes
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>
show more ...
|
#
12984cea |
| 20-Apr-2023 |
Srinivas Neeli <srinivas.neeli@amd.com> |
watchdog: xilinx_wwdt: Add Versal window watchdog support
Versal watchdog driver uses window watchdog mode. Window watchdog timer(WWDT) contains closed(first) and open(second) window with 32 bit wid
watchdog: xilinx_wwdt: Add Versal window watchdog support
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>
show more ...
|