From: claudiu beznea <claudiu.beznea@tuxon.dev>
To: ulf.hansson@linaro.org, wim@linux-watchdog.org,
linux@roeck-us.net, rafael@kernel.org
Cc: linux-pm@vger.kernel.org, linux-kernel@vger.kernel.org,
linux-watchdog@vger.kernel.org, geert+renesas@glider.be,
linux-renesas-soc@vger.kernel.org,
Claudiu Beznea <claudiu.beznea.uj@bp.renesas.com>
Subject: Re: [PATCH RFC 0/3] watchdog: rzg2l_wdt: Enable properly the watchdog clocks and power domain
Date: Wed, 7 Aug 2024 14:21:25 +0300 [thread overview]
Message-ID: <201cbbe6-99eb-4622-bc5f-3d298f9e30b4@tuxon.dev> (raw)
In-Reply-To: <20240619120920.2703605-1-claudiu.beznea.uj@bp.renesas.com>
Hi, Ulf,
Please, do you have any input/suggestions on this?
Thank you,
Claudiu Beznea
On 19.06.2024 15:09, Claudiu wrote:
> From: Claudiu Beznea <claudiu.beznea.uj@bp.renesas.com>
>
> Hi,
>
> Watchdog device available on RZ/G3S SoC is part of a software-controlled
> power domain. The watchdog driver implements struct
> watchdog_ops::restart() handler which is called in atomic context via
> this call chain:
>
> kernel_restart() ->
> machine_restart() ->
> do_kernel_restart() ->
> atomic_notifier_call_chain() ->
> watchdog_restart_notifier()
> rzg2l_wdt_restart()
>
> When the rzg2l_wdt_restart() is called it may happen that the watchdog
> clocks to be disabled and the associated power domain to be off.
> Accessing watchdog registers in this state leads to aborts and system
> blocks.
>
> To solve this issue the series proposes a new API called
> dev_pm_genpd_resume_restart_dev() that is intended to be called in
> scenarios like this. In this RFC series the
> dev_pm_genpd_resume_restart_dev() checks if the system is in
> SYSTEM_RESTART context and call dev_pm_genpd_resume(). I also wanted to
> mark the device as a restart device with a new member in struct dev_pm_info
> (similar to struct dev_pm_info::syscore) and check it in the newly
> introduced API but then I told myself maybe it would be better to keep it
> simpler for the moment.
>
> Please let me know how do you consider this.
>
> Along with it, series addresses the usage of clk_prepare_enable() in
> rzg2l_wdt_restart() reported by Ulf Hansson at [1] and use the
> dev_pm_genpd_resume_restart_dev() in rzg2l_wdt driver.
>
> Please note that series is built on top of [1].
>
> A similar approach (using directly the dev_pm_genpd_resume() function in
> rzg2l_wdt was proposed at [2]). This series was posted separatelly to
> avoid blocking the initial support for the RZ/G3S SoC.
>
> Thank you,
> Claudiu Beznea
>
> [1] https://lore.kernel.org/all/20240531065723.1085423-1-claudiu.beznea.uj@bp.renesas.com/
> [2] https://lore.kernel.org/all/20240410134044.2138310-10-claudiu.beznea.uj@bp.renesas.com/
>
> Claudiu Beznea (3):
> pmdomain: core: Add a helper to power on the restart devices
> watchdog: rzg2l_wdt: Keep the clocks prepared
> watchdog: rzg2l_wdt: Power on the PM domain in rzg2l_wdt_restart()
>
> drivers/pmdomain/core.c | 18 +++++++++++++++
> drivers/watchdog/rzg2l_wdt.c | 43 +++++++++++++++++++++++++++++++-----
> include/linux/pm_domain.h | 2 ++
> 3 files changed, 58 insertions(+), 5 deletions(-)
>
prev parent reply other threads:[~2024-08-07 11:21 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-06-19 12:09 [PATCH RFC 0/3] watchdog: rzg2l_wdt: Enable properly the watchdog clocks and power domain Claudiu
2024-06-19 12:09 ` [PATCH RFC 1/3] pmdomain: core: Add a helper to power on the restart devices Claudiu
2024-06-19 12:09 ` [PATCH RFC 2/3] watchdog: rzg2l_wdt: Keep the clocks prepared Claudiu
2024-06-20 15:31 ` Lad, Prabhakar
2024-06-21 6:16 ` claudiu beznea
2024-06-19 12:09 ` [PATCH RFC 3/3] watchdog: rzg2l_wdt: Power on the PM domain in rzg2l_wdt_restart() Claudiu
2024-08-13 13:56 ` Ulf Hansson
2024-08-19 11:05 ` claudiu beznea
2024-08-07 11:21 ` claudiu beznea [this message]
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=201cbbe6-99eb-4622-bc5f-3d298f9e30b4@tuxon.dev \
--to=claudiu.beznea@tuxon.dev \
--cc=claudiu.beznea.uj@bp.renesas.com \
--cc=geert+renesas@glider.be \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-pm@vger.kernel.org \
--cc=linux-renesas-soc@vger.kernel.org \
--cc=linux-watchdog@vger.kernel.org \
--cc=linux@roeck-us.net \
--cc=rafael@kernel.org \
--cc=ulf.hansson@linaro.org \
--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: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox