fix(st-bsec): rename OTPSR field
Update the bit name in BSEC_OTPSR, align with the last ref manual.
Signed-off-by: Patrick Delaunay <patrick.delaunay@foss.st.com>
Change-Id: I3b270406749f2f80d0d2242bdf368d98d419d798
diff --git a/drivers/st/bsec/bsec3.c b/drivers/st/bsec/bsec3.c
index 3fdaf16..c56ba86 100644
--- a/drivers/st/bsec/bsec3.c
+++ b/drivers/st/bsec/bsec3.c
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2024, STMicroelectronics - All Rights Reserved
+ * Copyright (c) 2024-2025, STMicroelectronics - All Rights Reserved
*
* SPDX-License-Identifier: BSD-3-Clause
*/
@@ -167,7 +167,7 @@
ERROR("BSEC reset critical error 0x%x\n", status);
panic();
}
- if ((status & BSEC_OTPSR_FUSEOK) != BSEC_OTPSR_FUSEOK) {
+ if ((status & BSEC_OTPSR_INIT_DONE) != BSEC_OTPSR_INIT_DONE) {
ERROR("BSEC reset critical error 0x%x\n", status);
panic();
}
@@ -467,8 +467,8 @@
uint32_t status = bsec_get_status();
uint32_t bsec_sr = mmio_read_32(BSEC_BASE + BSEC_SR);
- if ((status & BSEC_OTPSR_FUSEOK) == BSEC_OTPSR_FUSEOK) {
- /* NVSTATE is only valid if FUSEOK */
+ if ((status & BSEC_OTPSR_INIT_DONE) == BSEC_OTPSR_INIT_DONE) {
+ /* NVSTATE is only valid if INIT_DONE */
uint32_t nvstates = (bsec_sr & BSEC_SR_NVSTATE_MASK) >> BSEC_SR_NVSTATE_SHIFT;
if (nvstates == BSEC_SR_NVSTATE_OPEN) {
diff --git a/include/drivers/st/bsec3_reg.h b/include/drivers/st/bsec3_reg.h
index 177e30b..4263f76 100644
--- a/include/drivers/st/bsec3_reg.h
+++ b/include/drivers/st/bsec3_reg.h
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2024, STMicroelectronics - All Rights Reserved
+ * Copyright (c) 2024-2025, STMicroelectronics - All Rights Reserved
*
* SPDX-License-Identifier: BSD-3-Clause
*/
@@ -84,7 +84,7 @@
/* BSEC_OTPSR register fields */
#define BSEC_OTPSR_BUSY BIT_32(0)
-#define BSEC_OTPSR_FUSEOK BIT_32(1)
+#define BSEC_OTPSR_INIT_DONE BIT_32(1)
#define BSEC_OTPSR_HIDEUP BIT_32(2)
#define BSEC_OTPSR_OTPNVIR BIT_32(4)
#define BSEC_OTPSR_OTPERR BIT_32(5)