Merge tag 'efi-2019-07-rc4-2' of git://git.denx.de/u-boot-efi
[oweals/u-boot.git] / drivers / bootcount / Kconfig
index 67033637c0d6bcf5bd01c96c5e8a81f8d66d418e..b7c29f2fd30de36103f218ae65b3559a32b49f70 100644 (file)
@@ -70,8 +70,36 @@ config BOOTCOUNT_AT91
        bool "Boot counter for Atmel AT91SAM9XE"
        depends on AT91SAM9XE
 
+config DM_BOOTCOUNT
+        bool "Boot counter in a device-model device"
+       help
+         Enables reading/writing the bootcount in a device-model based
+         backing store.  If an entry in /chosen/u-boot,bootcount-device
+         exists, this will be the preferred bootcount device; otherwise
+         the first available bootcount device will be used.
+
 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