bootcount: add a new driver with syscon as backend
The driver will use a syscon regmap as backend and supports both
16 and 32 size value. The value will be stored in the CPU's endianness.
Signed-off-by: Nandor Han <nandor.han@vaisala.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
diff --git a/drivers/bootcount/Kconfig b/drivers/bootcount/Kconfig
index 0de2b7b..607027c 100644
--- a/drivers/bootcount/Kconfig
+++ b/drivers/bootcount/Kconfig
@@ -144,6 +144,18 @@
is not cleared on softreset.
compatible = "u-boot,bootcount";
+config DM_BOOTCOUNT_SYSCON
+ bool "Support SYSCON devices as a backing store for bootcount"
+ select REGMAP
+ select SYSCON
+ help
+ Enable reading/writing the bootcount value in a DM SYSCON device.
+ The driver supports a fixed 32 bits size register using the native
+ endianness. However, this can be controlled from the SYSCON DT node
+ configuration.
+
+ Accessing the backend is done using the regmap interface.
+
endmenu
endif