Browse Source

fix(st-crypto): use GENMASK_32 to define PKA registers masks

When compiling the driver in aarch64, and with LOG_LEVEL_VERBOSE, there
is a compilation error on the message displaying the version of the
peripheral. The masks are making the variable unsigned long, whereas
we want to display an unsigned int. As the registers are 32-bit,
we should use GENMASK_32 instead of GENMASK.

Signed-off-by: Yann Gautier <yann.gautier@foss.st.com>
Change-Id: I002dd5ad901f68a9480f758eaaa4428f969813c1
pull/1993/merge
Yann Gautier 2 years ago
committed by Yann Gautier
parent
commit
379d77b370
  1. 8
      drivers/st/crypto/stm32_pka.c

8
drivers/st/crypto/stm32_pka.c

@ -56,7 +56,7 @@
#define _PKA_IPIDR 0x1FF8U
/* PKA control register fields */
#define _PKA_CR_MODE_MASK GENMASK(13, 8)
#define _PKA_CR_MODE_MASK GENMASK_32(13, 8)
#define _PKA_CR_MODE_SHIFT 8U
#define _PKA_CR_MODE_ADD 0x9U
#define _PKA_CR_MODE_ECDSA_VERIF 0x26U
@ -69,7 +69,7 @@
#define _PKA_SR_INITOK BIT(0)
/* PKA it flag fields (used in CR, SR and CLRFR) */
#define _PKA_IT_MASK (GENMASK(21, 19) | BIT(17))
#define _PKA_IT_MASK (GENMASK_32(21, 19) | BIT(17))
#define _PKA_IT_SHIFT 17U
#define _PKA_IT_OPERR BIT(21)
#define _PKA_IT_ADDRERR BIT(20)
@ -77,9 +77,9 @@
#define _PKA_IT_PROCEND BIT(17)
/* PKA version register fields */
#define _PKA_VERR_MAJREV_MASK GENMASK(7, 4)
#define _PKA_VERR_MAJREV_MASK GENMASK_32(7, 4)
#define _PKA_VERR_MAJREV_SHIFT 4U
#define _PKA_VERR_MINREV_MASK GENMASK(3, 0)
#define _PKA_VERR_MINREV_MASK GENMASK_32(3, 0)
#define _PKA_VERR_MINREV_SHIFT 0U
/* RAM magic offset */

Loading…
Cancel
Save