[PATCH V3] watchdog: xilinx_wwdt: Calculate max_hw_heartbeat_ms using clock frequency

Guenter Roeck linux at roeck-us.net
Fri Sep 20 07:58:19 PDT 2024


On 9/13/24 04:32, Harini T wrote:
> 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 at amd.com>

Reviewed-by: Guenter Roeck <linux at roeck-us.net>




More information about the linux-arm-kernel mailing list