diff options
author | Jordan Crouse <jordan.crouse@amd.com> | 2006-10-04 04:48:57 -0400 |
---|---|---|
committer | David S. Miller <davem@sunset.davemloft.net> | 2006-12-06 21:38:46 -0500 |
commit | 9fe757b0cfcee0724027a675c533077287a21b96 (patch) | |
tree | a68942e39e350e78b0b9e0fcfa701b9ddbcf5a70 /drivers/crypto/geode-aes.h | |
parent | 94b9bb5480e73cec4552b19fc3f809742b4ebf67 (diff) |
[PATCH] crypto: Add support for the Geode LX AES hardware
Add a driver to support the AES hardware on the Geode LX processor.
Signed-off-by: Jordan Crouse <jordan.crouse@amd.com>
Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
Diffstat (limited to 'drivers/crypto/geode-aes.h')
-rw-r--r-- | drivers/crypto/geode-aes.h | 42 |
1 files changed, 42 insertions, 0 deletions
diff --git a/drivers/crypto/geode-aes.h b/drivers/crypto/geode-aes.h new file mode 100644 index 000000000000..3e3a571d4a20 --- /dev/null +++ b/drivers/crypto/geode-aes.h | |||
@@ -0,0 +1,42 @@ | |||
1 | /* Copyright (C) 2003-2006, Advanced Micro Devices, Inc. | ||
2 | * | ||
3 | * This program is free software; you can redistribute it and/or modify | ||
4 | * it under the terms of the GNU General Public License as published by | ||
5 | * the Free Software Foundation; either version 2 of the License, or | ||
6 | * (at your option) any later version. | ||
7 | */ | ||
8 | |||
9 | #ifndef _GEODE_AES_H_ | ||
10 | #define _GEODE_AES_H_ | ||
11 | |||
12 | #define AES_KEY_LENGTH 16 | ||
13 | #define AES_IV_LENGTH 16 | ||
14 | |||
15 | #define AES_MIN_BLOCK_SIZE 16 | ||
16 | |||
17 | #define AES_MODE_ECB 0 | ||
18 | #define AES_MODE_CBC 1 | ||
19 | |||
20 | #define AES_DIR_DECRYPT 0 | ||
21 | #define AES_DIR_ENCRYPT 1 | ||
22 | |||
23 | #define AES_FLAGS_USRKEY (1 << 0) | ||
24 | #define AES_FLAGS_COHERENT (1 << 1) | ||
25 | |||
26 | struct geode_aes_op { | ||
27 | |||
28 | void *src; | ||
29 | void *dst; | ||
30 | |||
31 | u32 mode; | ||
32 | u32 dir; | ||
33 | u32 flags; | ||
34 | int len; | ||
35 | |||
36 | u8 key[AES_KEY_LENGTH]; | ||
37 | u8 iv[AES_IV_LENGTH]; | ||
38 | }; | ||
39 | |||
40 | unsigned int geode_aes_crypt(struct geode_aes_op *); | ||
41 | |||
42 | #endif | ||