summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorYann Gautier <yann.gautier@st.com>2022-12-13 10:51:56 +0100
committerYann Gautier <yann.gautier@st.com>2022-12-13 10:54:14 +0100
commit6b3ca0a81723290e2d9b33c406c0e65c1870baa8 (patch)
tree02ae3fe5b79556b82c0512c6e3b139d1f785b06e
parent70a422ba83df3f572af1d2931e950feb78592ca3 (diff)
downloadarm-trusted-firmware-6b3ca0a81723290e2d9b33c406c0e65c1870baa8.tar.gz
fix(st-crypto): remove platdata functions
The functions stm32_pka_get_platdata() and stm32_saes_get_platdata() are not used. They can be removed as we always use DT to retrieve the device configuration. This issue was triggered by sparse tool or when enabling warning -Wmissing-prototypes. Signed-off-by: Yann Gautier <yann.gautier@st.com> Change-Id: I5cce9a0765144d694e8ddece37361ccbb85d1734
-rw-r--r--drivers/st/crypto/stm32_pka.c12
-rw-r--r--drivers/st/crypto/stm32_saes.c12
2 files changed, 2 insertions, 22 deletions
diff --git a/drivers/st/crypto/stm32_pka.c b/drivers/st/crypto/stm32_pka.c
index e03cf0f42..2bbb31dc5 100644
--- a/drivers/st/crypto/stm32_pka.c
+++ b/drivers/st/crypto/stm32_pka.c
@@ -254,13 +254,6 @@ static const struct curve_parameters curve_def[] = {
static struct stm32_pka_platdata pka_pdata;
-#pragma weak stm32_pka_get_platdata
-
-int stm32_pka_get_platdata(struct stm32_pka_platdata *pdata)
-{
- return -ENODEV;
-}
-
static int stm32_pka_parse_fdt(void)
{
int node;
@@ -583,10 +576,7 @@ int stm32_pka_init(void)
err = stm32_pka_parse_fdt();
if (err != 0) {
- err = stm32_pka_get_platdata(&pka_pdata);
- if (err != 0) {
- return err;
- }
+ return err;
}
clk_enable(pka_pdata.clock_id);
diff --git a/drivers/st/crypto/stm32_saes.c b/drivers/st/crypto/stm32_saes.c
index 02baf2127..f4da571fb 100644
--- a/drivers/st/crypto/stm32_saes.c
+++ b/drivers/st/crypto/stm32_saes.c
@@ -139,15 +139,8 @@
#define SET_CHAINING_MODE(mod, cr) \
mmio_clrsetbits_32((cr), _SAES_CR_CHMOD_MASK, _SAES_CR_CHMOD_##mod << _SAES_CR_CHMOD_SHIFT)
-#define pragma weak stm32_saes_get_platdata
-
static struct stm32_saes_platdata saes_pdata;
-int stm32_saes_get_platdata(struct stm32_saes_platdata *pdata)
-{
- return -ENODEV;
-}
-
static int stm32_saes_parse_fdt(struct stm32_saes_platdata *pdata)
{
int node;
@@ -389,10 +382,7 @@ int stm32_saes_driver_init(void)
err = stm32_saes_parse_fdt(&saes_pdata);
if (err != 0) {
- err = stm32_saes_get_platdata(&saes_pdata);
- if (err != 0) {
- return err;
- }
+ return err;
}
clk_enable(saes_pdata.clock_id);