summaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
authorSascha Hauer <s.hauer@pengutronix.de>2019-04-11 11:50:42 +0200
committerSascha Hauer <s.hauer@pengutronix.de>2019-04-11 12:08:42 +0200
commitea569a0afd6a2e9a84418cd18ddeaeefaa5eae39 (patch)
tree06e41f60403bfb9e6f93968b68a8b550e47cd77d /include
parentc9504d30ed12c0f62c992b5325a86faf8ad81c32 (diff)
downloadbarebox-ea569a0afd6a2e9a84418cd18ddeaeefaa5eae39.tar.gz
barebox-ea569a0afd6a2e9a84418cd18ddeaeefaa5eae39.tar.xz
hab/caam: Fix compilation of caam driver when hab is disabled
The caam driver needs the variable habv4_need_rng_software_self_test, but this is only declared when HABV4 is enabled. Instead of exporting a variable rather provide a function to test if a software selftest of the random number generator is needed. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
Diffstat (limited to 'include')
-rw-r--r--include/hab.h7
1 files changed, 5 insertions, 2 deletions
diff --git a/include/hab.h b/include/hab.h
index 30eace7685..a74b7dafce 100644
--- a/include/hab.h
+++ b/include/hab.h
@@ -20,11 +20,10 @@
#include <errno.h>
-extern bool habv4_need_rng_software_self_test;
-
#ifdef CONFIG_HABV4
int imx28_hab_get_status(void);
int imx6_hab_get_status(void);
+bool caam_need_rng_software_selftest(void);
#else
static inline int imx28_hab_get_status(void)
{
@@ -34,6 +33,10 @@ static inline int imx6_hab_get_status(void)
{
return -EPERM;
}
+static inline bool caam_need_rng_software_selftest(void)
+{
+ return false;
+}
#endif
#ifdef CONFIG_HABV3