Tom Rini | 10e4779 | 2018-05-06 17:58:06 -0400 | [diff] [blame] | 1 | /* SPDX-License-Identifier: GPL-2.0+ */ |
Beniamino Galvani | 38e1a60 | 2016-05-08 08:30:17 +0200 | [diff] [blame] | 2 | /* |
| 3 | * (C) Copyright 2016 - Beniamino Galvani <b.galvani@gmail.com> |
Beniamino Galvani | 38e1a60 | 2016-05-08 08:30:17 +0200 | [diff] [blame] | 4 | */ |
| 5 | |
| 6 | #ifndef __MESON_SM_H__ |
| 7 | #define __MESON_SM_H__ |
| 8 | |
| 9 | ssize_t meson_sm_read_efuse(uintptr_t offset, void *buffer, size_t size); |
Neil Armstrong | b4acf5a | 2019-06-12 11:49:07 +0200 | [diff] [blame] | 10 | |
| 11 | #define SM_SERIAL_SIZE 12 |
| 12 | |
Neil Armstrong | 63f475c | 2019-06-12 11:49:06 +0200 | [diff] [blame] | 13 | int meson_sm_get_serial(void *buffer, size_t size); |
Beniamino Galvani | 38e1a60 | 2016-05-08 08:30:17 +0200 | [diff] [blame] | 14 | |
Neil Armstrong | 385309c | 2019-08-06 17:28:36 +0200 | [diff] [blame] | 15 | enum { |
| 16 | REBOOT_REASON_COLD = 0, |
| 17 | REBOOT_REASON_NORMAL = 1, |
| 18 | REBOOT_REASON_RECOVERY = 2, |
| 19 | REBOOT_REASON_UPDATE = 3, |
| 20 | REBOOT_REASON_FASTBOOT = 4, |
| 21 | REBOOT_REASON_SUSPEND_OFF = 5, |
| 22 | REBOOT_REASON_HIBERNATE = 6, |
| 23 | REBOOT_REASON_BOOTLOADER = 7, |
| 24 | REBOOT_REASON_SHUTDOWN_REBOOT = 8, |
| 25 | REBOOT_REASON_RPMBP = 9, |
| 26 | REBOOT_REASON_CRASH_DUMP = 11, |
| 27 | REBOOT_REASON_KERNEL_PANIC = 12, |
| 28 | REBOOT_REASON_WATCHDOG_REBOOT = 13, |
| 29 | }; |
| 30 | |
| 31 | int meson_sm_get_reboot_reason(void); |
| 32 | |
Beniamino Galvani | 38e1a60 | 2016-05-08 08:30:17 +0200 | [diff] [blame] | 33 | #endif /* __MESON_SM_H__ */ |