1
0
mirror of https://xff.cz/git/u-boot/ synced 2025-09-27 05:21:16 +02:00

imx: imx8ulp: start the ELE RNG at boot

On the imx8ulp A1 SoC, the ELE RNG needs to be manually started.

Signed-off-by: Clement Faure <clement.faure@nxp.com>
Signed-off-by: Peng Fan <peng.fan@nxp.com>
This commit is contained in:
Peng Fan
2023-06-15 18:09:14 +08:00
committed by Stefano Babic
parent 78b4cf7530
commit 1c3f5df259
3 changed files with 36 additions and 0 deletions

View File

@@ -503,6 +503,31 @@ int ele_get_events(u32 *events, u32 *events_cnt, u32 *response)
return ret;
}
int ele_start_rng(void)
{
struct udevice *dev = gd->arch.ele_dev;
int size = sizeof(struct ele_msg);
struct ele_msg msg;
int ret;
if (!dev) {
printf("ele dev is not initialized\n");
return -ENODEV;
}
msg.version = ELE_VERSION;
msg.tag = ELE_CMD_TAG;
msg.size = 1;
msg.command = ELE_START_RNG;
ret = misc_call(dev, false, &msg, size, &msg, size);
if (ret)
printf("Error: %s: ret %d, response 0x%x\n",
__func__, ret, msg.data[0]);
return ret;
}
int ele_write_secure_fuse(ulong signed_msg_blk, u32 *response)
{
struct udevice *dev = gd->arch.ele_dev;