From: Sascha Hauer <s.hauer@pengutronix.de>
To: Barebox List <barebox@lists.infradead.org>
Subject: [PATCH] ARM: i.MX: ele: fix forward_lifecycle
Date: Thu, 31 Oct 2024 12:12:34 +0100 [thread overview]
Message-ID: <20241031111234.1196749-1-s.hauer@pengutronix.de> (raw)
enum ele_lifecycle describes the current lifecycle values as read from
the fuses. The ELE_FWD_LIFECYCLE_UP_REQ command takes different values
though. Use 0x8 to go to OEM closed status. The value is taken from
U-Boot-2025.01-rc1.
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
---
arch/arm/mach-imx/ele.c | 2 +-
drivers/hab/hab.c | 2 +-
include/mach/imx/ele.h | 2 +-
3 files changed, 3 insertions(+), 3 deletions(-)
diff --git a/arch/arm/mach-imx/ele.c b/arch/arm/mach-imx/ele.c
index 48e8749b31..c209f53de4 100644
--- a/arch/arm/mach-imx/ele.c
+++ b/arch/arm/mach-imx/ele.c
@@ -370,7 +370,7 @@ int ele_write_shadow_fuse(u16 fuse_id, u32 fuse_val, u32 *response)
*
* Return: 0 when the ELE call succeeds, negative error code otherwise
*/
-int ele_forward_lifecycle(enum ele_lifecycle lc, u32 *response)
+int ele_forward_lifecycle(u32 lc, u32 *response)
{
struct ele_msg msg;
int ret;
diff --git a/drivers/hab/hab.c b/drivers/hab/hab.c
index 800f26f26c..f684e9f1cc 100644
--- a/drivers/hab/hab.c
+++ b/drivers/hab/hab.c
@@ -331,7 +331,7 @@ static int imx_ahab_lockdown_device(unsigned flags)
return -EPERM;
}
- ret = ele_forward_lifecycle(ELE_LIFECYCLE_OEM_CLOSED, NULL);
+ ret = ele_forward_lifecycle(0x8, NULL);
if (ret) {
pr_err("failed to forward lifecycle to OEM closed: %pe\n", ERR_PTR(ret));
return ret;
diff --git a/include/mach/imx/ele.h b/include/mach/imx/ele.h
index 7ba8afde20..e7226e6576 100644
--- a/include/mach/imx/ele.h
+++ b/include/mach/imx/ele.h
@@ -158,7 +158,7 @@ int ele_get_info(struct ele_get_info_data *info);
int ele_write_fuse(u16 fuse_id, u32 fuse_val, bool lock, u32 *response);
int ele_authenticate_container(unsigned long addr, u32 *response);
int ele_release_container(u32 *response);
-int ele_forward_lifecycle(enum ele_lifecycle lc, u32 *response);
+int ele_forward_lifecycle(u32 lc, u32 *response);
int ele_print_events(void);
int imx93_ele_load_fw(void *bl33);
--
2.39.5
next reply other threads:[~2024-10-31 11:15 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-10-31 11:12 Sascha Hauer [this message]
2024-11-04 12:01 ` Sascha Hauer
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20241031111234.1196749-1-s.hauer@pengutronix.de \
--to=s.hauer@pengutronix.de \
--cc=barebox@lists.infradead.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox