Re: [PATCH v1 4/4] watchdog: npcm: sets card ext1 and ext2 bootstatus during probe

From: Guenter Roeck
Date: Sun Mar 01 2020 - 11:19:52 EST


On 3/1/20 8:08 AM, Tomer Maimon wrote:
> Sorry Guenter probebly I didnt explain it well.
>
>
> On Sun, 1 Mar 2020 at 12:48, Guenter Roeck <linux@xxxxxxxxxxxx <mailto:linux@xxxxxxxxxxxx>> wrote:
>
> On 3/1/20 1:40 AM, Tomer Maimon wrote:
> > During probe NPCM watchdog sets the following bootstatus flags:
> >Â Â Â Â- WDIOF_CARDRESET represent power and core reset.
> >Â Â Â Â- WDIOF_EXTERN1 represent watchdog 0-2 reset.
> >Â Â Â Â- WDIOF_EXTERN2 represent software 1-4 reset.
> >
> > Each flag is representing a group of bootstatus.
> > The user can configure through the device treethe exact reset
> > to each flag group.
> >
>
> Sorry, this doesn't make sense to me. I could understand reporting
> the above, but it looks to me like devicetree is used to associate
> a reset bit from the controller with one of the above.
> Devicetree only seems to be used to associate reset status bits
> from the controller with WDIOF_CARDRESET, WDIOF_EXTERN1, or
> WDIOF_EXTERN2. That adds a lot of complexity for little if any
> gain.Â
>
> Â
>
> It would make sense to set the bootstatus bits as suggested above,
> but that doesn't require devicetree properties.
>
> More comments inline.
>
> GuenterÂ
>
> Â
>
> In the NPCM750 we have the following reset types:
>
> 1. board reset (Power on reset, Core reset)
> 2. WD reset (0-2 WD reset).
> 3. SW reset (1-4 SW reset).
>
>
> Each board can use different reset types, because in the WD status bit there is not enough bits to represent the entire NPCM750 resets.
>
> The NPCM750 reset groups are represent as follow:
>
> Â- WDIOF_CARDRESET represent power and core reset.
> Â- WDIOF_EXTERN1 represent watchdog 0-2 reset.
> Â- WDIOF_EXTERN2 represent software 1-4 reset.
>
Exactly, and I don't see a need to be more specific than that.
This can be implemented without all the DT complexity.

Guenter