summaryrefslogtreecommitdiff
path: root/include/reboot-mode
diff options
context:
space:
mode:
authorNandor Han <nandor.han@vaisala.com>2021-06-10 16:56:45 +0300
committerTom Rini <trini@konsulko.com>2021-07-23 10:16:39 -0400
commitc74675bd904b6ce9d5820a80f27793c0583fd54c (patch)
treeb9b6e93ebe0d54334e3bf96b70e6a556a01a0f7c /include/reboot-mode
parentf9db2f16cb6fc7b6d05b0e70de65881bc97ba5c2 (diff)
reboot-mode: read the boot mode from RTC memory
RTC devices could provide battery-backed memory that can be used for storing the reboot mode magic value. Add a new reboot-mode back-end that uses RTC to store the reboot-mode magic value. The driver also supports both endianness modes. Signed-off-by: Nandor Han <nandor.han@vaisala.com> Reviewed-by: Simon Glass <sjg@chromium.org>
Diffstat (limited to 'include/reboot-mode')
-rw-r--r--include/reboot-mode/reboot-mode-rtc.h16
1 files changed, 16 insertions, 0 deletions
diff --git a/include/reboot-mode/reboot-mode-rtc.h b/include/reboot-mode/reboot-mode-rtc.h
new file mode 100644
index 0000000000..3613678f63
--- /dev/null
+++ b/include/reboot-mode/reboot-mode-rtc.h
@@ -0,0 +1,16 @@
+/* SPDX-License-Identifier: GPL-2.0+ */
+/*
+ * Copyright (c), Vaisala Oyj
+ */
+
+#ifndef REBOOT_MODE_REBOOT_MODE_RTC_H_
+#define REBOOT_MODE_REBOOT_MODE_RTC_H_
+
+struct reboot_mode_rtc_platdata {
+ struct udevice *rtc;
+ bool is_big_endian;
+ int addr;
+ size_t size;
+};
+
+#endif /* REBOOT_MODE_REBOOT_MODE_RTC_H_ */