From: Ahmad Fatoum <ahmad@a3f.at>
To: barebox@lists.infradead.org
Subject: [PATCH 5/8] nvmem: bsec: remove wrongly named bsec_field type
Date: Mon, 30 Mar 2020 16:39:12 +0200 [thread overview]
Message-ID: <20200330143915.663705-5-ahmad@a3f.at> (raw)
In-Reply-To: <20200330143915.663705-1-ahmad@a3f.at>
BSEC_SMC_READ_SHADOW and BSEC_SMC_WRITE_SHADOW aren't fields, but
operations to apply on fields. Rename it accordingly and fix up instances
where it was used wrongly.
Signed-off-by: Ahmad Fatoum <ahmad@a3f.at>
---
arch/arm/mach-stm32mp/include/mach/bsec.h | 6 +++---
drivers/nvmem/bsec.c | 2 +-
2 files changed, 4 insertions(+), 4 deletions(-)
diff --git a/arch/arm/mach-stm32mp/include/mach/bsec.h b/arch/arm/mach-stm32mp/include/mach/bsec.h
index 559faaa2bac3..d3cb91b1fdb1 100644
--- a/arch/arm/mach-stm32mp/include/mach/bsec.h
+++ b/arch/arm/mach-stm32mp/include/mach/bsec.h
@@ -17,7 +17,7 @@ enum bsec_smc {
};
/* Service for BSEC */
-enum bsec_field {
+enum bsec_op {
BSEC_SMC_READ_SHADOW = 1,
BSEC_SMC_PROG_OTP = 2,
BSEC_SMC_WRITE_SHADOW = 3,
@@ -26,13 +26,13 @@ enum bsec_field {
BSEC_SMC_WRITE_ALL = 6,
};
-static inline enum bsec_smc bsec_read_field(enum bsec_field field, unsigned *val)
+static inline enum bsec_smc bsec_read_field(unsigned field, unsigned *val)
{
return stm32mp_smc(STM32_SMC_BSEC, BSEC_SMC_READ_SHADOW,
field, 0, val);
}
-static inline enum bsec_smc bsec_write_field(enum bsec_field field, unsigned val)
+static inline enum bsec_smc bsec_write_field(unsigned field, unsigned val)
{
return stm32mp_smc(STM32_SMC_BSEC, BSEC_SMC_WRITE_SHADOW,
field, val, NULL);
diff --git a/drivers/nvmem/bsec.c b/drivers/nvmem/bsec.c
index 209c50dc7010..836e62ecbcc7 100644
--- a/drivers/nvmem/bsec.c
+++ b/drivers/nvmem/bsec.c
@@ -33,7 +33,7 @@ struct stm32_bsec_data {
int num_regs;
};
-static int bsec_smc(struct bsec_priv *priv, u8 op, enum bsec_field field,
+static int bsec_smc(struct bsec_priv *priv, enum bsec_op op, u32 field,
unsigned data2, unsigned *val)
{
enum bsec_smc ret = stm32mp_smc(priv->svc_id, op, field / 4, data2, val);
--
2.20.1
_______________________________________________
barebox mailing list
barebox@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/barebox
next prev parent reply other threads:[~2020-03-30 14:39 UTC|newest]
Thread overview: 15+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-03-30 14:39 [PATCH 1/8] ARM: stm32mp: init: don't cast signed error to unsigned Ahmad Fatoum
2020-03-30 14:39 ` [PATCH 2/8] ARM: stm32mp: init: detect Revision Z and 800 MHz profiles Ahmad Fatoum
2020-03-30 14:39 ` [PATCH 3/8] ARM: stm32mp: init: fix up CPU device tree nodes Ahmad Fatoum
2020-03-30 14:39 ` [PATCH 4/8] nvmem: bsec: allow reads at unaligned offsets Ahmad Fatoum
2020-03-30 14:39 ` Ahmad Fatoum [this message]
2020-05-08 12:53 ` [PATCH 5/8] nvmem: bsec: remove wrongly named bsec_field type Sascha Hauer
2020-03-30 14:39 ` [PATCH 6/8] pinctrl: stm32: fix up st,package into stm32mp nodes Ahmad Fatoum
2020-03-31 5:45 ` Sascha Hauer
2020-03-31 5:50 ` Ahmad Fatoum
2020-03-31 6:55 ` Sascha Hauer
2020-03-31 7:03 ` Ahmad Fatoum
2020-04-15 9:38 ` Ahmad Fatoum
2020-05-08 6:43 ` Ahmad Fatoum
2020-03-30 14:39 ` [PATCH 7/8] ARM: stm32mp: init: don't query package type Ahmad Fatoum
2020-03-30 14:39 ` [PATCH 8/8] ARM: stm32mp: add support for STM32MP157-EV1 board Ahmad Fatoum
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=20200330143915.663705-5-ahmad@a3f.at \
--to=ahmad@a3f.at \
--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