diff options
author | Philipp Tomsich <philipp.tomsich@theobroma-systems.com> | 2018-11-28 01:00:19 +0300 |
---|---|---|
committer | Philipp Tomsich <philipp.tomsich@theobroma-systems.com> | 2018-12-10 12:04:45 +0300 |
commit | 482734aa662fce3e0cfd0acd74db5791c514f9e2 (patch) | |
tree | b81d8944dfeb384edeca966e07c6d23c017093a3 /drivers/bootcount/Kconfig | |
parent | ebb73de1687cfd6449f492b54cc2f32b4b0ce9c5 (diff) | |
download | u-boot-482734aa662fce3e0cfd0acd74db5791c514f9e2.tar.xz |
bootcount: add a DM RTC backing store for bootcount
This implements a driver using a RTC-based backing store for the DM
bootcount implementation. The node configuring this feature will be
compatible with 'u-boot,bootcount-rtc' and the underlying RTC device
shall be reference through the property 'rtc'. An offset into the RTC
device's register space can be provided through the 'offset' property.
Tested on a RK3399-Q7 on a Flamingo carrier board using the SRAM area
of the carrier board's RV3029 RTC.
Signed-off-by: Philipp Tomsich <philipp.tomsich@theobroma-systems.com>
Diffstat (limited to 'drivers/bootcount/Kconfig')
-rw-r--r-- | drivers/bootcount/Kconfig | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/drivers/bootcount/Kconfig b/drivers/bootcount/Kconfig index 46571eb322..b7c29f2fd3 100644 --- a/drivers/bootcount/Kconfig +++ b/drivers/bootcount/Kconfig @@ -80,6 +80,26 @@ config DM_BOOTCOUNT endchoice +if DM_BOOTCOUNT + +menu "Backing stores for device-model backed bootcount" +config DM_BOOTCOUNT_RTC + bool "Support RTC devices as a backing store for bootcount" + depends on DM_RTC + help + Enabled reading/writing the bootcount in a DM RTC device. + The wrapper device is to be specified with the compatible string + 'u-boot,bootcount-rtc' and the 'rtc'-property (a phandle pointing + to the underlying RTC device) and an optional 'offset' property + are supported. + + Accesses to the backing store are performed using the write16 + and read16 ops of DM RTC devices. + +endmenu + +endif + config BOOTCOUNT_BOOTLIMIT int "Maximum number of reboot cycles allowed" default 0 |