| Age | Commit message (Collapse) | Author |
|
Prevent the Qualcomm watchdog from autostarting and ensure it's stopped
when the driver probed. In some cases the watchdog is left running by
a previous bootloader stage. Disable autostart so it isn't left running
when we boot into the OS, this behaviour can be changed by enabling
autostart in the board defconfig.
Reviewed-by: Stefan Roese <[email protected]>
Reviewed-by: Sumit Garg <[email protected]>
Reviewed-by: Tom Rini <[email protected]>
Link: https://patch.msgid.link/[email protected]
Signed-off-by: Casey Connolly <[email protected]>
|
|
Added a check to ensure the requested timeout does not exceed the
hardware's maximum supported value. This prevents register overflow
and ensures watchdog reliability.
So, added a check in qcom_wdt_start() to ensure the requested timeout
does not exceed the hardware-supported maximum value. If the requested
value exceeds the maximum value, then the timeout is clamped
at maximum value.
The timeout is first converted to watchdog ticks and then compared
against QCOM_WDT_MAX_TIMEOUT. This helps prevent misconfiguration
and potential watchdog misbehavior due to overflow.
QCOM_WDT_MAX_TIMEOUT is set to 0xFFFFF, as Qualcomm SoCs typically
use 20 bits to store bark/bite timeout values.
This work builds upon the previous submission:
https://lore.kernel.org/u-boot/[email protected]/
Signed-off-by: Gopinath Sekar <[email protected]>
Reviewed-by: Stefan Roese <[email protected]>
Link: https://patch.msgid.link/[email protected]
Signed-off-by: Casey Connolly <[email protected]>
|
|
On some Qualcomm platforms, such as Dragonwing boards, the WDT_EN
register is write-only. Reading it back after enabling the watchdog
can return invalid data or cause unexpected behavior.
In particular, the check:
if (readl(wdt_addr(wdt, WDT_EN)) != 1)
may fail even though the watchdog is correctly enabled and running.
This leads to misleading error messages and unnecessary failures.
Removing the read check ensures compatibility and avoids false
negatives on platforms where WDT_EN is not readable.
This work builds upon this previous submission:
https://lore.kernel.org/u-boot/[email protected]/
Signed-off-by: Balaji Selvanathan <[email protected]>
Reviewed-by: Stefan Roese <[email protected]>
Link: https://lore.kernel.org/r/[email protected]
Signed-off-by: Casey Connolly <[email protected]>
|
|
This patch enhances the Qualcomm watchdog driver by introducing
support for dynamic timeout configuration. Specifically:
- Calculates and sets the bark and bite timeout values based on
the clock rate and the requested timeout in milliseconds.
- Adds retrieval of the watchdog clock rate during probe using
the common clock framework.
- Adds a default timeout value for ARCH_SNAPDRAGON
in WATCHDOG_TIMEOUT_MSECS.
These changes improve the configurability and accuracy of the
watchdog timer on Qualcomm platforms.
This work builds upon the previous submission:
https://lore.kernel.org/all/[email protected]/
Signed-off-by: Balaji Selvanathan <[email protected]>
Link: https://lore.kernel.org/r/[email protected]
Signed-off-by: Casey Connolly <[email protected]>
|
|
Some Qualcomm device vendors decide to turn the watchdog on in the
bootloader, resulting in the device being reset if it isn't petted every
~30 seconds. Introduce a driver to keep the watchdog happy and prevent this
annoying behaviour.
Signed-off-by: Paul Sajna <[email protected]>
Co-authored-by: Paul Sajna <[email protected]>
Tested-by: Paul Sajna <[email protected]>
Reviewed-by: Stefan Roese <[email protected]>
Acked-by: Sumit Garg <[email protected]>
Reviewed-by: Neil Armstrong <[email protected]>
Link: https://lore.kernel.org/r/[email protected]
Signed-off-by: Casey Connolly <[email protected]>
|