devicetree.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Krzysztof Kozlowski <krzk@kernel.org>
To: Chin-Ting Kuo <chin-ting_kuo@aspeedtech.com>,
	"patrick@stwcx.xyz" <patrick@stwcx.xyz>,
	"wim@linux-watchdog.org" <wim@linux-watchdog.org>,
	"linux@roeck-us.net" <linux@roeck-us.net>,
	"robh@kernel.org" <robh@kernel.org>,
	"krzk+dt@kernel.org" <krzk+dt@kernel.org>,
	"conor+dt@kernel.org" <conor+dt@kernel.org>,
	"joel@jms.id.au" <joel@jms.id.au>,
	"andrew@codeconstruct.com.au" <andrew@codeconstruct.com.au>,
	"linux-watchdog@vger.kernel.org" <linux-watchdog@vger.kernel.org>,
	"devicetree@vger.kernel.org" <devicetree@vger.kernel.org>,
	"linux-arm-kernel@lists.infradead.org"
	<linux-arm-kernel@lists.infradead.org>,
	"linux-aspeed@lists.ozlabs.org" <linux-aspeed@lists.ozlabs.org>,
	"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>
Cc: "Peter.Yin@quantatw.com" <Peter.Yin@quantatw.com>,
	"Patrick_NC_Lin@wiwynn.com" <Patrick_NC_Lin@wiwynn.com>,
	"Bonnie_Lo@wiwynn.com" <Bonnie_Lo@wiwynn.com>,
	"DELPHINE_CHIU@wiwynn.com" <DELPHINE_CHIU@wiwynn.com>,
	BMC-SW <BMC-SW@aspeedtech.com>,
	Aaron Lee <aaron_lee@aspeedtech.com>
Subject: Re: [PATCH 1/4] dt-bindings: watchdog: aspeed: Add property for WDT SW reset
Date: Mon, 14 Oct 2024 08:53:28 +0200	[thread overview]
Message-ID: <e53369a9-c205-4297-b151-7a1e61d8459f@kernel.org> (raw)
In-Reply-To: <TYZPR06MB5203B274C68C34FD478EA162B2442@TYZPR06MB5203.apcprd06.prod.outlook.com>

On 14/10/2024 04:07, Chin-Ting Kuo wrote:
> Hi Krzysztof,
> 
> Thanks for the review.
> 
>> -----Original Message-----
>> From: Krzysztof Kozlowski <krzk@kernel.org>
>> Sent: Monday, October 7, 2024 2:58 PM
>> Subject: Re: [PATCH 1/4] dt-bindings: watchdog: aspeed: Add property for WDT
>> SW reset
>>
>> On 07/10/2024 08:34, Chin-Ting Kuo wrote:
>>> Add "aspeed,restart-sw" property to distinguish normal WDT reset from
>>> system restart triggered by SW consciously.
>>>
>>> Signed-off-by: Chin-Ting Kuo <chin-ting_kuo@aspeedtech.com>
>>> ---
>>>  .../bindings/watchdog/aspeed,ast2400-wdt.yaml         | 11
>> +++++++++++
>>>  1 file changed, 11 insertions(+)
>>>
>>> diff --git
>>> a/Documentation/devicetree/bindings/watchdog/aspeed,ast2400-wdt.yaml
>>> b/Documentation/devicetree/bindings/watchdog/aspeed,ast2400-wdt.yaml
>>> index be78a9865584..6cc3604c295a 100644
>>> ---
>>> a/Documentation/devicetree/bindings/watchdog/aspeed,ast2400-wdt.yaml
>>> +++ b/Documentation/devicetree/bindings/watchdog/aspeed,ast2400-wdt.ya
>>> +++ ml
>>> @@ -95,6 +95,17 @@ properties:
>>>        array with the first word defined using the AST2600_WDT_RESET1_*
>> macros,
>>>        and the second word defined using the AST2600_WDT_RESET2_*
>> macros.
>>>
>>> +  aspeed,restart-sw:
>>> +    $ref: /schemas/types.yaml#/definitions/flag
>>> +    description: >
>>
>> Why >?
>>
> 
> ">" will be removed in the next patch series and the description content will be
> concatenated after the colon, ":".
> 
>>> +      Normally, ASPEED WDT reset may occur when system hangs or
>> reboot
>>> +      triggered by SW consciously. However, system doesn't know whether
>> the
>>> +      restart is triggered by SW consciously since the reset event flag is
>>> +      the same as normal WDT timeout reset. With this property, SW
>>> + can
>>
>> So DTS has this property and watchdog bites (timeout) but you will ignore it
>> and claim that it was software choice?
>>
> 
> No. Normally, when WDT is enabled, a counter is also be enabled. When the counter
> is equal to an expected value, timeout event occurs. AST2600 hardware supports a SW
> mode, when a magic number is filled into a specific register, WDT reset is triggered
> immediately without controlling the counter and the counter is not counted.
> Thus, WDT timeout doesn't occur.

How is this a no?

> 
>> This does not make much sense to me, at least based on this explanation
>>
>>> +      restart the system immediately and directly without wait for WDT
>>> +      timeout occurs. The reset event flag is also different from the
>> normal
>>> +      WDT reset. This property is only supported since AST2600 platform.
>>
>> Supported as drivers? How is this related? Or you mean hardware? Then
>> property should be restricted there.
>>
> 
> It is a hardware supported function on AST2600. For platform compatibility, without
> this property, all behaviors are the same as the previous generation platform, AST2500.
> 
> This property may be removed in the next patch series with referring to Rob suggestion

s/may/will/

> in the other reply. After checking with the major users, it is feasible to remove this
> property and using SW reset by default when the restart operation is triggered by SW
> deliberately on AST2600 platform.
> 


Best regards,
Krzysztof


  reply	other threads:[~2024-10-14  6:53 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-10-07  6:34 [PATCH 0/4] [PATCH 0/4] Update ASPEED WDT bootstatus Chin-Ting Kuo
2024-10-07  6:34 ` [PATCH 1/4] dt-bindings: watchdog: aspeed: Add property for WDT SW reset Chin-Ting Kuo
2024-10-07  6:58   ` Krzysztof Kozlowski
2024-10-14  2:07     ` Chin-Ting Kuo
2024-10-14  6:53       ` Krzysztof Kozlowski [this message]
2024-10-14  9:58         ` Chin-Ting Kuo
2024-10-07 17:59   ` Rob Herring
2024-10-07 19:54     ` Guenter Roeck
2024-10-14  2:08       ` Chin-Ting Kuo
2024-10-14  2:07     ` Chin-Ting Kuo
2024-10-07  6:34 ` [PATCH 2/4] ARM: dts: aspeed: Add WDT controller into alias field Chin-Ting Kuo
2024-10-07  6:34 ` [PATCH 3/4] watchdog: aspeed: Update bootstatus handling Chin-Ting Kuo
2024-10-07  6:34 ` [PATCH 4/4] watchdog: aspeed: Add support for SW restart Chin-Ting Kuo

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=e53369a9-c205-4297-b151-7a1e61d8459f@kernel.org \
    --to=krzk@kernel.org \
    --cc=BMC-SW@aspeedtech.com \
    --cc=Bonnie_Lo@wiwynn.com \
    --cc=DELPHINE_CHIU@wiwynn.com \
    --cc=Patrick_NC_Lin@wiwynn.com \
    --cc=Peter.Yin@quantatw.com \
    --cc=aaron_lee@aspeedtech.com \
    --cc=andrew@codeconstruct.com.au \
    --cc=chin-ting_kuo@aspeedtech.com \
    --cc=conor+dt@kernel.org \
    --cc=devicetree@vger.kernel.org \
    --cc=joel@jms.id.au \
    --cc=krzk+dt@kernel.org \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-aspeed@lists.ozlabs.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-watchdog@vger.kernel.org \
    --cc=linux@roeck-us.net \
    --cc=patrick@stwcx.xyz \
    --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;
as well as URLs for NNTP newsgroup(s).