scfw think 'new_pretimeout' as the time stamp from now, not
the time before watchdog timeout which is different with kernel
define. Convert it to scfw's format.
Signed-off-by: Robin Gong <yibin.gong@nxp.com>
Reviewed-by: Anson Huang <anson.huang@nxp.com>
(cherry picked from commit
674332ac12ddf593d89e87517573b31be2bbead3)
{
struct arm_smccc_res res;
+ /*
+ * scfw calculate new_pretimeout based on current stamp instead of
+ * watchdog timeout stamp, convert it to scfw format.
+ */
+ new_pretimeout = wdog->timeout - new_pretimeout;
arm_smccc_smc(FSL_SIP_SRTC, FSL_SIP_SRTC_SET_PRETIME_WDOG,
new_pretimeout * 1000, 0, 0, 0, 0, 0,
&res);