mirror of
https://github.com/u-boot/u-boot.git
synced 2025-05-08 10:39:08 +00:00
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>
This commit is contained in:
parent
f9db2f16cb
commit
c74675bd90
8 changed files with 215 additions and 0 deletions
16
include/reboot-mode/reboot-mode-rtc.h
Normal file
16
include/reboot-mode/reboot-mode-rtc.h
Normal file
|
@ -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_ */
|
Loading…
Add table
Add a link
Reference in a new issue