[RFC PATCH 2/2] lib: sbi: add priority for reset handler

Nikita Shubin nikita.shubin at maquefel.me
Fri Oct 1 01:27:12 PDT 2021


On Thu, 30 Sep 2021 10:26:11 +0800
Xiang W <wxjstz at 126.com> wrote:

> 在 2021-09-29星期三的 12:41 +0300,Nikita Shubin写道:
> > From: Nikita Shubin <n.shubin at yadro.com>
> > 
> > Let's make system_reset_check returning priority instead of only
> > true/false. In that case 0 - means not supported, and anything above
> > means priority that makes existing reset handlers being used in
> > first place, unless it is decided to lower their priority.
> > 
> > The handler with the least priority wins.
> > 
> > Signed-off-by: Nikita Shubin <n.shubin at yadro.com>  
> Isn't this priority used to control the shutdown sequence of different
> areas? What is this usage scenario?

Exactly! 

The current situation if following on Sifive Unmatched reset only works
via i2c PMIC, shutdown also works via i2c, but shutdown via gpio is
preferable, so we end up with 2 reset devices.

To prefer shutdown via gpio priority is desirable.


Yours,
Nikita Shubin




More information about the opensbi mailing list