[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[RFC PATCH v6 0/2] Add file-backed and write-once features to OTP
From: |
Green Wan |
Subject: |
[RFC PATCH v6 0/2] Add file-backed and write-once features to OTP |
Date: |
Mon, 28 Sep 2020 18:11:44 +0800 |
Changelogs:
v5 to v6:
- Rebase to latest. (sifive_u_otp.* are moved to hw/misc)
- Put the example command to commit message.
- Refine errp handle when check backend drive.
- Remove unnecessary debug message.
v4 to v5:
- Change the patch order
- Add write operation to update pdin to fuse[] bit by bit
- Fix wrong protection for offset 0x0~0x38
- Add SIFIVE_U_OTP_PWE_EN definition
- Refine access macro for fuse[] and fuse_wo[]
Summary of Patches
- First patch is to add write opertion to update pdin data to fuse[] bit
by bit. Add 'write-once' feature to block second write to same bit of
the OTP memory.
- Second patch is to add file-backed implementation to allow users to use
'-drive' to assign an OTP raw image file. OTP image file must be bigger
than 16K.
For example, '-drive if=none,format=raw,file=otp.img'
Testing
- Tested on sifive_u for both qemu and u-boot.
Green Wan (2):
hw/misc/sifive_u_otp: Add write function and write-once protection
hw/misc/sifive_u_otp: Add backend drive support
hw/misc/sifive_u_otp.c | 81 +++++++++++++++++++++++++++++++++-
include/hw/misc/sifive_u_otp.h | 5 +++
2 files changed, 85 insertions(+), 1 deletion(-)
--
2.17.1
- [RFC PATCH v6 0/2] Add file-backed and write-once features to OTP,
Green Wan <=