bootcount: add a DM i2c eeprom backing store for bootcount
PATCH 1/1 bootcount: add a DM i2c eeprom backing store for bootcount
This driver allows the use of i2c eeprom device or partition as backing store for boot counter values with DM enabled.
Signed-off-by Robert Beckett <[email protected]>
---
drivers/bootcount/Kconfig | 10 ++++ drivers/bootcount/Makefile | 1 + drivers/bootcount/i2c-eeprom.c | 95 ++++++++++++++++++++++++++++++++++ 3 files changed, 106 insertions(+) create mode 100644 drivers/bootcount/i2c-eeprom.c
drivers/bootcount/Kconfig +10 -0
@@ -96,6 +96,16 @@ config DM_BOOTCOUNT_RTC Accesses to the backing store are performed using the write16 and read16 ops of DM RTC devices. +config DM_BOOTCOUNT_I2C_EEPROM + bool "Support i2c eeprom devices as a backing store for bootcount" + depends on I2C_EEPROM + help + Enabled reading/writing the bootcount in a DM i2c eeprom device. + The wrapper device is to be specified with the compatible string + 'u-boot,bootcount-i2c-eeprom' and the 'i2c-eeprom'-property (a phandle + pointing to the underlying i2c eeprom device) and an optional 'offset' + property are supported. + endmenu endif
drivers/bootcount/Makefile +1 -0
@@ -10,3 +10,4 @@ obj-$(CONFIG_BOOTCOUNT_EXT) += bootcount_ext.o obj-$(CONFIG_DM_BOOTCOUNT) += bootcount-uclass.o obj-$(CONFIG_DM_BOOTCOUNT_RTC) += rtc.o +obj-$(CONFIG_DM_BOOTCOUNT_I2C_EEPROM) += i2c-eeprom.o
drivers/bootcount/i2c-eeprom.c new file +95 -0
95 lines not on this page · raw message
Signature · 1 line
2.20.1
PATCH 1/1 bootcount: add a DM i2c eeprom backing store for bootcount
Quoted 4 lines · Robert Beckett
This driver allows the use of i2c eeprom device or partition as backing store for boot counter values with DM enabled.
Signed-off-by Robert Beckett <[email protected]>
Applied to u-boot/master, thanks!
Signature · 8 lines
Tom -------------- next part -------------- A non-text attachment was scrubbed... Name: signature.asc Type: application/pgp-signature Size: 833 bytes Desc: not available URL: <https://lists.denx.de/pipermail/u-boot/attachments/20200110/cf53445c/attachment.sig>