mirror of
https://github.com/apache/nuttx.git
synced 2026-08-04 13:49:06 +00:00
arch/arm64/imx9: Add ele commit message
Add ele commit message to ele api Signed-off-by: Ari Kimari <ari.kimari@tii.ae>
This commit is contained in:
parent
dda00d30bf
commit
30ee64fc45
3 changed files with 45 additions and 0 deletions
|
|
@ -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. */
|
||||
|
||||
|
|
|
|||
|
|
@ -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;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -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 */
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue