From: Clement LE GOFFIC <clement.legoffic@foss.st.com> To: Marek Vasut <marex@denx.de>, <linux-watchdog@vger.kernel.org> Cc: <linux-arm-kernel@lists.infradead.org>, Maxime Coquelin <mcoquelin.stm32@gmail.com>, Wim Van Sebroeck <wim@linux-watchdog.org>, <linux-stm32@st-md-mailman.stormreply.com>, Guenter Roeck <linux@roeck-us.net> Subject: Re: [Linux-stm32] [PATCH v3] watchdog: stm32_iwdg: Add pretimeout support Date: Mon, 15 Apr 2024 15:10:15 +0200 [thread overview] Message-ID: <90faea2e-1795-4303-a20f-e1fcef9e0e00@foss.st.com> (raw) In-Reply-To: <20240321011207.45388-1-marex@denx.de> Hello Marek, On 3/21/24 02:11, Marek Vasut wrote: > The STM32MP15xx IWDG adds registers which permit this IP to generate > pretimeout interrupt. This interrupt can also be used to wake the CPU > from suspend. Implement support for generating this interrupt and let > userspace configure the pretimeout. In case the pretimeout is not > configured by user, set pretimeout to half of the WDT timeout cycle. From the code below I see that the pretimeout is set to 75% and not 50% as you said. For the rest you can put as you want : Reviewed-by: Clément Le Goffic <clement.legoffic@foss.st.com> or Tested-by: Clément Le Goffic <clement.legoffic@foss.st.com> > ... > > @@ -88,13 +97,18 @@ static inline void reg_write(void __iomem *base, u32 reg, u32 val) > static int stm32_iwdg_start(struct watchdog_device *wdd) > { > struct stm32_iwdg *wdt = watchdog_get_drvdata(wdd); > - u32 tout, presc, iwdg_rlr, iwdg_pr, iwdg_sr; > + u32 tout, ptot, presc, iwdg_rlr, iwdg_ewcr, iwdg_pr, iwdg_sr; > int ret; > > dev_dbg(wdd->parent, "%s\n", __func__); > > + if (!wdd->pretimeout) > + wdd->pretimeout = 3 * wdd->timeout / 4; > + > ... Here is the 75% pretimeout. Best regards, Clément _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
WARNING: multiple messages have this Message-ID (diff)
From: Clement LE GOFFIC <clement.legoffic@foss.st.com> To: Marek Vasut <marex@denx.de>, <linux-watchdog@vger.kernel.org> Cc: <linux-arm-kernel@lists.infradead.org>, Maxime Coquelin <mcoquelin.stm32@gmail.com>, Wim Van Sebroeck <wim@linux-watchdog.org>, <linux-stm32@st-md-mailman.stormreply.com>, Guenter Roeck <linux@roeck-us.net> Subject: Re: [Linux-stm32] [PATCH v3] watchdog: stm32_iwdg: Add pretimeout support Date: Mon, 15 Apr 2024 15:10:15 +0200 [thread overview] Message-ID: <90faea2e-1795-4303-a20f-e1fcef9e0e00@foss.st.com> (raw) In-Reply-To: <20240321011207.45388-1-marex@denx.de> Hello Marek, On 3/21/24 02:11, Marek Vasut wrote: > The STM32MP15xx IWDG adds registers which permit this IP to generate > pretimeout interrupt. This interrupt can also be used to wake the CPU > from suspend. Implement support for generating this interrupt and let > userspace configure the pretimeout. In case the pretimeout is not > configured by user, set pretimeout to half of the WDT timeout cycle. From the code below I see that the pretimeout is set to 75% and not 50% as you said. For the rest you can put as you want : Reviewed-by: Clément Le Goffic <clement.legoffic@foss.st.com> or Tested-by: Clément Le Goffic <clement.legoffic@foss.st.com> > ... > > @@ -88,13 +97,18 @@ static inline void reg_write(void __iomem *base, u32 reg, u32 val) > static int stm32_iwdg_start(struct watchdog_device *wdd) > { > struct stm32_iwdg *wdt = watchdog_get_drvdata(wdd); > - u32 tout, presc, iwdg_rlr, iwdg_pr, iwdg_sr; > + u32 tout, ptot, presc, iwdg_rlr, iwdg_ewcr, iwdg_pr, iwdg_sr; > int ret; > > dev_dbg(wdd->parent, "%s\n", __func__); > > + if (!wdd->pretimeout) > + wdd->pretimeout = 3 * wdd->timeout / 4; > + > ... Here is the 75% pretimeout. Best regards, Clément
next prev parent reply other threads:[~2024-04-15 13:11 UTC|newest] Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top 2024-03-21 1:11 [PATCH v3] watchdog: stm32_iwdg: Add pretimeout support Marek Vasut 2024-03-21 1:11 ` Marek Vasut 2024-04-15 13:10 ` Clement LE GOFFIC [this message] 2024-04-15 13:10 ` [Linux-stm32] " Clement LE GOFFIC
Reply instructions: You may reply publicly to this message via plain-text email using any one of the following methods: * Save the following mbox file, import it into your mail client, and reply-to-all from there: mbox Avoid top-posting and favor interleaved quoting: https://en.wikipedia.org/wiki/Posting_style#Interleaved_style * Reply using the --to, --cc, and --in-reply-to switches of git-send-email(1): git send-email \ --in-reply-to=90faea2e-1795-4303-a20f-e1fcef9e0e00@foss.st.com \ --to=clement.legoffic@foss.st.com \ --cc=linux-arm-kernel@lists.infradead.org \ --cc=linux-stm32@st-md-mailman.stormreply.com \ --cc=linux-watchdog@vger.kernel.org \ --cc=linux@roeck-us.net \ --cc=marex@denx.de \ --cc=mcoquelin.stm32@gmail.com \ --cc=wim@linux-watchdog.org \ /path/to/YOUR_REPLY https://kernel.org/pub/software/scm/git/docs/git-send-email.html * If your mail client supports setting the In-Reply-To header via mailto: links, try the mailto: linkBe sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes, see mirroring instructions on how to clone and mirror all data and code used by this external index.