From: Stefan Kerkmann <s.kerkmann@pengutronix.de>
To: Sascha Hauer <s.hauer@pengutronix.de>,
BAREBOX <barebox@lists.infradead.org>
Cc: Marco Felsch <m.felsch@pengutronix.de>,
Stefan Kerkmann <s.kerkmann@pengutronix.de>
Subject: [PATCH v3 03/10] hab: convert flags to use BIT() macro
Date: Thu, 23 Jan 2025 15:56:08 +0100 [thread overview]
Message-ID: <20250123-v2024-05-0-topic-hab-v3-3-e90d0e43c2de@pengutronix.de> (raw)
In-Reply-To: <20250123-v2024-05-0-topic-hab-v3-0-e90d0e43c2de@pengutronix.de>
From: Marco Felsch <m.felsch@pengutronix.de>
Make use of the BIT() macro to define the flags, no functional change.
Signed-off-by: Marco Felsch <m.felsch@pengutronix.de>
Signed-off-by: Stefan Kerkmann <s.kerkmann@pengutronix.de>
---
include/hab.h | 7 ++++---
1 file changed, 4 insertions(+), 3 deletions(-)
diff --git a/include/hab.h b/include/hab.h
index da79a8ffea36435c9520f9f72fc0f259bcc08926..2cef3841d149972faebcc51bd5c43fab03d1c6fa 100644
--- a/include/hab.h
+++ b/include/hab.h
@@ -7,6 +7,7 @@
#define __HABV4_H
#include <errno.h>
+#include <linux/bits.h>
/* State definitions */
enum habv4_state {
@@ -32,15 +33,15 @@ static inline int habv4_get_state(void)
#define SRK_HASH_SIZE 32
/* Force writing of key, even when a key is already written */
-#define IMX_SRK_HASH_FORCE (1 << 0)
+#define IMX_SRK_HASH_FORCE BIT(0)
/* Permanently write fuses, without this flag only the shadow registers
* are written.
*/
-#define IMX_SRK_HASH_WRITE_PERMANENT (1 << 1)
+#define IMX_SRK_HASH_WRITE_PERMANENT BIT(1)
/* When writing the super root key hash, also burn the write protection
* fuses so that the key hash can not be modified.
*/
-#define IMX_SRK_HASH_WRITE_LOCK (1 << 2)
+#define IMX_SRK_HASH_WRITE_LOCK BIT(2)
bool imx_hab_srk_hash_valid(const void *buf);
int imx_hab_write_srk_hash(const void *buf, unsigned flags);
--
2.39.5
next prev parent reply other threads:[~2025-01-23 15:02 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-01-23 14:56 [PATCH v3 00/10] i.MX8M HAB and OCOTP additions and fixes Stefan Kerkmann
2025-01-23 14:56 ` [PATCH v3 01/10] nvmem: ocotp: add support to get/set srk_revoke sticky bit Stefan Kerkmann
2025-01-23 14:56 ` [PATCH v3 02/10] nvmem: ocotp: add support to query the field-return " Stefan Kerkmann
2025-01-23 14:56 ` Stefan Kerkmann [this message]
2025-01-23 14:56 ` [PATCH v3 04/10] i.MX: HAB: add imx_hab_revoke_key support Stefan Kerkmann
2025-01-23 14:56 ` [PATCH v3 05/10] i.MX: HABv4: add more i.MX8M fuse defines Stefan Kerkmann
2025-01-23 14:56 ` [PATCH v3 06/10] i.MX8M: HABv4: add an option to allow key revocation Stefan Kerkmann
2025-01-23 14:56 ` [PATCH v3 07/10] i.MX8M: HABv4: add option to allow burning the field-return fuse Stefan Kerkmann
2025-01-23 14:56 ` [PATCH v3 08/10] i.MX: HAB: add imx_hab_field_return support Stefan Kerkmann
2025-01-23 14:56 ` [PATCH v3 09/10] i.mx8: ocotp: add GPx_LOCK defines Stefan Kerkmann
2025-01-23 14:56 ` [PATCH v3 10/10] hab: lock GP5 on i.MX8MP socs Stefan Kerkmann
2025-01-28 10:00 ` [PATCH v3 00/10] i.MX8M HAB and OCOTP additions and fixes 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=20250123-v2024-05-0-topic-hab-v3-3-e90d0e43c2de@pengutronix.de \
--to=s.kerkmann@pengutronix.de \
--cc=barebox@lists.infradead.org \
--cc=m.felsch@pengutronix.de \
--cc=s.hauer@pengutronix.de \
/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