diff options
author | Simon Glass <sjg@chromium.org> | 2019-05-02 10:52:15 -0600 |
---|---|---|
committer | Bin Meng <bmeng.cn@gmail.com> | 2019-05-08 13:02:16 +0800 |
commit | f77ab00e898bb24323d027f3f27c5661e19c8461 (patch) | |
tree | 09f464bc1a55ebb4041f32d8fb8c843f7be1bdb7 /drivers/sysreset | |
parent | d6b1ba2fb99cdda35983b1e70c745728b8df9b4b (diff) | |
download | u-boot-f77ab00e898bb24323d027f3f27c5661e19c8461.tar.gz |
x86: sysreset: Implement the get_last() method
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>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Diffstat (limited to 'drivers/sysreset')
-rw-r--r-- | drivers/sysreset/sysreset_x86.c | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/drivers/sysreset/sysreset_x86.c b/drivers/sysreset/sysreset_x86.c index ca892b305e..072f7948ef 100644 --- a/drivers/sysreset/sysreset_x86.c +++ b/drivers/sysreset/sysreset_x86.c @@ -98,6 +98,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; +} + #ifdef CONFIG_EFI_LOADER void __efi_runtime EFIAPI efi_reset_system( enum efi_reset_type reset_type, @@ -140,6 +145,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) = { |