This is an automated email from the ASF dual-hosted git repository.
xiaoxiang pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/nuttx.git
The following commit(s) were added to refs/heads/master by this push:
new 30ee64fc45d arch/arm64/imx9: Add ele commit message
30ee64fc45d is described below
commit 30ee64fc45d7287c9b263702853d6a4cc8a4448a
Author: Ari Kimari <[email protected]>
AuthorDate: Thu Sep 18 09:59:09 2025 +0300
arch/arm64/imx9: Add ele commit message
Add ele commit message to ele api
Signed-off-by: Ari Kimari <[email protected]>
---
arch/arm64/src/imx9/hardware/imx9_ele.h | 1 +
arch/arm64/src/imx9/imx9_ele.c | 24 ++++++++++++++++++++++++
arch/arm64/src/imx9/imx9_ele.h | 20 ++++++++++++++++++++
3 files changed, 45 insertions(+)
diff --git a/arch/arm64/src/imx9/hardware/imx9_ele.h
b/arch/arm64/src/imx9/hardware/imx9_ele.h
index 4c6f4a3c582..48e5b513382 100644
--- a/arch/arm64/src/imx9/hardware/imx9_ele.h
+++ b/arch/arm64/src/imx9/hardware/imx9_ele.h
@@ -55,6 +55,7 @@
#define ELE_RELEASE_RDC_REQ 0xc4
#define ELE_START_RNG_REQ 0xa3
#define ELE_VERIFY_IMAGE_REQ 0x88
+#define ELE_COMMIT_REQ 0xa8
/* Messaging Unit registers. */
diff --git a/arch/arm64/src/imx9/imx9_ele.c b/arch/arm64/src/imx9/imx9_ele.c
index 35880ce4e33..c863564fbad 100644
--- a/arch/arm64/src/imx9/imx9_ele.c
+++ b/arch/arm64/src/imx9/imx9_ele.c
@@ -491,3 +491,27 @@ int imx9_ele_get_random(uint32_t paddr, size_t len)
return -EIO;
}
+
+int imx9_ele_commit(uint32_t info, uint32_t *response)
+{
+ msg.header.version = ELE_VERSION;
+ msg.header.tag = ELE_CMD_TAG;
+ msg.header.size = 2;
+ msg.header.command = ELE_COMMIT_REQ;
+ msg.data[0] = info;
+
+ imx9_ele_sendmsg(&msg);
+ imx9_ele_receivemsg(&msg);
+
+ if (response)
+ {
+ *response = msg.data[0];
+ }
+
+ if ((msg.data[0] & 0xff) == ELE_OK)
+ {
+ return 0;
+ }
+
+ return -EIO;
+}
diff --git a/arch/arm64/src/imx9/imx9_ele.h b/arch/arm64/src/imx9/imx9_ele.h
index 5f192070b25..f2335883dad 100644
--- a/arch/arm64/src/imx9/imx9_ele.h
+++ b/arch/arm64/src/imx9/imx9_ele.h
@@ -267,4 +267,24 @@ int imx9_ele_get_trng_state(void);
****************************************************************************/
int imx9_ele_get_random(uint32_t paddr, size_t len);
+
+/****************************************************************************
+ * Name: imx9_ele_commit
+ *
+ * Description:
+ * Sends commit command to the ELE.
+ *
+ * Input Parameters:
+ * info - Information type to be committed
+ *
+ * Output Parameters:
+ * response - ELE response, can be used for debugging.
+ *
+ * Returned Value:
+ * Zero (OK) is returned for success. A negated errno value is returned on
+ * failure.
+ *
+ ****************************************************************************/
+
+int imx9_ele_commit(uint32_t info, uint32_t *response);
#endif /* __ARCH_ARM64_SRC_IMX9_IMX9_ELE_H */