mbox series

[v2,0/3] Update ASPEED WDT bootstatus

Message ID 20241028024813.2416962-1-chin-ting_kuo@aspeedtech.com
Headers show
Series Update ASPEED WDT bootstatus | expand

Message

Chin-Ting Kuo Oct. 28, 2024, 2:48 a.m. UTC
This patch series inherits the patch submitted by Peter.
https://patchwork.kernel.org/project/linux-watchdog/patch/20240430143114.1323686-2-peteryin.openbmc@gmail.com/
Besides, the boot status modififed in the WDT driver
obeys the rules proposed in the OpenBMC.
https://github.com/openbmc/docs/blob/master/designs/bmc-reboot-cause-update.md#proposed-design
Moreover, WDT SW restart mechanism is supported by HW
since AST2600 platform and is also included in this
patch series.

Changes in v2:
  - Support SW restart on AST2600 by default without
    adding any dts property.


Chin-Ting Kuo (3):
  ARM: dts: aspeed: Add WDT controller into alias field
  watchdog: aspeed: Update bootstatus handling
  watchdog: aspeed: Add support for SW restart

 arch/arm/boot/dts/aspeed/aspeed-g4.dtsi |   2 +
 arch/arm/boot/dts/aspeed/aspeed-g5.dtsi |   3 +
 arch/arm/boot/dts/aspeed/aspeed-g6.dtsi |   4 +
 drivers/watchdog/aspeed_wdt.c           | 149 ++++++++++++++++++++++--
 4 files changed, 150 insertions(+), 8 deletions(-)

Comments

Andrew Jeffery Oct. 28, 2024, 11:55 p.m. UTC | #1
On Mon, 2024-10-28 at 10:48 +0800, Chin-Ting Kuo wrote:
> Add WDT controller into alias field. After that, WDT index,
> used to distinguish different WDT controllers in the driver,
> can be gotten by using of_alias_get_id dts API.

I feel it would be less brittle if we encode the mapping in the driver?
Based on reg the driver can derive the watchdog index. That way there's
no constraint on how the platform architect arranges the aliases for
the watchdogs (if they define them at all).

Andrew
Chin-Ting Kuo Oct. 29, 2024, 2:32 a.m. UTC | #2
Hi Andrew,

Thanks for the check.

> -----Original Message-----
> From: Andrew Jeffery <andrew@codeconstruct.com.au>
> Sent: Tuesday, October 29, 2024 7:55 AM
> Subject: Re: [PATCH v2 1/3] ARM: dts: aspeed: Add WDT controller into alias
> field
> 
> On Mon, 2024-10-28 at 10:48 +0800, Chin-Ting Kuo wrote:
> > Add WDT controller into alias field. After that, WDT index, used to
> > distinguish different WDT controllers in the driver, can be gotten by
> > using of_alias_get_id dts API.
> 
> I feel it would be less brittle if we encode the mapping in the driver?
> Based on reg the driver can derive the watchdog index. That way there's no
> constraint on how the platform architect arranges the aliases for the
> watchdogs (if they define them at all).
> 

It is also a feasible approach. It will be changed in the next patch version.

> Andrew

Chin-Ting