Browse Source

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
pull/1993/head
Yann Gautier 2 years ago
parent
commit
6b3ca0a817
  1. 10
      drivers/st/crypto/stm32_pka.c
  2. 10
      drivers/st/crypto/stm32_saes.c

10
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;
@ -582,12 +575,9 @@ int stm32_pka_init(void)
#endif
err = stm32_pka_parse_fdt();
if (err != 0) {
err = stm32_pka_get_platdata(&pka_pdata);
if (err != 0) {
return err;
}
}
clk_enable(pka_pdata.clock_id);

10
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;
@ -388,12 +381,9 @@ int stm32_saes_driver_init(void)
int err;
err = stm32_saes_parse_fdt(&saes_pdata);
if (err != 0) {
err = stm32_saes_get_platdata(&saes_pdata);
if (err != 0) {
return err;
}
}
clk_enable(saes_pdata.clock_id);
if (stm32mp_reset_assert(saes_pdata.reset_id, TIMEOUT_US_1MS) != 0) {

Loading…
Cancel
Save