summaryrefslogtreecommitdiff
path: root/arch/arm/include/asm/arch-meson/sm.h
diff options
context:
space:
mode:
authorIru Cai <mytbk920423@gmail.com>2019-10-30 14:21:52 +0800
committerIru Cai <mytbk920423@gmail.com>2019-10-30 14:48:38 +0800
commitae51f41d14f548d494ac41e0d21137c5a4c3f59c (patch)
tree6ddb9d1aaa7bd5bad5bbf8497edc2e08ff208d79 /arch/arm/include/asm/arch-meson/sm.h
downloaduext4-ae51f41d14f548d494ac41e0d21137c5a4c3f59c.tar.xz
import the U-Boot code and make it compile
Diffstat (limited to 'arch/arm/include/asm/arch-meson/sm.h')
-rw-r--r--arch/arm/include/asm/arch-meson/sm.h33
1 files changed, 33 insertions, 0 deletions
diff --git a/arch/arm/include/asm/arch-meson/sm.h b/arch/arm/include/asm/arch-meson/sm.h
new file mode 100644
index 0000000..f3ae46a
--- /dev/null
+++ b/arch/arm/include/asm/arch-meson/sm.h
@@ -0,0 +1,33 @@
+/* SPDX-License-Identifier: GPL-2.0+ */
+/*
+ * (C) Copyright 2016 - Beniamino Galvani <b.galvani@gmail.com>
+ */
+
+#ifndef __MESON_SM_H__
+#define __MESON_SM_H__
+
+ssize_t meson_sm_read_efuse(uintptr_t offset, void *buffer, size_t size);
+
+#define SM_SERIAL_SIZE 12
+
+int meson_sm_get_serial(void *buffer, size_t size);
+
+enum {
+ REBOOT_REASON_COLD = 0,
+ REBOOT_REASON_NORMAL = 1,
+ REBOOT_REASON_RECOVERY = 2,
+ REBOOT_REASON_UPDATE = 3,
+ REBOOT_REASON_FASTBOOT = 4,
+ REBOOT_REASON_SUSPEND_OFF = 5,
+ REBOOT_REASON_HIBERNATE = 6,
+ REBOOT_REASON_BOOTLOADER = 7,
+ REBOOT_REASON_SHUTDOWN_REBOOT = 8,
+ REBOOT_REASON_RPMBP = 9,
+ REBOOT_REASON_CRASH_DUMP = 11,
+ REBOOT_REASON_KERNEL_PANIC = 12,
+ REBOOT_REASON_WATCHDOG_REBOOT = 13,
+};
+
+int meson_sm_get_reboot_reason(void);
+
+#endif /* __MESON_SM_H__ */