From: Kathiravan Thirumoorthy <kathiravan.thirumoorthy@oss.qualcomm.com>
To: Konrad Dybcio <konrad.dybcio@oss.qualcomm.com>,
Rob Herring <robh@kernel.org>,
Krzysztof Kozlowski <krzk+dt@kernel.org>,
Conor Dooley <conor+dt@kernel.org>,
Bjorn Andersson <andersson@kernel.org>,
Konrad Dybcio <konradybcio@kernel.org>,
Wim Van Sebroeck <wim@linux-watchdog.org>,
Guenter Roeck <linux@roeck-us.net>,
Rajendra Nayak <quic_rjendra@quicinc.com>
Cc: linux-arm-msm@vger.kernel.org, devicetree@vger.kernel.org,
linux-kernel@vger.kernel.org, linux-watchdog@vger.kernel.org
Subject: Re: [PATCH v7 4/5] watchdog: qcom: add support to get the bootstatus from IMEM
Date: Wed, 25 Feb 2026 18:55:40 +0530 [thread overview]
Message-ID: <b41d4998-5f7d-4d89-af80-a7a2d2a03021@oss.qualcomm.com> (raw)
In-Reply-To: <1a28d203-e0ee-4c0d-a6ac-7f50ab26bdeb@oss.qualcomm.com>
On 2/25/2026 6:11 PM, Konrad Dybcio wrote:
> On 2/25/26 7:43 AM, Kathiravan Thirumoorthy wrote:
>> When the system boots up after a watchdog reset, the EXPIRED_STATUS bit
>> in the WDT_STS register is cleared. To identify if the system was
>> restarted due to WDT expiry, XBL update the information in the IMEM region.
>> Update the driver to read the restart reason from IMEM and populate the
>> bootstatus accordingly.
>>
>> With the CONFIG_WATCHDOG_SYSFS enabled, user can extract the information
>> as below:
>>
>> cat /sys/devices/platform/soc@0/f410000.watchdog/watchdog/watchdog0/bootstatus
>> 32
>>
>> For backward compatibility, keep the EXPIRED_STATUS bit check. Add a new
>> function qcom_wdt_get_bootstatus() to read the restart reason from
>> IMEM.
>>
>> Signed-off-by: Kathiravan Thirumoorthy <kathiravan.thirumoorthy@oss.qualcomm.com>
>> ---
> [...]
>
>> +static int qcom_wdt_get_bootstatus(struct device *dev, struct qcom_wdt *wdt,
>> + u32 val)
>> +{
>> + struct device_node *imem;
>> + struct resource res;
>> + void __iomem *addr;
>> + int ret;
>> +
>> + imem = of_parse_phandle(dev->of_node, "sram", 0);
>> + if (!imem) {
>> +
>> + /* Fallback to the existing check */
> Odd \n above
>
> 'existing' is imprecise, perhaps something like
>
> /* Read the EXPIRED_STATUS bit as a fallback */
Thanks, will update the comment as above in next spin.
>
> lg otherwise
>
> Reviewed-by: Konrad Dybcio <konrad.dybcio@oss.qualcomm.com>
>
> Konrad
next prev parent reply other threads:[~2026-02-25 13:25 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-02-25 6:43 [PATCH v7 0/5] Add support to read the watchdog " Kathiravan Thirumoorthy
2026-02-25 6:43 ` [PATCH v7 1/5] dt-bindings: sram: describe the IPQ5424 IMEM as mmio-sram Kathiravan Thirumoorthy
2026-02-25 10:13 ` Krzysztof Kozlowski
2026-02-25 11:28 ` Kathiravan Thirumoorthy
2026-02-25 6:43 ` [PATCH v7 2/5] arm64: dts: qcom: ipq5424: Add the IMEM node Kathiravan Thirumoorthy
2026-02-25 12:34 ` Konrad Dybcio
2026-02-25 6:43 ` [PATCH v7 3/5] dt-bindings: watchdog: qcom-wdt: Document sram property Kathiravan Thirumoorthy
2026-02-25 6:43 ` [PATCH v7 4/5] watchdog: qcom: add support to get the bootstatus from IMEM Kathiravan Thirumoorthy
2026-02-25 12:41 ` Konrad Dybcio
2026-02-25 13:25 ` Kathiravan Thirumoorthy [this message]
2026-02-25 6:43 ` [PATCH v7 5/5] arm64: dts: qcom: ipq5424: add support to get watchdog " Kathiravan Thirumoorthy
2026-02-25 12:34 ` Konrad Dybcio
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=b41d4998-5f7d-4d89-af80-a7a2d2a03021@oss.qualcomm.com \
--to=kathiravan.thirumoorthy@oss.qualcomm.com \
--cc=andersson@kernel.org \
--cc=conor+dt@kernel.org \
--cc=devicetree@vger.kernel.org \
--cc=konrad.dybcio@oss.qualcomm.com \
--cc=konradybcio@kernel.org \
--cc=krzk+dt@kernel.org \
--cc=linux-arm-msm@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-watchdog@vger.kernel.org \
--cc=linux@roeck-us.net \
--cc=quic_rjendra@quicinc.com \
--cc=robh@kernel.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
all inboxes | Powered by JetHome®