summaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
authorJean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>2015-03-25 12:56:15 +0100
committerSascha Hauer <s.hauer@pengutronix.de>2015-03-27 07:49:45 +0100
commitc3fe3d705949c83029560c8eebb280dff6fc50d6 (patch)
treedb0f864c53cea7e7dc7ead2c49dfec93512288ee /include
parentab5b2c35e143a87483700ca92d7fd50292a891d0 (diff)
downloadbarebox-c3fe3d705949c83029560c8eebb280dff6fc50d6.tar.gz
barebox-c3fe3d705949c83029560c8eebb280dff6fc50d6.tar.xz
crypto: hmac: move register to hmac
As we will use the best sha algo at runtime Add a new init level crypto_initcall to ensure that all the sha present before hmac Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
Diffstat (limited to 'include')
-rw-r--r--include/asm-generic/barebox.lds.h3
-rw-r--r--include/crypto/internal.h10
-rw-r--r--include/init.h3
3 files changed, 4 insertions, 12 deletions
diff --git a/include/asm-generic/barebox.lds.h b/include/asm-generic/barebox.lds.h
index 66abff30fa..e359187d7f 100644
--- a/include/asm-generic/barebox.lds.h
+++ b/include/asm-generic/barebox.lds.h
@@ -33,7 +33,8 @@
KEEP(*(.initcall.8)) \
KEEP(*(.initcall.9)) \
KEEP(*(.initcall.10)) \
- KEEP(*(.initcall.11))
+ KEEP(*(.initcall.11)) \
+ KEEP(*(.initcall.12))
#define BAREBOX_CMDS KEEP(*(SORT_BY_NAME(.barebox_cmd*)))
diff --git a/include/crypto/internal.h b/include/crypto/internal.h
index c6f5908ea0..0987ccc160 100644
--- a/include/crypto/internal.h
+++ b/include/crypto/internal.h
@@ -4,16 +4,6 @@
* GPL v2 only
*/
-#ifdef CONFIG_DIGEST_HMAC
-int digest_hmac_register(struct digest_algo *algo, unsigned int pad_length);
-#else
-static inline int digest_hmac_register(struct digest_algo *algo,
- unsigned int pad_length)
-{
- return 0;
-}
-#endif
-
int digest_generic_verify(struct digest *d, const unsigned char *md);
int digest_generic_digest(struct digest *d, const void *data,
unsigned int len, u8 *out);
diff --git a/include/init.h b/include/init.h
index 40cea55fb1..37c7eedf67 100644
--- a/include/init.h
+++ b/include/init.h
@@ -37,7 +37,8 @@ typedef int (*initcall_t)(void);
#define coredevice_initcall(fn) __define_initcall("8",fn,8)
#define fs_initcall(fn) __define_initcall("9",fn,9)
#define device_initcall(fn) __define_initcall("10",fn,10)
-#define late_initcall(fn) __define_initcall("11",fn,11)
+#define crypto_initcall(fn) __define_initcall("11",fn,11)
+#define late_initcall(fn) __define_initcall("12",fn,12)
/* section for code used very early when
* - we're not running from where we linked at