diff options
author | Tom Rini <trini@konsulko.com> | 2024-03-24 17:49:42 -0400 |
---|---|---|
committer | Tom Rini <trini@konsulko.com> | 2024-03-24 17:49:42 -0400 |
commit | 0cfdc7d22336f0f0ef4092163510fafffe4e3b4c (patch) | |
tree | cb0f637c4f530e21ac88e0ab017abc5362ef4af7 /drivers/misc/imx_ele/ele_api.c | |
parent | fb49d6c289d942ff7de309a5c5eaa37a7f4235db (diff) | |
parent | 9d27e441bb14dd526c60c13d5ff16353ca322eb3 (diff) |
Merge tag 'u-boot-imx-next-20240324' of https://gitlab.denx.de/u-boot/custodians/u-boot-imx into next
- Add ahab_commit command support.
- Add USB support for the imx93-phyboard-segin board.
- Add i.MX8MP PCIe support.
- Fix netboot environment on phycore_imx8mp.
Diffstat (limited to 'drivers/misc/imx_ele/ele_api.c')
-rw-r--r-- | drivers/misc/imx_ele/ele_api.c | 32 |
1 files changed, 32 insertions, 0 deletions
diff --git a/drivers/misc/imx_ele/ele_api.c b/drivers/misc/imx_ele/ele_api.c index 0c017734a49..e0ec22c7abf 100644 --- a/drivers/misc/imx_ele/ele_api.c +++ b/drivers/misc/imx_ele/ele_api.c @@ -528,6 +528,38 @@ int ele_start_rng(void) return ret; } +int ele_commit(u16 fuse_id, u32 *response, u32 *info_type) +{ + struct udevice *dev = gd->arch.ele_dev; + int size = sizeof(struct ele_msg); + struct ele_msg msg; + int ret = 0; + + if (!dev) { + printf("ele dev is not initialized\n"); + return -ENODEV; + } + + msg.version = ELE_VERSION; + msg.tag = ELE_CMD_TAG; + msg.size = 2; + msg.command = ELE_COMMIT_REQ; + msg.data[0] = fuse_id; + + ret = misc_call(dev, false, &msg, size, &msg, size); + if (ret) + printf("Error: %s: ret %d, fuse_id 0x%x, response 0x%x\n", + __func__, ret, fuse_id, msg.data[0]); + + if (response) + *response = msg.data[0]; + + if (info_type) + *info_type = msg.data[1]; + + return ret; +} + int ele_write_secure_fuse(ulong signed_msg_blk, u32 *response) { struct udevice *dev = gd->arch.ele_dev; |