From: Krzysztof Kozlowski <krzk@kernel.org>
To: Loic Poulain <loic.poulain@oss.qualcomm.com>
Cc: andersson@kernel.org, konradybcio@kernel.org, robh@kernel.org,
krzk+dt@kernel.org, conor+dt@kernel.org, sre@kernel.org,
linux-arm-msm@vger.kernel.org, devicetree@vger.kernel.org,
linux-pm@vger.kernel.org
Subject: Re: [PATCH 2/5] power: reset: qcom-pon: Add support for WARM reset
Date: Tue, 4 Nov 2025 15:04:50 +0100 [thread overview]
Message-ID: <20251104-kind-invisible-barracuda-1babfa@kuoka> (raw)
In-Reply-To: <20251103182006.1158383-3-loic.poulain@oss.qualcomm.com>
On Mon, Nov 03, 2025 at 07:20:03PM +0100, Loic Poulain wrote:
> This mechanism can be used when firmware lacks proper warm-reset handling,
> for example, when the PSCI SYSTEM_RESET2 function is not implemented.
> It enables the warm reset functionality via the PMIC.
>
> This fallback is only enabled if qcom,warm-reset property is present.
>
> Signed-off-by: Loic Poulain <loic.poulain@oss.qualcomm.com>
> ---
> drivers/power/reset/qcom-pon.c | 47 ++++++++++++++++++++++++++++++++++
> 1 file changed, 47 insertions(+)
>
> diff --git a/drivers/power/reset/qcom-pon.c b/drivers/power/reset/qcom-pon.c
> index 7e108982a582..684e9fe9987d 100644
> --- a/drivers/power/reset/qcom-pon.c
> +++ b/drivers/power/reset/qcom-pon.c
> @@ -19,12 +19,20 @@
>
> #define NO_REASON_SHIFT 0
>
> +#define PON_SW_RESET_S2_CTL 0x62
> +#define PON_SW_RESET_S2_CTL_WARM_RST 0x01
> +#define PON_SW_RESET_S2_CTL2 0x63
> +#define PON_SW_RESET_S2_CTL2_RST_EN BIT(7)
> +#define PON_SW_RESET_GO 0x64
> +#define PON_SW_RESET_GO_MAGIC 0xa5
> +
> struct qcom_pon {
> struct device *dev;
> struct regmap *regmap;
> u32 baseaddr;
> struct reboot_mode_driver reboot_mode;
> long reason_shift;
> + bool warm_reset;
> };
>
> static int qcom_pon_reboot_mode_write(struct reboot_mode_driver *reboot,
> @@ -44,6 +52,37 @@ static int qcom_pon_reboot_mode_write(struct reboot_mode_driver *reboot,
> return ret;
> }
>
> +static int pm8916_pon_reset(struct sys_off_data *data)
> +{
> + struct qcom_pon *pon = data->cb_data;
> + int ret;
> +
> + if (!pon->warm_reset || data->mode != REBOOT_WARM)
> + return NOTIFY_DONE;
And here is proof from the binding - you just tell what the drivers
should do.
Best regards,
Krzysztof
next prev parent reply other threads:[~2025-11-04 14:04 UTC|newest]
Thread overview: 34+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-11-03 18:20 [PATCH 0/5] Add EDL reboot and warm reset support for QRB2210 Loic Poulain
2025-11-03 18:20 ` [PATCH 1/5] dt-bindings: power: reset: qcom-pon: Document qcom,warm-reset Loic Poulain
2025-11-04 2:17 ` Bjorn Andersson
2025-11-04 14:03 ` Krzysztof Kozlowski
2025-11-04 15:12 ` Loic Poulain
2025-11-03 18:20 ` [PATCH 2/5] power: reset: qcom-pon: Add support for WARM reset Loic Poulain
2025-11-04 2:19 ` Bjorn Andersson
2025-11-04 11:50 ` Konrad Dybcio
2025-11-04 15:01 ` Loic Poulain
2025-11-04 15:20 ` Konrad Dybcio
2025-11-05 21:44 ` Loic Poulain
2025-11-06 12:50 ` Konrad Dybcio
2025-11-12 11:16 ` Loic Poulain
2025-11-12 11:20 ` Konrad Dybcio
2025-11-14 15:35 ` Loic Poulain
2025-11-04 14:04 ` Krzysztof Kozlowski [this message]
2025-11-03 18:20 ` [PATCH 3/5] dt-bindings: firmware: qcom,scm: Document reboot mode Loic Poulain
2025-11-04 2:16 ` Bjorn Andersson
2025-11-04 2:19 ` Dmitry Baryshkov
2025-11-04 2:45 ` Bjorn Andersson
2025-11-04 21:19 ` Loic Poulain
2025-11-05 9:44 ` Konrad Dybcio
2025-11-05 20:17 ` Loic Poulain
2025-11-06 9:51 ` Konrad Dybcio
2025-11-12 16:36 ` Bjorn Andersson
2025-11-13 11:00 ` Konrad Dybcio
2025-11-13 17:38 ` Bjorn Andersson
2025-11-03 18:20 ` [PATCH 4/5] firmware: qcom: scm: Support for EDL " Loic Poulain
2025-11-04 2:22 ` Bjorn Andersson
2025-11-04 12:09 ` kernel test robot
2025-11-04 13:13 ` kernel test robot
2025-11-03 18:20 ` [PATCH 5/5] arm64: dts: qcom: qrb2210-rb1: Add support for EDL reboot Loic Poulain
2025-11-04 2:20 ` Dmitry Baryshkov
2025-11-04 10:23 ` Loic Poulain
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=20251104-kind-invisible-barracuda-1babfa@kuoka \
--to=krzk@kernel.org \
--cc=andersson@kernel.org \
--cc=conor+dt@kernel.org \
--cc=devicetree@vger.kernel.org \
--cc=konradybcio@kernel.org \
--cc=krzk+dt@kernel.org \
--cc=linux-arm-msm@vger.kernel.org \
--cc=linux-pm@vger.kernel.org \
--cc=loic.poulain@oss.qualcomm.com \
--cc=robh@kernel.org \
--cc=sre@kernel.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