]> git.dujemihanovic.xyz Git - u-boot.git/commitdiff
crypto/fsl: export caam_get_era()
authorMichael Walle <michael@walle.cc>
Sat, 27 Jun 2020 20:58:49 +0000 (22:58 +0200)
committerPriyanka Jain <priyanka.jain@nxp.com>
Mon, 27 Jul 2020 08:46:29 +0000 (14:16 +0530)
We need the era in other modules, too. For example, to get the RNG
version.

Signed-off-by: Michael Walle <michael@walle.cc>
Reviewed-by: Horia Geantă <horia.geanta@nxp.com>
Reviewed-by: Priyanka Jain <priyanka.jain@nxp.com>
drivers/crypto/fsl/sec.c
include/fsl_sec.h

index a2c0bfaf44c612a9ea295da7fe14cf237931810a..f0a4a63d886380c3311ed827505aca170ac8a6e0 100644 (file)
@@ -98,7 +98,15 @@ void fdt_fixup_crypto_node(void *blob, int sec_rev)
                       fdt_strerror(err));
 }
 #elif CONFIG_SYS_FSL_SEC_COMPAT >= 4  /* SEC4 */
-static u8 caam_get_era(void)
+/**
+ * caam_get_era() - fetch the CAAM's era
+ *
+ * The SEC module povides an "Era" which can be used to differentiate
+ * between different revisions.
+ *
+ * Return: era of the SEC.
+ */
+u8 caam_get_era(void)
 {
        static const struct {
                u16 ip_id;
index c0d2c7e8667921727be914d2cb42f29eba37240e..2ebb75c9b277b6b9989f9b7d10fbf9fd83397fbc 100644 (file)
@@ -316,6 +316,8 @@ int blob_dek(const u8 *src, u8 *dst, u8 len);
 int sec_init_idx(uint8_t);
 #endif
 int sec_init(void);
+
+u8 caam_get_era(void);
 #endif
 
 #endif /* __FSL_SEC_H */