Message ID | 20190130035935.235565-34-sjg@chromium.org |
---|---|
State | Superseded |
Delegated to: | Bin Meng |
Headers | show |
Series | x86: Add support for booting from TPL | expand |
Hi Simon, On Wed, Jan 30, 2019 at 12:01 PM Simon Glass <sjg@chromium.org> wrote: > > Add a default implementation of this method which always indicates that > the last reset was a power-on reset. This is the most likely type of reset > and without a PCH-specific driver we cannot determine any other type. > See my comments for patch [28/40]. We can return the correct reset type based on whether PCH provided ioctl for pmbase address. > Signed-off-by: Simon Glass <sjg@chromium.org> > --- > > drivers/sysreset/sysreset_x86.c | 6 ++++++ > 1 file changed, 6 insertions(+) > Regards, Bin
Hi Bin, On Fri, 22 Feb 2019 at 00:20, Bin Meng <bmeng.cn@gmail.com> wrote: > > Hi Simon, > > On Wed, Jan 30, 2019 at 12:01 PM Simon Glass <sjg@chromium.org> wrote: > > > > Add a default implementation of this method which always indicates that > > the last reset was a power-on reset. This is the most likely type of reset > > and without a PCH-specific driver we cannot determine any other type. > > > > See my comments for patch [28/40]. We can return the correct reset > type based on whether PCH provided ioctl for pmbase address. I've haven't implemented this for v2. I think I need a few pointers on where to get this info. I suppose I could add it in a follow-on patch. Also it would be good to add a command to show this info. Regards, Simon
diff --git a/drivers/sysreset/sysreset_x86.c b/drivers/sysreset/sysreset_x86.c index 20b958cfd4..2a8ec6b0d2 100644 --- a/drivers/sysreset/sysreset_x86.c +++ b/drivers/sysreset/sysreset_x86.c @@ -31,6 +31,11 @@ static int x86_sysreset_request(struct udevice *dev, enum sysreset_t type) return -EINPROGRESS; } +static int x86_sysreset_get_last(struct udevice *dev) +{ + return SYSRESET_POWER; +} + static const struct udevice_id x86_sysreset_ids[] = { { .compatible = "x86,reset" }, { } @@ -38,6 +43,7 @@ static const struct udevice_id x86_sysreset_ids[] = { static struct sysreset_ops x86_sysreset_ops = { .request = x86_sysreset_request, + .get_last = x86_sysreset_get_last, }; U_BOOT_DRIVER(x86_sysreset) = {
Add a default implementation of this method which always indicates that the last reset was a power-on reset. This is the most likely type of reset and without a PCH-specific driver we cannot determine any other type. Signed-off-by: Simon Glass <sjg@chromium.org> --- drivers/sysreset/sysreset_x86.c | 6 ++++++ 1 file changed, 6 insertions(+)