i was trying to set a 10 seconds timeout to the imx6 wdt ,referring to imx2-wdt driver, by
regmap_update_bits(wdev->regmap, IMX2_WDT_WCR, IMX2_WDT_WCR_WT,
just after i reload the counter by:
#define IMX2_WDT_WSR 0x02 /* Service Register */
#define IMX2_WDT_SEQ1 0x5555 /* -> service sequence 1 */
#define IMX2_WDT_SEQ2 0xAAAA /* -> service sequence 2 */
regmap_write(wdev->regmap, IMX2_WDT_WSR, IMX2_WDT_SEQ1);
regmap_write(wdev->regmap, IMX2_WDT_WSR, IMX2_WDT_SEQ2);
Watchdog timeout then happens somewhere between 5 and 10 secs, so much before the desired 10 seconds .
Double checked this also using sa mod_timer of 10secs, it never reaches the callback since watchdog reset happens before.
Thanks to all,