projects
/
linux-2.6-block.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
2c77734
)
watchdog: imx_sc_wdt: Pretimeout should follow SCU firmware format
author
Anson Huang
<Anson.Huang@nxp.com>
Wed, 9 Oct 2019 07:37:47 +0000
(15:37 +0800)
committer
Wim Van Sebroeck
<wim@linux-watchdog.org>
Tue, 5 Nov 2019 15:58:12 +0000
(16:58 +0100)
SCU firmware calculates pretimeout based on current time stamp
instead of watchdog timeout stamp, need to convert the pretimeout
to SCU firmware's timeout value.
Fixes:
15f7d7fc5542
("watchdog: imx_sc: Add pretimeout support")
Signed-off-by: Anson Huang <Anson.Huang@nxp.com>
Reviewed-by: Guenter Roeck <linux@roeck-us.net>
Signed-off-by: Guenter Roeck <linux@roeck-us.net>
Signed-off-by: Wim Van Sebroeck <wim@linux-watchdog.org>
drivers/watchdog/imx_sc_wdt.c
patch
|
blob
|
blame
|
history
diff --git
a/drivers/watchdog/imx_sc_wdt.c
b/drivers/watchdog/imx_sc_wdt.c
index 7ea5cf54e94a05de72accbf4ab2b28d046ecbf50..8ed89f032ebf29058c6f13ee0b9fb46a31a8588c 100644
(file)
--- a/
drivers/watchdog/imx_sc_wdt.c
+++ b/
drivers/watchdog/imx_sc_wdt.c
@@
-99,8
+99,14
@@
static int imx_sc_wdt_set_pretimeout(struct watchdog_device *wdog,
{
struct arm_smccc_res res;
+ /*
+ * SCU firmware calculates pretimeout based on current time
+ * stamp instead of watchdog timeout stamp, need to convert
+ * the pretimeout to SCU firmware's timeout value.
+ */
arm_smccc_smc(IMX_SIP_TIMER, IMX_SIP_TIMER_SET_PRETIME_WDOG,
- pretimeout * 1000, 0, 0, 0, 0, 0, &res);
+ (wdog->timeout - pretimeout) * 1000, 0, 0, 0,
+ 0, 0, &res);
if (res.a0)
return -EACCES;