From c74675bd904b6ce9d5820a80f27793c0583fd54c Mon Sep 17 00:00:00 2001 From: Nandor Han Date: Thu, 10 Jun 2021 16:56:45 +0300 Subject: 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 Reviewed-by: Simon Glass --- include/reboot-mode/reboot-mode-rtc.h | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) create mode 100644 include/reboot-mode/reboot-mode-rtc.h (limited to 'include/reboot-mode') diff --git a/include/reboot-mode/reboot-mode-rtc.h b/include/reboot-mode/reboot-mode-rtc.h new file mode 100644 index 00000000000..3613678f636 --- /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_ */ -- cgit v1.2.3