mbox series

[0/1] Add update available flag along with bootcount

Message ID 20210106153233.2843-1-Gireesh.Hiremath@in.bosch.com
Headers show
Series Add update available flag along with bootcount | expand

Message

Gireesh Hiremath Jan. 6, 2021, 3:32 p.m. UTC
From: Gireesh Hiremath <Gireesh.Hiremath@in.bosch.com>

By adding update_avalibale flag we wanted control the increment of
bootcount, update_available flag is set from user space when there is
upgrade in software which allow to increment of bootcount, otherwise no
increment in the bootcount. Update_available and bootcount will be
cleared after every successful boot from user space

version byte to handle the version number. to provide backward
compatibility initial version number is 2.

RTC second scratch register[32-bit]:
  -zero byte hold boot count value
  -first byte hold update available state
  -second byte hold version
  -third byte hold magic number

Gireesh Hiremath (1):
  am335x, guardian: software update available status is stored in AM3352
    RTC scracth register

 configs/am335x_guardian_defconfig   |  1 +
 drivers/bootcount/Kconfig           | 27 ++++++++++++--
 drivers/bootcount/Makefile          |  1 +
 drivers/bootcount/bootcount_nvmem.c | 57 +++++++++++++++++++++++++++++
 4 files changed, 83 insertions(+), 3 deletions(-)
 create mode 100644 drivers/bootcount/bootcount_nvmem.c